xsl-list
[Top] [All Lists]

Re: [xsl] Writing array elements based on a an evaluation of one of the child elements

2006-05-24 04:29:03

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
test="(//ACCOUNT-NO/text())[1]"
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.

David


________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--