Menu

#6 How do I create a Customization Layer in DEP4E?

2015.05.0
pending
2015-05-02
2014-07-25
No

How do I create my own customization layer in DEP4E? I can find no doc that explains this process.
I want to stop Figures from appearing in the TOC as I have multiple chapters and Figures are being including in the TOC but keep starting over at Figure 1 within each.
So I either want the Figure numbering to keep incrementing or remove Figures entirely from the TOC.

Discussion

  • Nils Cordes

    Nils Cordes - 2014-07-25
    • status: open --> accepted
     
  • Nils Cordes

    Nils Cordes - 2014-07-25

    There are two possibilities.

    1.) Replace the values of the following Ant properties with with the path to your docbook xsl stylesheets.
    docbook.xsl.eclipse
    docbook.xsl.epub3
    docbook.xsl.html5

    2.) Use the source code of "net.sourceforge.dep4e.plugin.dxsc" as a starting point to provide your DocBook Stylesheets Customization Layer as a Eclipse Plugin an use it by replacing the Ant import <import file="${net.sourceforge.dep4e.resources}/ant/docbook_5-0.xml"></import>

     
    • DanielWeber

      DanielWeber - 2014-09-08

      Was just looking for a way to do the same. The problem with 1) is that a simple customization layer just sets some parameters and then imports the "original" stylesheet. But I could not find a way to do that properly since I cannot access ${net.sourceforge.dep4e.resources} inside the transformation.

      It would work if you make the path to the XSL files available as XSL parameter for the transformations being executed by dep4e's ant script. Then we could still use the DocBook stylesheets embedded in dep4e.

       
  • Nils Cordes

    Nils Cordes - 2014-07-25
    • assigned_to: Nils Cordes
     
  • Nils Cordes

    Nils Cordes - 2014-07-28
    • status: accepted --> pending
     
  • Nils Cordes

    Nils Cordes - 2014-07-29
    • Milestone: 2014.07.0 --> 2014.08.0
     
  • hajo

    hajo - 2015-04-27

    My customization layer looks like


    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:import href="../../../docbook/docbook-xsl-1.77.1/html/chunk.xsl">
    <xsl:param name="insert.xref.page.number" select="1">
    <xsl:param name="page.layout" select="'A4'">
    <xsl:param name="refentry.generate.name" select="0">
    <xsl:param name="refentry.generate.title" select="1">
    </xsl:param></xsl:param></xsl:param></xsl:param></xsl:import></xsl:stylesheet>


    May its possible to extend the ant build file (${net.sourceforge.dep4e.resources}/ant/docbook_5-0.xml) by an additional parameter for each target. This parameter can then optionally be set in the properties tab of the Eclipse build form. In the example above it would be the name of my customization entries (without the import line of course).

     
  • Nils Cordes

    Nils Cordes - 2015-04-27

    This feature will become part of the next release.
    The development is finished but the documentation needs some improvements.

     

Log in to post a comment.