Graywolf001
Programmer
Hey all.
First, let me say that I'm a total DTD newbie. However, I felt that DTD's were better suited for certain error validation than programmatic means on the site I'm currently building.
The problem is, I need to explicitly declare every element returned to me in an XML doc. However, I can't guarantee the sequence of the returned elements in each parent node. Is there a way to declare each child node inside the parenthesis after the parent node without declaring that they appear in the sequence listed? E.G.:
<!ELEMENT PINS (PIN+,PIN2+)>
<!ATTLIST PINS Index CDATA "">
<!ELEMENT PIN (#PCDATA)>
<!ELEMENT PIN2 (#PCDATA)>
<!-- This will declare that <PIN> must come BEFORE <PIN2>-->
<!-- The XML could be sorted by in both of these manners tho -->
<PINS Index="1">
<PIN>1234</PIN>
<PIN2>1234</PIN2>
</PINS>
<PINS Index="2">
<PIN2>4321</PIN2>
<PIN>4321</PIN>
</PINS>
I don't get the necessary validation using "ANY" instead of declaring the child nodes,
Any help would be MUCH appreciated!
Thanks
First, let me say that I'm a total DTD newbie. However, I felt that DTD's were better suited for certain error validation than programmatic means on the site I'm currently building.
The problem is, I need to explicitly declare every element returned to me in an XML doc. However, I can't guarantee the sequence of the returned elements in each parent node. Is there a way to declare each child node inside the parenthesis after the parent node without declaring that they appear in the sequence listed? E.G.:
<!ELEMENT PINS (PIN+,PIN2+)>
<!ATTLIST PINS Index CDATA "">
<!ELEMENT PIN (#PCDATA)>
<!ELEMENT PIN2 (#PCDATA)>
<!-- This will declare that <PIN> must come BEFORE <PIN2>-->
<!-- The XML could be sorted by in both of these manners tho -->
<PINS Index="1">
<PIN>1234</PIN>
<PIN2>1234</PIN2>
</PINS>
<PINS Index="2">
<PIN2>4321</PIN2>
<PIN>4321</PIN>
</PINS>
I don't get the necessary validation using "ANY" instead of declaring the child nodes,
Any help would be MUCH appreciated!
Thanks