Removing SECTIONINFO from Docbook document processing

Oxygen general issues.
deannelson
Posts: 7
Joined: Thu Jun 01, 2006 11:38 pm

Removing SECTIONINFO from Docbook document processing

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply