XML DTD unordered children elements?

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
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.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
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?
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
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 :(
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
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 :p 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? :confused:

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?
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
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 :p 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? :confused:

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 :)