Geraint North wrote:
> It seems to me that there are two ways to manage changes to the XSLT
> stylesheets:
>
> 1. Modifying the parameters/templates in-place.
> 2. Adding a customisation layer, duplicating (and thus overriding) the
> parameters and templates that you specialise.
>
> Initially, I went for the former approach, which was recommended in
> "DocBook XSL: The Complete Guide", however, having just moved my changes
> up from Docbook XSLT 1.68 to 1.73, I've switched to an approach where I
> just modify the parameters and template in-place.
Confused. As you say, each time you update you lose your changes if
you modify 'docbooks' stylesheets.
A customization layer is much nicer, and re-usable.
E.g. if your directory stuff was in one stylesheet, I could include that
before the docbook ones. Then I get mine, yours, docbooks, all in
the right priority order.
This means that when
> I update to future versions of the XSLT, I can apply the diffs and
> resolve conflicts as appropriate - as it stood, I'd modified cloned
> copies of templates that had changed significantly in the update, and
> that wasn't caught until I manually went back to look at the 'new'
> original templates.
I did that. Found it painful (docbook committee are really active :-)
when I had to keep re-doing it and eventually realized that providing
a customization layer to override the as installed set, it worked well.
>
> However, this means that if I wanted to distribute any of my changes,
> I'd be distributing them as a patch, rather than as a single file that
> overrode the relevant templates - is this something that people
> generally do?
No, see above... if you're as lazy as [some] of us, and want to
avoid rework.. rework.. rework :-)
>
> Thinking of it, is there a page anywhere where people can distribute
> their enhancements to the stylesheets?
That's what I was hoping for.
1. Your schema updates.
2. Your stylesheet customizations.
I don't think it's been addressed in the past.
As I offered before, if no reply, I'd be happy to add them to a new
section in the docbook faq.
Or perhaps a link from the docbook wiki?
regards
--
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk