XSL: Get variable data without exslt:node-set

Posted by Louis W on Stack Overflow See other posts from Stack Overflow or by Louis W
Published on 2011-01-11T21:15:58Z Indexed on 2011/01/11 21:53 UTC
Read the original article Hit count: 298

Filed under:
|

Using native XSL lib in PHP. Is it possible to get a node value inside a variable without having to call it through exslt:node-set every time.... it long and ugly.

<xsl:variable name="mydata">
    <foo>1</foo>
    <bar>2</bar>
</xsl:variable>


<!-- How currently being done -->
<xsl:value-of select="exslt:node-set($mydata)/foo" />


<!-- I want to be able to do this -->
<xsl:value-of select="$mydata/foo" />

© Stack Overflow or respective owner

Related posts about php5

Related posts about xslt