This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Variable value and functions


> I want to get the value of a variable whose name is equal to the value
> of the "id" attribute found in the current node.

You can't. There is no way in XSLT of constructing XPath expressions (e.g.
variable references) at run-time.

There's a workaround in Saxon, the saxon:expression() function:

 <xsl:value-of select="saxon:expression(concat('$', @id))"/>

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]