Re: paths starting with "//" are invariant?

Subject: Re: paths starting with "//" are invariant?
From: "Mark D. Anderson" <mda@xxxxxxxxxxxxxx>
Date: Mon, 20 Dec 1999 08:25:19 -0800

--On Monday, December 20, 1999 9:42 AM +0000 David Carlisle <davidc@xxxxxxxxx> wrote:
> I _think_ that what you want is (1) which isn't directly supported
> and you are trying to fake it with (3) combined with an identity
> transformation, so the result tree looks similar to the input, and a
> node-set() extenson function to convert it back to the input nodes.
> But that seems to be a long way round and gets you something equivalent
> to (2). So I am confused as to what you _do_ want.
> 
> The nearest you can get to (1( is to make named templates that use the
> expression in an apply-templates, and get different effects at different
> times by passing different parameters to the templates.

my goal is for the expression "a|b" (which is actually 200 characters long) to
appear only once, just for maintenance reasons.
I also don't want the caller to know exactly what it is -- I want
"main" to be able to import one set of templates that includes the
definition of this expression, and a *different* set of templates that
is capable of doing things to the result of this expression.

that is how i got to this procedural look to my code. i does "feel" wrong
for xslt as a language. i will meditate further on your recommendation.
in the obvious way of doing it i end up wanting to parameterize the
name of a lower-level template, which we all know can't be done, it
being a qname. but i think it can be done without that; i'll just
have to unscramble my brain from the current flow.

i think part of the problem is i have no exemplar for how to organize
xslt when it gets > 10 pages of code.
so i adopted cuts of modularization that would make sense for other
languages.

thanks....

-mda


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread