Re: how can check whether an attribute exists or not?
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
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