XML DTD 子级

发布于 2024-12-05 09:27:40 字数 228 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心安伴我暖 2024-12-12 09:27:40

您不必在 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文