The following comment has been added to this issue:
Author: PeiYong Zhang
Created: Tue, 5 Oct 2004 8:42 AM
Body:
Dominik,
Do you have a patch for the bug? If not, would you please
post the code to show the bug?
The code shall
1. have the string containing the 0x0e
2. the method you invoke on the formatter
Reproducing the problem can help us find the solution faster, thanks
Rgds,
PeiYong
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/XERCESC-1270?page=comments#action_53719
---------------------------------------------------------------------
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, 5 Oct 2004 8:42 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]