You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by GB <gu...@neurosoft.fr> on 2002/07/18 09:55:51 UTC

Parameters and the select attribute inside xsl:apply-templates.

Dear Xalan users,

I was wondering if I can use  a parameter value inside the select of an
xsl:apply-templates.

What I want to do here is to give at execution time an XPATH to my
stylesheet to only process a given extract of an xml file.

I've done this test (the parameter is given to the stylesheet at execution
time) :

<!-- start of stylesheet -->
<xsl:param name="value"/>
<xsl:template match="/">
<html>
    <body>
        <xsl:apply-templates select="$value"/>
    </body>
</html>
</xsl:template>
<!-- end of the stylesheet -->

Which doesn't work ....

Any idea ????

Thanks a lot for your help.

Guy Bobenrieth







Re: Parameters and the select attribute inside xsl:apply-templates.

Posted by Ralf Steppacher <st...@esteam.de>.
Hi Guy,

> <xsl:apply-templates select="$value"/>
 >
> Which doesn't work ....

Try <xsl:apply-templates select="{$value}"/>

See http://www.w3.org/TR/xslt#attribute-value-templates.


Cheers.
Ralf