[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Testing if attribute node
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|