From: email@example.com [mailto:firstname.lastname@example.org] On Behalf Of Cary Millsap
Sent: 28 February 2005 22:46
Subject: [saxon] Using evaluate() to define a list of params
I would like to be able to slurp a list of name/type/value tuples from an external XML document, and then execute a loop to make all the assignments found in that external document. I really want to do this:
<xsl:message>Processing <xsl:value-of select="@name"/>...</xsl:message>
<!-- Here's what I'm trying to do... -->
<xsl:variable name="@name" as="@as" select="."/>
...But of course, the “name” and “as” attributes of the xsl:variable and xsl:param elements aren’t allowed to be defined dynamically.
I want to avoid maintaining the variable names in both the external XML document and in my XSLT. I feel like I ought to be able to use evaluate() to take me there, but it’s just not coming to me...