Altova Mailing List Archives
>xml-dev Archive Home
>Recent entries
>Thread Prev - Dangers of Copying Text into an XML Document
[Thread Next]
Re: [xml-dev] Dangers of Copying Text into an XML Document
To: "Costello, Roger L." <costello@-----.--->
Date: 9/5/2007 3:31:00 PM
Roger Costello writes:
> Can you think of other problems that may result from copying text from
> one document and pasting it into an XML document?
They might be characters that are not legal in XML at all. See [1] which
says:
"Well-formedness constraint: Legal Character
Characters referred to using character references MUST match the
production for Char."
In XML 1.0 that's:
"Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] |
[#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode
character,
excluding the
surrogate
blocks, FFFE,
and FFFF. */"
If you have any characters that don't fit this production, XML can't
represent them, escaped or not. XML 1.1 allows somewhat more, as I
recall.
Noah
[1] http://www.w3.org/TR/REC-xml/#wf-Legalchar
--------------------------------------
Noah Mendelsohn
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------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.

