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:template name="process-parameters">

              <xsl:for-each select="doc($PARAM-FILE)/param-list/param">

                     <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="."/>

                    

              </xsl:for-each>

       </xsl:template>

 

...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...

 

Thank you.

 

Cary Millsap
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Nullius in verba

Upcoming events:
-
Hotsos Symposium 2005: March 6–10 Dallas
- Visit
www.hotsos.com for curriculum and schedule details...