Re: union vs. "or" vs. contains?
At 08:11 PM 10/19/2004, you wrote:
But this is precisely the advantage of implementing the different processing pathways by using layered modules (a core module plus a separate stylesheet "shell" for each processing pathway), rather than using testing-against-parameters.
Mm-hmm. Except there are generally various ways you can avoid the user having to choose. Delegation to the correct stylesheet can be done by a separate layer.
Whatever I do, I want to keep processing completely controlled by the configuration file.
Maybe someone on this list who knows Ant better than I do (it's on my list!) can comment on how Ant (a Java build framework) could query a configuration file to determine which stylesheet to call when a job is invoked. A poor man's version of the same (though of course Ant is free) could use a batch file to run a transform on your config file, to create another batch file (in which the delegation could be managed), and then execute it. In other words, these things can be done.
As the primary maintainer, however, only you, however, can determine whether the extra layer is too high a price to pay for stylesheet code that is comparatively clean and easy to maintain and extend.
(Personally I don't think it's too much to ask someone to use X stylesheet if they want X, and Y stylesheet if they want Y, but this isn't my call. :-)
It's not that it can't be done this way; it's just much more cumbersome and hard to maintain. (Giving XSLT the reputation of being "hard".)
It's precisely the proliferation of modes and parameters that this architecture is designed to mitigate. Namespaces are a different matter....
If the citation-class is implemented as simply a call to a special 'author-year' stylesheet (or whatever), all the templates particular to that kind of processing can be in that stylesheet, with no variable testing anywhere at all.
No it's not, although such "dynamic imports" have frequently come up as a desideratum. Maybe Mike, David or Jeni can remind us of how XSLT 2.0 envisions such things being done.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format