[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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)
dynamic testing
[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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.