[ 
https://issues.apache.org/jira/browse/XERCESC-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alberto Massari closed XERCESC-1270.
------------------------------------

    Resolution: Won't Fix

XMLFormatter is not supposed to be used directly; starting with version 3.2, 
the check for valid XML characters is done in the LSSerializer class and 
reported in a DOMLSException
                
> XMLFormatter can produce XML that fails parsing
> -----------------------------------------------
>
>                 Key: XERCESC-1270
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1270
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.3.0
>         Environment: Windows 2000, Xerces 2.3.0, VC++ 6.0
>            Reporter: Dominik Stadler
>         Attachments: TestXMLFormatter.h, Test_xe9.xml
>
>
> One of our classes uses an XMLFormatter to generate a text-representation of 
> an XML-String. We use this to escape the characters correctly. 
> The XMLFormatter uses the default setting to fail on unrepresentable 
> characters, see 
> http://xml.apache.org/xerces-c/apiDocs/classXMLFormatter.html#z549_0
> When we have an character with ascii-value of 0x0e in the string, the 
> XMLFormatter escapes this as "" which looks ok, but according to the XML 
> Standard, only 0x0a, 0x0d and 0x09 are valid ascii-characters below 0x020!! 
> See also http://w3c.org/TR/2004/REC-xml-20040204/#charsets
> Consequently when we try to parse the generated xml-file again with Xerces, 
> we get an error "Invalid character reference".
> In my opinion, XMLFormatter should report an error if characters below 0x020 
> (and not 0x0a, 0x0d and 0x09) are encountered and unrepFlags is set to 
> Unrep_Fail. This currently let's me generate invalid XML-Files with 
> XMLFormatter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to