Re: [xsl] build a select clause or dynamic URI's

Subject: Re: [xsl] build a select clause or dynamic URI's
From: David Adams <dpadams@xxxxxxxxx>
Date: Thu, 11 Nov 2004 10:09:44 +1100
On Wed, 10 Nov 2004 07:52:24 +0800, Andy Dent <dent@xxxxxxxxxxxxx> wrote:
> I'm trying to construct some generic XSLT patterns for processing
> typical GML documents and am struggling with a dynamic path following
> issue. I've over 20 years in software development and a moderate XSLT
> semantic understanding but am not yet at guru level. 

I turned to this list with a similar question a few months ago. It
seemed to me that dynamic XPath expression would be a common
requirement but, evidently, it isn't. The members of the list
suggested at least the following alternatives, if I remember

* Use a processor-specific eval() call.

* Pass in an XML tree/fragment as a parameter that has the necessary
data. If you can generate this tree dynamically before calling the
transformation, you're in good shape.

* Pre-process or dynamically create the XSLT to include complete XPath
statements. When the XSLT is processed, the XPath statements are
static but any two invocations are likely to have very different

I had already gone the pre-processing route and have stuck with it.
Obviously, this approach requires an extra step, an extra piece of
software, and ties you to specific languages/environments. If I read
your messages correctly, you're hoping for a general solution than
people using different environments can use. All of the approaches
sketched above fail to meet this goal. In the case of pre-processing,
perhaps you could write samples for PHP and whatever else people are
likely to use to interact with your system.

 David Adams
 Bermagui 2546 NSW

Current Thread