dynamic testing of an attribute

Subject: dynamic testing of an attribute
From: "Christof Schneider" <Christof_Schneider@xxxxxx>
Date: Sun, 29 Oct 2000 23:02:38 -0400 (EST)
[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


Current Thread