|
Subject: RE: [xsl] Easy one! variables & documents) From: "Michael Kay" <mhk@xxxxxxxxx> Date: Thu, 1 May 2003 09:28:38 +0100 |
> 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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Easy one! variables & do, Michael Kay | Thread | [xsl] how to get rid of tag names, Smirnov, Anatoliy |
| RE: [xsl] Easy one! variables & do, Michael Kay | Date | RE: [xsl] document() access. The co, David . Pawson |
| Month |