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

RE: Output a default value for an empty node

Subject: RE: Output a default value for an empty node
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Wed, 6 Oct 2004 16:57:07 +0100
welch and space and empty
> test="string-length(member_name)=0"
>
> is probably fractionally better written as
>
> test="string(member_name)"
[snip]
> Or perhaps best of all is to directly code in xpath what you
> said in English, that there is no text child (rather than
> saying the effective string value is the empty string) that would be
>
> test="not(member_name/text())"


I thought the usual answer to this kind of query was to use
normalize-space():

<xsl:if test="normalize-space(member_name)">

Has this changed or is this a different case?

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.