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

matching elements with no attributes

Subject: matching elements with no attributes
From: Elena Pierazzo <pierazzo@xxxxxxxxxxxxx>
Date: Wed, 24 Sep 2003 13:02:20 +0200
 matching elements with no attributes
Hi all,

Is there a way to match an element just when the element itself has no attributes?
For example, in my text I have:

<l>bla bla bla</l>
<l part='F'>bla bla</l>
<l part='I'>bla bla</l>

I want to declare different rules for <l> when it has no attributes and when he has attributes. I've tryed using
<xsl:when test="l[@part='I']">

   <xsl:when test="l[@part='F']">

   <xsl:otherwise> <-- used for an l element with no attributes -->


but it doesn't work because I need to declare the same variable for the first xsl:when and for the xsl:otherwise.
Many tanks in advance

Elena Pierazzo

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

Current Thread


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.
First Name
Last Name
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.