[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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 6 Oct 2004 15:02:47 +0100
RE:  Output a default value for an empty node
> test="string(member_name)"
> 
> because that saves it counting the length of a string 
> (strings used in a
> test are true if non-empty, so you don't really need the 
> length) on the
> other hand Mike will probably tell us saxon special cases 
> tests against
> string-length = 0 and produces the same code in both cases.
> 

Indeed, it does.

string-length() is a more expensive function than you might imagine because
of the need to go through the string looking for Unicode surrogate pairs
(assuming strings are stored in UTF-16, as they are in Java).

Michael Kay
http://www.saxonica.com/

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.