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

Re: optimization of complex XPath

Subject: Re: optimization of complex XPath
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 19 Nov 2010 09:41:11 +0000
Re:  optimization of complex XPath
On 19/11/2010 09:24, Wolfgang Laun wrote:

What's the fastest and memory-cheapest way to extract these links and targets to two different (or even a single) plain text files? Post-processing with utilities such as grep, sort -u and comm wouldn't be "complex". -W

The streaming facilities in Saxon-EE 9.3 (or, in fact, in previous releases) make it reasonably easy to extract the links and targets to a single file in one streaming pass over the input, or to two files in two passes over the input.


Producing two output files from a single pass of the input is a problem well-known to the working group (we call it the "coloured widgets problem", after a use-case put forward by Oliver Becker) and the current solution in the spec is the xsl:fork instruction, not yet implemented in Saxon. The only way to do it in Saxon would be with side-effectful extension functions, or some kind of clever use of xsl:message with a user-written MessageListener.

The streamed merging/comparison of two sorted inputs is handled in the spec using the xsl:merge instruction - that's not implemented in Saxon 9.3 but we're working on it right now.

Michael Kay
Saxonica

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.