RE: [xsl] XSLT Transform cdata-section-elements split up

Subject: RE: [xsl] XSLT Transform cdata-section-elements split up
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Wed, 9 Jun 2004 09:19:55 +0300
Hi,

> Now before the upgrade, I used to get this as my
> output:
> 
> <AdditionalText>CDATA[["PrimaryAlert~;~|AlertID~;~|~|AlertKey~

Note here that the contents of AdditionalText is not inside a CDATA section, it starts with "CDATA[[", not with "<![CDATA[".

> |xyz/5/4/351/6/20002/NA_chronic~;~|~|TimeStamp~|06/04/2004
> 12:11:23
> CST~;~|Alert~;~|~|Layer~|2~;~|~|CustomerName~|~;~|~|Classifica
> tion~|NFO~;~|~|Severity~|Major~;~|~|Domain~|METRO~;~|~|NodeOrS
> witchName~|xyz~;~|~|Component~|XYZ-T3-12-XYZ
> XYZ 5.4~;~|~|Reason~|Fail LOS (Chronic - 2 Failures in
> 5 minutes)~;~|~|BMPTktID~|~;"]]</AdditionalText>

And here it ends with "]]", not "]]>". Most probably the earilier version of Xalan had a but in the serialization of CDATA sections.

> <AdditionalText><![CDATA["PrimaryAlert~;~|AlertID~;~|~|Al]]><!
> [CDATA[ertKey~|xyz/5/4/351/6/20002]]><![CDATA[/NA_chronic~;~|~
> |TimeStamp~|06/0]]><![CDATA[4/2004
> 12:11:23
> CST~;~|Alert~;~|]]><![CDATA[~|Layer~|2~;~|~|CustomerName~|~;]]
> ><![CDATA[~|~|Classification~|NFO~;~|~|Sev]]><![CDATA[erity~|M
> ajor~;~|~|Domain~|METRO~]]><![CDATA[;~|~|NodeOrSwitchName~|xyz
> ~]]><![CDATA[;~|~|Component~|XYZ-T3-12-XYZ
> XY]]><![CDATA[Z 5.4~;~|~|Reason~|Fail LOS
> (Chr]]><![CDATA[onic - 2 Failures in 5
> minutes)~]]><![CDATA[;~|~|BMPTktID~|~;~;"]]></AdditionalText>
> 
> Is it something I'm doing wrong?  A missing setting
> somehow?  Is there a way to make it so CDATA doesn't
> get split up like this?  Perhaps specify a maximum
> length somehow?  

No, this must be a yet another but, because there are not character sequences that would force the CDATA section to be broken into multiple sections. i.e. "]]&gt;" or characters that cannot be represented in UTF-8 encoding. Have you tried to use another XSLT engine (via JAXP API)?

Cheers,

Jarno - Neurotic Fish: Bonus Track

Current Thread