Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] What to escape when serializing XML

From: richard@---.--.--.-- (------- -----)
To: xml-dev@-----.---.---
Date: 1/3/2007 4:17:00 PM
In article <00e301c72f37$7dcad4e0$6401a8c0@turtle> you write:

>I think there's a reasonable expectation (and certainly the QT serialization
>spec assumes it) that if there's a DTD or schema that causes whitespace to
>be condensed in this way, that's because there's no semantic difference
>between different whitespace sequences, and that therefore it's OK for the
>serializer to assume that any whitespace sequence will do.

XML parsing ensures that an attribute declared with tokenised type
will be normalised to a sequence of tokens separated by single space
characters, whether the attribute is valid or not.  If it's not valid,
the tokens may not be NMTOKENs (they may even contain tabs, linefeeds
etc), but you can rely on them being separated by single spaces.

So on the one hand there's nothing you can do in serialisation to
maintain spaces within the tokens, but on the other hand if your data
came from parsing an XML document the situation is never going to
arise.

-- Richard


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent