Xpath and parameters

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-03-19T11:56:31Z Indexed on 2010/03/19 12:31 UTC
Read the original article Hit count: 351

Filed under:
|

I am relatively new to XSL and I think this is a basic question. So I better get my apologies in early!

Basically, I would like to use a value-of function. This will be in a template and I would like to pass part of the xpath as a parameter.

<xsl:variable name="TEST_VAR">"h:elementA/elementB"</xsl:variable>

... and then use the variable  (or passed in param) as all (or part) of the xpath:

<xsl:element name="transformedElement"><xsl:value-of select=$TEST_VAR/></xsl:element>

I would really like to have the xpath to be a mixture of string literals and the vlue of TEST_VAR.

Thanks in advance

© Stack Overflow or respective owner

Related posts about xsl

Related posts about xpath