You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/02/28 22:47:07 UTC
[Bug 759] New - does not transform ' and " into ' and " when writing out XML
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=759
*** shadow/759 Wed Feb 28 13:47:07 2001
--- shadow/759.tmp.3249 Wed Feb 28 13:47:07 2001
***************
*** 0 ****
--- 1,30 ----
+ +============================================================================+
+ | does not transform ' and " into ' and " when writing out XML |
+ +----------------------------------------------------------------------------+
+ | Bug #: 759 Product: Xerces-J |
+ | Status: NEW Version: 1.2.3 |
+ | Resolution: Platform: All |
+ | Severity: Major OS/Version: All |
+ | Priority: High Component: JAXP |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: biswa.chowdhury@umusic.com |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ As per XML recommendation, the characters < > & " and ' are to be
+ escaped as < > & " and ' .
+ However the writeXml method in org.apache.crimson.tree.TextNode
+ only handles < > and & and leaves out " and '.
+
+ adding the following lines to writeXml would remedy that.
+ }else if (c == '\'') { // not legal in char data
+ out.write (data, start, last - start);
+ start = last + 1;
+ out.write ("'");
+ }else if (c == '"') { // not legal in char data
+ out.write (data, start, last - start);
+ start = last + 1;
+ out.write (""");
+ }