xsl-list
[Top] [All Lists]

Re: How recursively iterate over entire document?

2005-08-11 15:47:50
Wendell,
Thanks for your response.  Sorry, I neglected to say that I am using
XSLT 2.0.  As for generating stylesheets to generate stylesheets...
that's an idea I hadn't thought of.  That gives me some new
possibilities to think about.
I can do this sort of thing fairly easily with DOM, but I really
wanted to use the advanced xpath 2.0 features that are not available
to me there.
I'll keep hacking at it... maybe it will be a DOM/XSLT hybrid solution.


On 8/11/05, Wendell Piez <wapiez(_at_)mulberrytech(_dot_)com> wrote:
Chris,

What you are trying to accomplish in a single pass defies the processing
model for XSLT 1.0. If you could map out the dependencies between the
different settings explicitly, it might not be completely inconceivable
under XSLT 2.0, but it's not a task I'd relish. I'd probably be inclined to
start with the assumption that N passes over the data may be needed, where
N is the number of assertions you are making.

While evaluate() may be handy, I'd suggest you try thinking through how
you'd do this without it -- writing a stylesheet to generate stylesheets.
You could, in fact, generate a suite of stylesheets to be executed
consecutively over your data in a (longish) pipeline (they'd all be
variants of the identity transform, except amended with logic from your
settings). This would have the virtue of clarifying the dependencies. Your
process expects x to happen before y -- but the XSLT processing model
doesn't support that specification explicitly (it's designed so processors
can execute steps in parallel if they like).

This is sort of like trying to repair your engine while your car is moving
at 65mph on the highway.

Cheers,
Wendell

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