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/05/10 03:59:39 UTC
[Bug 1695] New - Unable to serialize text
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1695
*** shadow/1695 Wed May 9 18:59:39 2001
--- shadow/1695.tmp.15937 Wed May 9 18:59:39 2001
***************
*** 0 ****
--- 1,38 ----
+ +============================================================================+
+ | Unable to serialize text |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1695 Product: Xerces-J |
+ | Status: NEW Version: cvs extract (inc |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: |
+ | Priority: High Component: Serialization |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: kohsukekawaguchi@yahoo.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ In the serializeNode method of the rev.1.24, which I believe the latest,
+
+ (near line 966)
+ --------------
+ if ( !_indenting || getElementState().preserveSpace
+ || !(text.replace('\n',' ').trim() != ""))
+ characters( node.getNodeValue() );
+ --------------
+
+ The correct code should be
+
+ --------------
+ if ( !_indenting || getElementState().preserveSpace
+ || !text.replace('\n',' ').trim().equals("") )
+ characters( node.getNodeValue() );
+ --------------
+
+ I think we can't compare two strings by using != or == in serializer.
+ I also confirmed that the above fix is actually solve the problem.
+
+ I hope this bug to be fixed soon because this bug prevents everyone
+ from serializing DOM.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org