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] Filtering out sections?


Hi Jirka,

sorry for my delayed response. 

Thanks for the tips, works perfectly.

Best regards, Lars

2011/11/27 Jirka Kosek <jirka@kosek.cz>
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: jirka@kosek.cz      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


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