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

Testing if attribute node

Subject: Testing if attribute node
From: Marcus Andersson <marcan@xxxxxxx>
Date: Tue, 20 Jan 2004 02:17:17 +0100
testing in elt
Hi

I'm genenerating stylesheets (with XSLT) from the following XML fragment (example):

<rule match="elt"/>
<rule match="elt/@someattr"/>

Those rules gives me templates after a transform:

<xsl:template match="elt">
...
</xsl:template>

<xsl:template match="elt/@someattr">
...
</xsl:template>

I want to do some conditionals inside the templates based on whether the current node is an attribute or not. Is that possible to do?

My alternative, as I see it, is to parse the match attribute when I generate the stylesheet and put a variable inside the templates but I really don't want to do that.

Any suggestions are welcome (even those that completely alters my approach :)

/Marcus

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.