Re: [xslt] Text output



"William M. Brack" wrote:
> 
> I don't think I understand the problem - when I do a simple example
> stylesheet:
> 
>   <?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" encoding="iso-8859-1"/>
>   <xsl:template match="/">
>     <xsl:text>
>       &lt;entities inside xsl:text&gt;
>     </xsl:text>
>     &lt;just a little junk&gt;
>     <xsl:apply-templates/>
>   </xsl:template>
>   </xsl:stylesheet>
> 
> and then apply it against an equally simple xml file:
> 
>   <?xml version="1.0" encoding="iso-8859-1"?>
>   <TOP>
>     &lt;XML data&gt;
>   </TOP>
> 
> then run our old, reliable xsltproc I get:-
> bill@billrouter:/usr/src/libxslt-0.9.0/libxslt$ ./xsltproc bb.xsl bb.xml
> 
>   <entities inside xsl:text>
> 
>   <just a little junk>
> 
>   <XML data>
> 
> What am I missing?

 I don't know. With libxslt/xsltproc 0.9, it just fails.
I succeeded using :
<xsl:text disable-output-escaping="yes"><![CDATA[<foo>]]></xsl:text>

 Thanks for your help

	Eugène




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