RE: [xsl] Testing if attribute node

Subject: RE: [xsl] Testing if attribute node
From: kakridge@xxxxxxxxxxxxx
Date: Mon, 19 Jan 2004 21:05:01 -0500
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: [xsl] 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