|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: possible value-of return values
> Given the following XML document: > <root> > <user name="Alex" password="Elephant" color=""/> > <user name="Reuter" password="Rhino"/> > </root> > I was wondering if anyone knew the distinction in return > values between: > <xsl:value-of select="/root/user[@name='Alex']/@color"/> > And > <xsl:value-of select="/root/user[@name='Reuter']/@color"/> > They are both empty strings. > My guess is they would both be null, but I need to execute logic which > hinges on whether the attribute exists and has a null value > OR whether it exists at all. > You can test whether the attribute exists: xsl:if test="/root/user[@name='Alex']/@color" Mike Kay Software AG 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
|

Cart








