Posted by andybdi on 08/29/07 12:27
I am playing with a few xml feeds changing them into different formats
and merging them with others, and have found that when using cdata-
section-elements salbatron adds an extra line break at the begining
and end of the cdata tags. e.g.
Inital code is
<text>blah blah</text>
This gets changed to
<text>
<![CDATA[blah blah]]>
</text>
Thats not the end of the world but when i then process this feed and
merge it with other stored feeds I use xsl:copy-of to simply copy that
node. cdata-section-elements is used again but this time it assumes
that the line breaks are part of the text and keeps them in so the
resulting code is
<text>
<![CDATA[
blah blah
]]>
</text>
If the merge transformation is run again then it will again assume the
line breaks outside the <![CDATA[ are part of it again so the code
will be
<text>
<![CDATA[
blah blah
]]>
</text>
This keeps on occuring adding more and more line breaks into the
text. I can use normalize-space in the presentaiton of the text but
woudl prefer not to have to. it also means that I end up with files
that are very long and full of line breaks.
Does anyone have any ideas why this is happening and how to stop it.
Thanks for your help
Navigation:
[Reply to this message]
|