[XSL-LIST Mailing List Archive Home]
Re: [xsl] Best approach for writing an XML log whilst processing/writing other XML documents?
Subject: Re: [xsl] Best approach for writing an XML log whilst processing/writing other XML documents?|
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 15:21:12 +0100
>From Dr. Kay's reply, it sounds like this is being looked into for
XSLT 2.1; I hope something can be worked out eventually as I for one
would definitely use such a feature!
Something like result-document indicating multiple output
destinations, specifying each with an identifier and one as the
default. Then xsl:sequence etc. can have an optional attribute to
specify an output using the identifier (and default otherwise) ?
Sounds like a fun problem :-)
We tried something along those sort of lines - it got horribly messy and
we abandoned it.
We came up with xsl:fork
where basically you write your logic as two passes over the data, and
then say to the processor that you want both passes to operate in parallel.
It allows the two passes to do completely different navigation of the
input (e.g. they don't have to select exactly the same nodes), which is
good for the general use case, but not ideal where you want them both to
do exactly the same navigation.
The other interesting question is whether xsl:fork really needs to be
written by the user, or whether it's the kind of thing that one should
leave to the optimizer.