开发者

XML DTDs Children

开发者 https://www.devze.com 2023-04-06 02:31 出处:网络
http://www.开发者_运维百科w3schools.com/dtd/dtd_elements.asp So I\'m looking at this and at the children section it states that it must show up like this in the document. Root is outside children are

http://www.开发者_运维百科w3schools.com/dtd/dtd_elements.asp

So I'm looking at this and at the children section it states that it must show up like this in the document. Root is outside children are inside (). So if a child element has a child element do I keep nesting ()? Also if an element shows up more than once do I have to state that in the DTD?


You don't nest ELEMENT declarations in a DTD - it's enough to state for each element, which content may appear directly underneath, or inside it.

As far as indicating the number of elements that may occur in a given context, you can specify no modifier (which means a single element must appear), ? (0 or 1 - the element is optional), * (0 or more), or + (1 or more).

0

精彩评论

暂无评论...
验证码 换一张
取 消