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
--~------------------------------------------------------------------
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>
--~--