[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Onion-skin overriding stylesheet
Subject: [xsl] Onion-skin overriding stylesheet From: Jesper Tverskov <jesper@xxxxxxxxxxx> Date: Wed, 7 Sep 2011 10:50:10 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] WebKit transformToDocumen, Dustin N. Jenkins | Thread | Re: [xsl] Onion-skin overriding sty, Andrew Welch |
Re: [xsl] WebKit transformToDocumen, Imsieke, Gerrit, le- | Date | Re: [xsl] Onion-skin overriding sty, Andrew Welch |
Month |
Keywords