|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Easy one! variables & documents)
> I GOT IT!!!!!!
>
> <xsl:for-each select="@*">
> <xsl:variable name="name" select="name()"/>
> <tr>
> <td><!-- lookup text for display in xml template -->
> <xsl:value-of select="$xmTmplt[@name=$name]/@text"/></td>
> <td>
> ....
>
> Is this the way to do it? Did I need to declare the variable
> name, or could I have accessed name directly from the select?
You could have used
<xsl:for-each select="@*">
<tr>
<td><!-- lookup text for display in xml template -->
<xsl:value-of
select="$xmTmplt[@name=name(current())]/@text"/></td>
<td>
but using a variable is probably better coding style.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








