This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dynamic testing of an attribute


[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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]