Re: [xsl] Info on serializer property

Subject: Re: [xsl] Info on serializer property
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jan 2013 12:39:35 -0500
At 2013-01-29 17:53 +0530, wrote:
We are experiencing an issue with xml serializer after upgrading to WAS7
from WAS6.[IBM websphere]

We are serializing the XML file using below code which converts CARRIAGE
RETURN to &#13; in WAS7 within CDATA section of an element.


            Properties props =
            props.setProperty("omit-xml-declaration", "yes");
            Serializer serializer = SerializerFactory.getSerializer(props);






Can anyone please assist us on how to get this fixed?

Consider that in XML processing an input end-of-line sequence is always normalized to simply a LINE FEED (LF):
  "To simplify the tasks of applications, the XML processor MUST
   behave as if it normalized all line breaks in external parsed
   entities (including the document entity) on input, before
   parsing, by translating both the two-character sequence #xD #xA
   and any #xD that is not followed by #xA to a single #xA character."

So it looks like your WAS7 problem is on the input side of the system, not the output side. It looks like WAS6 was correctly interpreting end-of-line normalization in XML by throwing away the CR and converting CR-LF to simply LF.

But it means WAS6 never was preserving your CR ... it was properly converting the CR-LF to LF.

Your evidence is that WAS7 is not performing the end-of-line sequence translation on the way in, thus the internal data set contains the CR that should have been tossed out. The CDATA serialization is preserving that CR.

We are badly affected because of this.Awaiting your response

Talk to your supplier about the failure to abide by the XML rule cited above for input end-of-line-sequence normalization.

I hope this helps.

. . . . . . . . . Ken

p.s. this isn't an XSLT problem (though you may not have recognized that) so this isn't really the right forum

Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture:
Crane Softwrights Ltd.  
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile:
Legal business disclaimers:

Current Thread