[Home] [By Thread] [By Date] [Recent Entries]

  • From: Baudoncq Gert <Gert.Baudoncq@z...>
  • To: 'Giuseppe Sarno' <gsarno@n...>,"'xml-dev@l...'" <xml-dev@l...>
  • Date: Thu, 23 Aug 2001 11:33:42 +0100

Title: Elements order:
<!ELEMENT data (unorderdname)>
<!ELEMENT unorderdname ((name,surname) | (surname,name))>
<!ELEMENT name (#PCDATA) >
<!ELEMENT surname (#PCDATA) >
-----Oorspronkelijk bericht-----
Van: Giuseppe Sarno [mailto:gsarno@n...]
Verzonden: donderdag 23 augustus 2001 9:51
Aan: 'xml-dev@l...'
Onderwerp: Elements order:

Hi,
I was wondering if it was possible to have the elements in a XML document
to be inserted in a various order and which is the relative rule in the DTD.

ex:
1)
 <data>
     <name>       john     </name>
     <surname>  wilson   </surname>
 </data>
2)
 <data>
     <surname>  wilson   </surname>
     <name>       john     </name>
 </data>

the rule <!ELEMENT  data  (name,surname)>

tells the parser that name come first and surname after, so the ex 2 will generate a parsing error.
Is it possible to have rule for a generic order of the elements, so that both the example will work?

cheers.


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member