OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook-apps] Managing changes to the XSLT stylesheets

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:


> -----Original Message-----
> From: Markus Hoenicka [mailto:markus.hoenicka@mhoenicka.de] 
> Sent: Wednesday, September 12, 2007 8:14 AM
> To: Stefan Heuer
> Cc: docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Managing changes to the XSLT stylesheets
> Quoting Stefan Heuer <sh127@gmx.de>:
> > 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
> markus.hoenicka@cats.de
> (Spam-protected email: replace the quadrupeds with 
> "mhoenicka") http://www.mhoenicka.de
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]