Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: how to access attribute value as an expression how to access attribute value as an expressionTo: NULL Date: 11/3/2004 8:24:00 AM i have created a temporary Node, to pass it as parameter to a
"generator" template that is supposed to produce a html table, with 2
columns (or whatever):
--------------
Desc. | Value
--------------
Desc. | Value
and so on, now I can't get the "description" from the XML, so I made
myself a few attributes inside the Nodes Element to assign them to
elements from the XML file, and I can read the elements name, but I
need the self-made attributes "value" to access the current elements
value, I hope i can make myself clear here?! ;)
my temoprary Node:
<xsl:variable name="FileInfo">
<xsl:element name="tempNode">
<xsl:attribute name="Dateiname">ID</xsl:attribute>
<xsl:attribute name="Beschreibung">Description[@Language='de']</xsl:attribute>
</xsl:element>
</xsl:variable>
generator template:
<xsl:template name="TableGenerator">
<xsl:param name="heading"></xsl:param>
<xsl:param name="tnode"></xsl:param>
<tr>
<th>
<xsl:value-of select="$heading"/>
</th>
</tr>
<col span="3" width="100"/>
<xsl:for-each select="$tnode/@*">
<tr>
<td>
<xsl:value-of select="name()"/>
</td>
<td>
<xsl:value-of select="."/>
</td>
</tr>
</xsl:for-each>
</xsl:template>
and this: <xsl:value-of select="."/>
doesn't work, because it only gives me the attributes value-string, so
it looks like
Beschreibung | Description[@Language='de']
instead of
Beschreibung | this is a description text from the xml
thanks for helping! i'm kinda new to XSL ;)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
