Next in thread → Next in month →

Re: [docbook-apps] Filtering out sections?

From
Lars Vogel <>
Date
2011-12-07T10:24:33+00:00
ID
CAOeJ3wvOV1wep6A7wK==
Thread
Re: [docbook-apps] Filtering out sections?
Hi Jirka,

sorry for my delayed response. 

Thanks for the tips, works perfectly.

Best regards, Lars

2011/11/27 Jirka Kosek <>

On 27.11.2011 19:22, Lars Vogel wrote:

> great! This works. I had the problem if I put this directly into my

> customizing layer that the TOC and the numbering of the chapters would

> still be incorrect.

>

> But if I run this as a two step it works perfectly.

There is one trick how to do this one step. Use profiling version of

stylesheets, i.e. profile-docbook.xsl instead of docbook.xsl and put

filtering template into profile mode, like:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    version="1.0">

    <xsl:import

href="">

    <xsl:template match="section[@role='wrapper']" mode="profile">

        <xsl:apply-templates select="section" mode="profile"/>

    </xsl:template>

</xsl:stylesheet>

profile mode is responsible for filtering prior transformation, so

chapter numbering will work then correctly.

                                Jirka

--

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

  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 member

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

-- 
Lars
http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter
Next in thread → Next in month →