Hi Oleg, In short the answer is no. While XNI reports the information set [1] plus some other things that aren't part of the infoset (such as CDATA section boundaries), it doesn't report the non-infoset items: attribute ordering and whitespace between attributes that you mentioned.
Think of the infoset as the information carried by an XML document. The items you mentioned are part of XML syntax. The spaces in between attributes don't carry information, nor does the ordering of attributes because the attribute specification for an element is an unordered set. Here's an example of the difference between the infoset and syntax, the five document fragments below contain the same information (assume that entity 'nine' and 'elemref' are defined somewhere and have replacement text '9' and '<elem>9</elem>' respectively): 1) <elem>9</elem> 2) <elem><![CDATA[9]]></elem> 3) <elem>9</elem> 4) <elem>&nine;</elem> 5) &elemref; Regardless of what syntax is used, we have one element named 'elem', and it has one child, a character information item whose character code is x39. They all convey the same information. In an XML editor I can see the need for having access to all of XML syntax. XNI just doesn't expose all those things, so if you have a good reason for needing to know about much of what is listed in Appendix D [2] of the Infoset rec then XNI probably will not suit your needs. [1] http://www.w3.org/TR/xml-infoset/ [2] http://www.w3.org/TR/xml-infoset/#omitted On Mon, 13 Oct 2003, Oleg Dulin wrote: > Colleagues: > > Does anyone know if it is possible to use Xerces to parse the input file > in such a way that all, or most of the formatting is captured and can be > reproduced via serialization ? Is XNI appropriate method for this ? We > would love to know about > experiences with parse/serialization approaches that have a greater > infoset than that provided by SAX and DOM, especially related to > ignorable whitespace and attributes ordering/whitespace. We are editing > XML and want to preserve the file as much as possible. > > Kind regards, > Oleg Dulin > Opence, Inc. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------- Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
