Page 1 of 1

Removing SECTIONINFO from Docbook document processing

Posted: Thu Sep 21, 2006 5:36 pm
by deannelson
Hello all,

I have a basic DocBook XSL question. I want to include <sectioninfo> in the large sections and it will carry information about who wrote it, when, etc.

I do NOT want any off this it to show up in my documents [PDF & HTML].

What kind of a template can I include in my XSL stylesheet that ignores this and any children in that section in the output, but still validates it for future use?

Dean

Posted: Fri Sep 22, 2006 2:54 pm
by george
Hi,

I do not know if there is something that can be done in a DocBook customisation layer but a very simple solution is to make first a transformation that removes your sectioninfo elements, for instance with a very simple stylesheet like below:

Code: Select all


<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="sectioninfo"/>
</xsl:stylesheet>
Note that oXygen allows you to chain multiple stylesheets in the same transformation scenario so you can put this as the first stylesheet and add docbook.xsl as additional XSLT stylesheet.

Best Regards,
George