xsl-list
[Top] [All Lists]

[xsl] Onion-skin overriding stylesheet

2011-09-07 03:50:31
The onion-skin overriding stylesheet that can redefine global
declarations is fascinating, and I would like to hear more about what
experience you have actually making solutions that way.

We can customize a stylesheet with global parameters, we can have XML
config files to be loaded as part of a transformation, so when exactly
is it that the onion-skin overriding stylesheet is attractive for
customization and maintenance?

Is the onion-skin mostly something we can use as a last resort if some
unforeseen maintenance or customization need suddenly pops up, or is
it often the most attractive approach to maintenance and customization
from the beginning?

As far as I know, no matter what a stylesheet looks like, we can
always import and override it in another stylesheet. But if the
original stylesheet is mostly one big template with many xsl:for-each,
we will have to recreate most of the original stylesheet in the
overriding stylesheet, and that is not that attractive.

If we on the other hand use xsl:apply-templates as much as possible,
and match the input as detailed as possible, using very many
templates, if we use a lot of global variables even if only used once,
etc., etc., it is possible to override many details in a stylesheet
with just a line or two in the overriding stylesheet.

Also if we have important functionality made with a lot of functions,
we can include the logic in named templates or in xsl:function to make
it much easier to override in the importing stylesheet.

Is the onion-skin approach to stylesheet making so attractive, that we
should make it a habit always to prepare for it, should we so to speak
"override" optimize our stylesheets to make them as easy as possible
to override (to maintain, to customize)?

Cheers
Jesper Tverskov
http://www.xmlplease.com

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>