The following issue has been updated:

    Updater: Dominik Stadler (mailto:[EMAIL PROTECTED])
       Date: Tue, 7 Sep 2004 7:59 AM
    Comment:
A sample XML-file that was created with XMLFormatter and which cannot be parsed any 
more because the escaped character is invalid.
    Changes:
             Attachment changed to Test_xe9.xml
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XERCESC-1270?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1270

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1270
    Summary: XMLFormatter can produce XML that fails parsing
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.3.0

   Assignee: 
   Reporter: Dominik Stadler

    Created: Mon, 6 Sep 2004 7:45 AM
    Updated: Tue, 7 Sep 2004 7:59 AM
Environment: Windows 2000, Xerces 2.3.0, VC++ 6.0

Description:
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.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.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]

Reply via email to