Re: [docbook-apps] xmpp.xsl file?

From
Jen <>
Date
2013-10-09T10:46:17+00:00
ID
Thread
Re: [docbook-apps] xmpp.xsl file?
(Oops, just realized that I hadn't replied to all!)

Thanks for the clarifications and the quick replies. 

The inline.xsl,component.xsl and titlepage.xsl that are being imported are (very) different versions of the standard files. I *am* planning use DocBook 5 and the namespace version of the stylesheets, so your tips are very useful. I'll try to adapt all the custom stylesheets we have right now and see if the transformation still works... fingers crossed. 

On Wed, Oct 9, 2013 at 12:43 PM, Jirka Kosek <> wrote:

On 9.10.2013 11:29, Jen wrote:

> I can guess what the file is trying to do, but I was hoping there's some

> known distribution of stylesheets than contains this file and the name

> might ring a bell to someone... :)

>

> Either way, good point, I'm attaching it, maybe it helps.

From this:

  <!-- Include other stylesheets -->

  <xsl:import href="">
  <xsl:include href="" />

  <xsl:include href="" />

  <xsl:include href="">

it seems that file uses quite unusual approach to customization. Usually

just docbook.xsl is imported as it itself imports

inline.xsl/component.xsl/titlepage.xsl stylesheets that are part of

standard stylesheets.

You can try to comment out these three includes and see if customization

still works.

Then I suggest move xmpp.xsl into separate folder from standard XSL

stylesheets distribition and modify path to fo/docbook.xsl accordingly.

Otherwise you risk you will overwrite this file when upgrading to recent

version of stylesheets.

Depending on whether you are using DocBook V4.5 or V5.0. You might

consider switching to namespace version of stylesheets (for V5.0).

If this is the case then you will be able to rely solely on stylesheets

distributed as a part of oXygen, just use the following import:

<xsl:import

href="" href="http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl" target="_blank">http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl"/>

oXygen will redirect this to a local copy of stylesheets. You will have

to tweak few things in xmpp.xsl then, for example change

<xsl:when test="self::chapter | self::preface |

self::appendix">bold</xsl:when>

to

<xsl:when test="self::d:chapter | self::d:preface |

self::d:appendix">bold</xsl:when>

and add xmlns:d="http://docbook.org/ns/docbook" to xsl:stylesheet element.

Regarding customization I suggest read the following:

http://www.sagehill.net/docbookxsl/CustomMethods.html

--

------------------------------------------------------------------

  Jirka Kosek      e-mail:       http://xmlguru.cz

------------------------------------------------------------------

       Professional XML consulting and training services

  DocBook customization, custom XSLT/XSL-FO document processing

------------------------------------------------------------------

 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.

------------------------------------------------------------------

    Bringing you XML Prague conference    http://xmlprague.cz

------------------------------------------------------------------