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

Re: Writing array elements based on a an evaluation of

Subject: Re: Writing array elements based on a an evaluation of one of the child elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 24 May 2006 12:21:09 +0100
Re:  Writing array elements based on a an evaluation of
> THat and the fact that I should be evaluating 
> string-length(//ACCOUNT-NO/text()) > 0 ) 

are you sure that is the expression that you want?
There is never any need to test if the string length of a text node is >
0 as that is a constraint on the node type (in XSLT1). so the only
effect of using the string-length function is to silently discard all
but the first text node,

test="string-length(//ACCOUNT-NO/text()) > 0"
is the same as
also it is a bit suspicious (and certainly inefficient) to start this
test with // as it means that it always searches the entire document and
tests the first ACCOUNT-NO that it finds, it does not depend on teh
current ACCOUBT-LIST element. So within a given document this is always
true or always fale so it could be a global variable, ther eis no need
to work it out again each time you execure a template.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread


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.
First Name
Last Name
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.