Reputation: 9522
I got three elements defined in a dtd which have the same child element names. What is the correct syntax for:
Example idea: is this valid?
<!ELEMENT one ( childone?, childtwo? ) >
<!ELEMENT two ( childone?, childtwo? ) >
<!ELEMENT three ( childone?, childtwo? ) >
<!ELEMENT childone ( #PCDATA ) >
<!ELEMENT childtwo ( #PCDATA ) >
I appreciate your help! Thanks a lot!
Upvotes: 0
Views: 419
Reputation: 52858
Yes, your example idea is valid for your first scenario (for all children having the same definition).
Your second scenario (elements having different children definitions) isn't possible. You're only allowed to have one declaration per element. You would have to declare new elements with unique names.
Upvotes: 1