[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: union vs. "or" vs. contains?

Subject: Re: union vs. "or" vs. contains?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Oct 2004 11:44:13 -0400
union vs separate queries
Hi Bruce,

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.

Is this your original suggestion, whereby the user must choose the stylesheet to invoke?

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".)

I don't find my current approach at all difficult to make sense of or maintain, actually; at least not on this count (I get much more confused with all of the modes, namespaces, and parameters being thrown around!).

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.

How are you precisely envisioning this? In my ideal world, I'd be able to choose which files to include based on the parameter, but I guess that's not possible.

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.


Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.