Re: [xsl] How recursively iterate over entire document?

Subject: Re: [xsl] How recursively iterate over entire document?
From: chris <oneskiingfool@xxxxxxxxx>
Date: Thu, 11 Aug 2005 16:47:50 -0600
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@xxxxxxxxxxxxxxxx> 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

Current Thread