[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Elements order:
- From: Nicolas LEHUEN <email@example.com>
- To: 'Marcus Carr' <firstname.lastname@example.org>,'Giuseppe Sarno' <email@example.com>
- Date: Thu, 23 Aug 2001 11:46:52 +0200
What if we add an <age> element now ? Then a <gender> element ? The content
model will explode. You need something like the <all> content model of XSDL.
I've heard that there is a way to express this in SGML DTDs, but it has been
dropped in XML, is that true ?
The problem is that when serializing certain data structure, it is not
always easy to guarantee a particular element order.
For example, if you serialize an hashtable by iterating over its cells, you
can't predict the key ordering because it depends on the hash code
algorithm, the size of the hashing array, etc.
This is all the more annoying that for structured data, it does not matter
that the <name> element precedes the <surname> or not.
>De : Marcus Carr [mailto:firstname.lastname@example.org]
>Envoye : jeudi 23 aout 2001 11:31
>A : Giuseppe Sarno
>Cc : 'email@example.com'
>Objet : Re: Elements order:
>Giuseppe Sarno wrote:
>> I was wondering if it was possible to have the elements in a XML
>> to be inserted in a various order and which is the relative rule in
>> the DTD.
>> the rule <!ELEMENT data (name,surname)>
><!ELEMENT data ((name,surname) | (surname, name))>
>The bigger question is, why does it matter?
>Marcus Carr email: firstname.lastname@example.org
>Allette Systems (Australia) www: http://www.allette.com.au
>"Everything should be made as simple as possible, but not simpler."
> - Einstein
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>To subscribe or unsubscribe from this elist use the subscription