cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <jheini...@virbus.de>
Subject Re: AW: Specifying XSL sheet for client side translation in XSP?
Date Thu, 03 Jan 2002 13:13:35 GMT
> Use a stylesheet like this (i called it "add_stylesheet_pi.xsl"):
> 
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:strip-space elements="*"/>
> <xsl:param name="stylesheet"/>
> <xsl:template match="*">
>   <xsl:text disable-output-escaping="yes">&lt;?xml-stylesheet
> type="text/xsl" href="</xsl:text><xsl:value-of
> select="$stylesheet"/><xsl:text
> disable-output-escaping="yes">"?&gt;</xsl:text>
>   <xsl:copy-of select="."/>
> </xsl:template>
> </xsl:stylesheet>


Why not using <xsl:processing-instruction>?

<xsl:processing-instruction name="xml-stylesheet">
     <xsl:text>type="text/xsl" href="</xsl:text>
     <xsl:value-of select="$stylesheet"/>
     <xsl:text>"</xsl:text>
</xsl:processing-instruction>

In general try to avoid disable-output-escaping!

Regards,

Joerg


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message