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

Re: how can check whether an attribute exists or not?

Subject: Re: how can check whether an attribute exists or not?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 31 Jan 2001 10:01:45 GMT
xsl test whether attribute exist
   David Carlisle a écrit :

I regret to say my French is even worse than my English (which as any
reader of this list will know, is pretty bad:-)

   > > <xsl:when test="@href=''">
   >
   > That tests if the string value is empty, which is true if there isn't an
   > attribute or of it s explictly empty.
   >

   you mean that if i have:
   <ok>my_string</ok> in my XML file

   i could test <xsl:when test="@ok=''">
   to know if my_string is empty or not ?


No I meant the string value of the attribute, not the string value of
the element (that's what the @ is doing) but without the @:

 <xsl:when test="ok=''">

(if executed in a template for the parent element) would test if the
first ok child had an empty string as its string value (which isn't the
same as it being empty, <ok><xxx/></ok> would test true for the above
test It would also be true if there were no ok elements.

David

 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.