logo       

Whitespace handling in XUpdate: msg#00240

text.xml.exist

Subject: Whitespace handling in XUpdate

Hi,

I'm finding that whitespace in my text() nodes is being stripped by the XUpdate process. I think I've tracked it down to org.exist.xupdate.XUpdateProcessor, whose startElement() and endElement() methods are explicitly stripping whitespace using charBuf.getNormalizedString(FastStringBuffer.SUPPRESS_BOTH) [and thereby making all my xml:space="preserve" attributes moot].

Why is XQueryProcessor doing BOTH of these: ignorableWhitespace() is ignoring whitespace AND explicitly stripping whitespace? I think the SUPPRESS_BOTH is not correct, as it overrides xml:space. Am I wrong? Is there a better way to preserve whitespace if requested, other than tracking all the xml:space attributes (they need to be stacked, as ancestors apply their settings to descendents, etc.)?

Luigi


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise