Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


how to access attribute value as an expression

From: schnitzel2000@---.-- (----- -------)
To: 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 ;)


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent