[xslt] Text output with <xsl:document>



  Hello,

 I'm facing different behaviour of CDATA section
when inside an <xsl:document> while using the
text method to produce my document. Newlines are
inserted after each CDATA section. This does not
happen in the CDATA section is not in an <xsl:document>
 Here is a simple stylesheet to test :

<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:variable name="incl">foo</xsl:variable>
<xsl:document href="test.out" output="text" omit-xml-declaration="yes"
encoding="ISO-8859-1">
<![CDATA[#include <]]><xsl:value-of select="$incl"/>.h<![CDATA[>]]>
bar
</xsl:document>
</xsl:template>
</xsl:stylesheet>

 I hope to get the same result in test.out as in standard output when
i'm not using <xsl:document>

 My guess is that the behavior when nested with <xsl:document> is
incorrect but since <xsl:document>
is not standard... At least it would be cool to have the same behavior
in booth cases.

 Regards,

	Fabrice 

-- 
Fabrice Desré - France Telecom R&D/DMI/GRI
Tel: +(33) 2 96 05 31 43
Fax: +(33) 2 96 05 32 86




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]