XML DTD 子级
http://www.w3schools.com/dtd/dtd_elements.asp
所以我看看这个和子部分,它指出它必须在文档中像这样显示。根在外面,孩子在里面()。那么如果子元素有子元素我还要继续嵌套()吗?另外,如果一个元素出现多次,我是否必须在 DTD 中声明?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不必在 DTD 中嵌套 ELEMENT 声明 - 为每个元素声明哪些内容可能直接出现在其下方或内部就足够了。
至于指示给定上下文中可能出现的元素数量,您可以不指定修饰符(这意味着必须出现单个元素),? (0 或 1 - 该元素是可选的)、*(0 或更多)或 +(1 或更多)。
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).