CDATA issue
Hi
I have asked a question fez days ago, I got my answer (thanks a lot) now I would like to use a CDATA and I have a huge issue
here is my XML
<?xml version="1.0" encoding="UTF-8"?>
<text>You have to pay
<amount>18 000</amount > for this car
</text>
and my XSL
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" indent="yes" cdata-section-elements="data"/>
<xsl:template match="text">
<data>
<xsl:apply-templates />
</data>
</xsl:template>
<xsl:template match="amount">
<xsl:apply-templates /> $
</xsl:template>
</xsl:stylesheet>
I get this weird output:
<?xml version="1.0" encoding="UTF-8"?>
<data><![CDATA[You have to pay
]]><![CDATA[18 000]]><![CDATA[ $
]]><![CDATA[ for this car
]]></data>
but I would like to have
<data><![CDATA[You have to pay 18 000 $ for this car]]></data>
without all these CDATA and those whitespaces and return. Did I miss a parameter?
Thank you
Seb
|