Subject: Re: [xsl] 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 |
> 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 ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Writing array elements ba, neil cave | Thread | Re: [xsl] Writing array elements ba, Florent Georges |
Re: [xsl] Writing array elements ba, neil cave | Date | [xsl] XPath "none" /type/ not avail, Florent Georges |
Month |