Subject: Re: xsl:attribute problem
From: Jens Laufer <jens@xxxxxxxxxxxxxx>
Date: Mon, 2 Dec 2002 15:02:44 +0100
|
Am Montag, 2. Dezember 2002 13:29 schrieb Andrew Welch:
> You will need a named template, such as
>
> <xsl:template name="php">
> <xsl:param name="value" select="'no param set'"/>
> <xsl:text disable-output-escaping="yes"><?</xsl:text>
> <xsl:value-of select="$value"/>
> <xsl:text disable-output-escaping="yes">?></xsl:text>
> </xsl:template>
>
> and then call the template using
>
> <xsl:call-template name="php">
> <xsl:with-param name="value" select="something"/>
> </xsl:call-template>
>
> whenever you want to output <? param text ?> etc...
>
> cheers
> andrew
Hi Andrew,
thanks for your quick answer.
I just did like you suggested:
With Xalan I get something like that:
<a
href="%0A%20%20%20%20%20%20%20mailto:%0A%20%20%20%20%20%20%20%20<?php%20echo%20$email?>"><?php
echo $email?></a>
It seems that Xalan is doing an implicit URL encoding. Any idea to get rid of
that?
With Resin (www.caucho.com) I get an error:
... attribute `href' outside element.
regards,
jens
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|