You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/09/04 00:35:35 UTC
DO NOT REPLY [Bug 22917] New: -
pretty-print feature trashes whitespace
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22917>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22917
pretty-print feature trashes whitespace
Summary: pretty-print feature trashes whitespace
Product: Xerces-C++
Version: 2.3.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Minor
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: aheinz@cs.indiana.edu
DOMWriterImpl.cpp:818
//skip ws if pretty print
if (getFeature(FORMAT_PRETTY_PRINT_ID))
{
if(XMLString::isAllWhiteSpace(nodeValue))
break;
}
It seems to me that this overrides the WHITESPACE_IN_ELEMENT_CONTENT_ID
feature, which I thought preserved all whitespace. I'm already working around
this problem by not pretty-printing but a simple fix would be to use:
if (getFeature(FORMAT_PRETTY_PRINT_ID) &&
!getFeature(WHITESPACE_IN_ELEMENT_CONTENT_ID))
In case you're wondering why I want to pretty-print and preserve whitespace,
it's because my XML is primarily data and any necessary text or whitespace is
enclosed by an element, so I'm already throwing away whitespace not enclosed
within said element.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org