* 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. ...
...
It doesn't tie you to a language if you perform the preprocessing with XSL. I worked in a team that
developed an abstract formalism to define a conversion. This XML formalism was converted to XSL
using XSL and appeared very powerfull in the end, as multiple stylesheets for slightly different
tasks could be generated from it. :-)
On one hand you find that the formalism is less powerfull as you want to hide XSL niche for the
writer of the definition file. But it gives the opportunity to introduce shorthands for complex XSL
tasks. I recently gave a solution for wrapping random sequences of particular elements in other
elements that leans on the mode attribute quite heavily, which is difficult to maintain. In the
formalism, it was just one command with which you merely say: 'I want to group (or wrap) sequences
of nodes that match the following expression within the context of this or that.' Worked pretty much
like a charm...
Grtz,
Geert
--~------------------------------------------------------------------
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>
--~--