• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

XML DTD unordered children elements?

screw3d

Diamond Member
Let's say if we have this bit of DTD code:

<!ELEMENT Student(Name,ID,Birthday)>

and this will enforce it such that ID can only come after Name, and Birthday after ID.

Is there a way to make it such that the children of "Student" can be of any order, but must also appear exactly once? I've looked everywhere and can't find a way to do this..

Thanks.
 
It's not too hard if you don't want to restrict to exactly one, but if you do need that restriction then why do you need to have it unordered?
 
Originally posted by: kamper
It's not too hard if you don't want to restrict to exactly one, but if you do need that restriction then why do you need to have it unordered?

Don't ask me.. school assignments are nonsensical like that 🙁
 
Originally posted by: screw3d
Originally posted by: kamper
It's not too hard if you don't want to restrict to exactly one, but if you do need that restriction then why do you need to have it unordered?
Don't ask me.. school assignments are nonsensical like that 🙁
I see 😛 Does the prof actually know how to do it, or is he/she just one of those ones that expects you to figure out anything that they can dream up? 😕

It's been a while since I've worked with dtd, but a crazy idea: can you define 6 possible ways to define a Student, 1 for each of the permutations of the child ordering?
 
Originally posted by: kamper
Originally posted by: screw3d
Originally posted by: kamper
It's not too hard if you don't want to restrict to exactly one, but if you do need that restriction then why do you need to have it unordered?
Don't ask me.. school assignments are nonsensical like that 🙁
I see 😛 Does the prof actually know how to do it, or is he/she just one of those ones that expects you to figure out anything that they can dream up? 😕

It's been a while since I've worked with dtd, but a crazy idea: can you define 6 possible ways to define a Student, 1 for each of the permutations of the child ordering?

I've already tried that, but apparently DTD specs won't allow that.. I'm just gonna see the TA tomorrow and see what happens 🙂
 
Back
Top