xsl-list
[Top] [All Lists]

Re: build a select clause or dynamic URI's

2004-11-10 16:09:44
On Wed, 10 Nov 2004 07:52:24 +0800, Andy Dent 
<dent(_at_)oofile(_dot_)com(_dot_)au> 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
correctly:

* 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
statements.

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
  dpadams(_at_)gmail(_dot_)com
 Bermagui 2546 NSW
---------------------------------------------