Hi folks,
Let's say I have this xml
<commands>
<classess>
<option value="1">A.</option>
<option value="2">B</option>
<option value="3">C</option>
</classess>
<areas>
<option county="..." value="1">A.</option>
<option county="..." value="2">B</option>
<option county="..." value="3">C</option>
</areas>
</commands>
The classes and areas tags both contains option tags. All option tag contains value attributes. When I make the DTD, I need to define the option ELEMENTs for both classess and areas tags. Will this confuse the xml parser? Is it legal?
<!ELEMENT commands (classes, areas)>
<!ELEMENT classes (option)>
<!ELEMENT option (#PCDATA)>
<!ATTLIST option value CDATA #REQUIRED>
<!ELEMENT areas (county, option)>
<!ELEMENT county (#PCDATA)>
<!ELEMENT option (#PCDATA)>
<!ATTLIST option value CDATA #REQUIRED>
Thanks in advance!
Billy Ng
Let's say I have this xml
<commands>
<classess>
<option value="1">A.</option>
<option value="2">B</option>
<option value="3">C</option>
</classess>
<areas>
<option county="..." value="1">A.</option>
<option county="..." value="2">B</option>
<option county="..." value="3">C</option>
</areas>
</commands>
The classes and areas tags both contains option tags. All option tag contains value attributes. When I make the DTD, I need to define the option ELEMENTs for both classess and areas tags. Will this confuse the xml parser? Is it legal?
<!ELEMENT commands (classes, areas)>
<!ELEMENT classes (option)>
<!ELEMENT option (#PCDATA)>
<!ATTLIST option value CDATA #REQUIRED>
<!ELEMENT areas (county, option)>
<!ELEMENT county (#PCDATA)>
<!ELEMENT option (#PCDATA)>
<!ATTLIST option value CDATA #REQUIRED>
Thanks in advance!
Billy Ng