XML DTD - What does the asterisk mean when it's outside the bracket
I understand that
<!ELEMENT tagname (source*)>
means that source can appear zero or more times, but I don't understand what this means
<!ELEMENT sto开发者_Go百科ry (#PCDATA | date)*>
Is that asterisk outside the bracket applied to everything inside or to story or something else?
Thanks!
It's a (possibly empty) sequence over { #PCDATA | date }
. To be clear a production rule for (x|y)*
is
(x|y)* = {} | x(x|y)* | y(x|y)*
In your language of "zero or more times" it means that you repeatedly choose one of #PCDATA
or date
where you make zero or more choices.
Clear?
精彩评论