You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by ke...@us.ibm.com on 2008/08/01 13:08:43 UTC

Re: document order guarantees in JAXP

The order of _elements_ is guaranteed in any XML API.

The order of _attributes_ is not.

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)

Re: document order guarantees in JAXP

Posted by ke...@us.ibm.com.
SequenceType and ItemType checked in. The class Javadocs spell out my 
understanding of how we're dividing these; critiques welcome.

I believe the interpreter currently runs but compiler doesn't, due to my 
having made SequenceType no longer a stream at the FIL level. (On the 
other hand, I may make it implement constructable-stream to leverage the 
existing stream-optimized codegen; that'll require some refactoring, I 
expect.)

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)

Re: document order guarantees in JAXP

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
keshlam@us.ibm.com wrote on 08/01/2008 07:08:43 AM:

> The order of _elements_ is guaranteed in any XML API.

Not every XML API preserves the order of elements in the document. For
example the ordering in JAXB follows the schema (or more precisely the Java
annotations) rather than what was in the document. An invalid document
loaded into JAXB objects might have its elements written out in a schema
valid order on serialization.

> The order of _attributes_ is not.
>
> ______________________________________
> "... Three things see no end: A loop with exit code done wrong,
> A semaphore untested, And the change that comes along. ..."
>  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.
> org/pegasus/songs/threes-rev-11.html)

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org