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

RE: Testing if attribute node

Subject: RE: Testing if attribute node
From: kakridge@xxxxxxxxxxxxx
Date: Mon, 19 Jan 2004 21:05:01 -0500
xsl if attribute
I'm not exactly certain I understand what you are saying, but I will
attempt to help you.


<xsl:template match="elt">
	<xsl:if test="parent::*/attribute::*"> <!--if node has
attributes-->
		<xsl:value-of select="."/> <!--apply your processing-->
	</xsl:if>
</xsl:template>

<xsl:template match="elt/@match">
	<xsl:if test="parent::*/attribute::*">
		<xsl:value-of select="."/>
	</xsl:if>
</xsl:template>

</xsl:stylesheet>

I hope this helps.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David
Carlisle
Sent: Monday, January 19, 2004 8:35 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Testing if attribute node



test="self::* " is true on element nodes but not attributes.
A fuller test for all node types was posted on this list
the other day, it's probably in thef aq.

David
-- 
http://www.dcarlisle.demon.co.uk/matthew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 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.