It is not permitted in XSLT 1.0 for the use expression in a key definition
to refer to any variables.
This restriction is removed in XSLT 2.0 (they have to be global variables,
of course).
So you could write use="*[name()=$TABLE_NAME]".
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Karl J. Stubsjoen [mailto:karl(_at_)meetscoresonline(_dot_)com]
Sent: 09 September 2004 06:43
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Keys
How do you manage this sort of key:
<xsl:key name="attType"
match="/root/*/xml/s:Schema/s:ElementType/s:AttributeType"
use="/root/*[(_at_)name()]"/>
I am trying to create a "USE" on a specific node who's name
can very so:
root/class
root/house
root/bird
This select works great:
<xsl:for-each
select="/root/*[name()=$TABLE_NAME]/xml/s:Schema/s:ElementType
/s:AttributeTy
pe">
Where $TABLE_NAME is a variable.
Karl
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--