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

Onion-skin overriding stylesheet

Subject: Onion-skin overriding stylesheet
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Wed, 7 Sep 2011 10:50:10 +0200
 Onion-skin overriding stylesheet
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

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.