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

Re: Q on incremental processing and count()

Subject: Re: Q on incremental processing and count()
From: Tobias Kiesling <kiesling@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Feb 2002 16:59:25 +0100
tobias kiesling


Jeni Tennison wrote:


However, from the symptoms that you describe (I'm guessing here - I don't know how Xalan works internally), as soon as you do include a count() function, Xalan thinks that the stylesheet involves using information that is not yet accessible to it, and so reverts to the more common processing model where it constructs the whole source tree prior to transformation.

Independant of the way xalan-j is working, it is not possible for an incremental processor to output the result of a call to the count function before the expression inside the count() is completely evaluated. E.g.:

<xsl:template match="table">
 <xsl:value-of select="count(thead/th-c)"/>
</xsl:template>

Here, the result of the call to count() is only available at the end of the table, as it is not known before how much th-c elements will be contained inside thead elements in the table element.

From a processing point of view the second xpath that Michael proposed (count(thead[1]/th-c)) should do the right job, as the processor does not have to wait until the end of the table element, but just until the end of the first thead element (which should be the only one).
It seems that xalan does not output as soon as would be possible in this case.

Regards,
 Tobias



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.