[ http://nagoya.apache.org/jira/browse/XERCESC-1270?page=history ]
Dominik Stadler updated XERCESC-1270: ------------------------------------- Attachment: TestXMLFormatter.h This is a testcase that shows that xerces includes the character 0x0e in the XML although the default setting for XMLFormatter is to fail on unrepresentable characters. > XMLFormatter can produce XML that fails parsing > ----------------------------------------------- > > Key: XERCESC-1270 > URL: http://nagoya.apache.org/jira/browse/XERCESC-1270 > Project: Xerces-C++ > Type: Bug > Components: Utilities > 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 contact one of the administrators: http://nagoya.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]