This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
dynamic testing of an attribute
- To: "xsl-Mulberry List" <xsl-list at mulberrytech dot com>
- Subject: dynamic testing of an attribute
- From: "Christof Schneider" <Christof_Schneider at gmx dot de>
- Date: Sun, 29 Oct 2000 23:02:38 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
[NT2000] [TOMCAT3.1] [COCOON 1.8 - XALAN]
I liked to know, wether an attribute for a the
current node exists. The attribute's name is
stored in an variable, say $attname !
I tried the following:
<xsl:if test="./@*[name()=$attname]"> //does not work!
<foo>
<!-- add value of the $attname attribute to the tag foo as attribute -->
<attribute name="width">
<xsl:value-of select="???"/> //how to specify the value of the
attribute?
</attribute>
</foo>
</xsl:if>
Any help appreciated! TIA!
- Christof
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list