OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Elements order:



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@nortelnetworks.com]
Verzonden: donderdag 23 augustus 2001 9:51
Aan: 'xml-dev@lists.xml.org'
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.