XML DTD - 星号在括号外时意味着什么
我理解这
<!ELEMENT tagname (source*)>
意味着源可以出现零次或多次,但我不明白这意味着什么
<!ELEMENT story (#PCDATA | date)*>
括号外的星号适用于内部的所有内容或故事或其他内容吗?
谢谢!
I understand that
<!ELEMENT tagname (source*)>
means that source can appear zero or more times, but I don't understand what this means
<!ELEMENT story (#PCDATA | date)*>
Is that asterisk outside the bracket applied to everything inside or to story or something else?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个(可能是空的)序列
{ #PCDATA |日期}
。需要明确的是,(x|y)*
的产生规则在您的语言中是“零次或多次”,这意味着您重复选择
#PCDATA
或 < code>date 您做出零个或多个选择的时间。清除?
It's a (possibly empty) sequence over
{ #PCDATA | date }
. To be clear a production rule for(x|y)*
isIn your language of "zero or more times" it means that you repeatedly choose one of
#PCDATA
ordate
where you make zero or more choices.Clear?