That's pretty much the approach I use, except that when I override any
template, I move the entire xsl containing that template into my
customization layer. Then to upgrade, I do a three way diff between the
original base xsls, my modification of it, and the new base xsl. There's
still merge pain, but it's a little bit less. In the three way diff, I
can see whether the template was changed between docbook versions and
redo my customization in the new template if it was.

That works pretty well, but there's one case that you have to watch for.
If you do import all of block.xsl to your customization layer, then
<xsl:template match="para"> takes precedence over <xsl:template
match="footnote/para[1] | footnote/simpara[1] | footnote/formalpara[1]"
priority="2">. I modified the template in block.xsl to be <xsl:template
match="para[not(parent::footnote)]"> to avoid the problem. I haven't
encountered any other cases like this, but when it happens, it's a
mysterious bug to track down. In the case of the footnote example, the
effect is that footnote numbers no longer appear at the bottom of the
page, though the footnotes do. Here's Bob's post that clued me in to
what was going on:
http://www.oasis-open.org/archives/docbook-apps/200703/msg00104.html

David 

> -----Original Message-----
> From: Markus Hoenicka [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 12, 2007 8:14 AM
> To: Stefan Heuer
> Cc: [email protected]
> Subject: Re: [docbook-apps] Managing changes to the XSLT stylesheets
> 
> Quoting Stefan Heuer <[EMAIL PROTECTED]>:
> 
> > Sorry , but I think for that reason there is changelog 
> where each new 
> > feature is mentioned on every version. There you can read 
> and decide 
> > if you want to use new features or your customized elments/parts.
> >
> 
> That is, use a customization layer *and* a diff. If the 
> changelog says the template was not changed, rely on your 
> customization layer. If the template changed, try to apply 
> the diff, and replace the template in your customization 
> layer with the patched new version. Sounds good.
> 
> regards,
> Markus
> 
> --
> Markus Hoenicka
> [EMAIL PROTECTED]
> (Spam-protected email: replace the quadrupeds with 
> "mhoenicka") http://www.mhoenicka.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to