Docbook v5 article: customization layer section title
-
- Posts: 11
- Joined: Mon Mar 25, 2013 9:52 pm
Docbook v5 article: customization layer section title
Hi everyone.
I am a newbie to DocBook and XSL and I am trying to customise the stylesheets. I have a small DocBook article and I don't want to display the section title. It seems that an article has to be made up of one section and so I guess that this section has to have a title, but I don't want it to be shown in the pdf. Can anyone give me any pointers on how I can hide it?
Thanks in advance for your help.
I am a newbie to DocBook and XSL and I am trying to customise the stylesheets. I have a small DocBook article and I don't want to display the section title. It seems that an article has to be made up of one section and so I guess that this section has to have a title, but I don't want it to be shown in the pdf. Can anyone give me any pointers on how I can hide it?
Thanks in advance for your help.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Docbook v5 article: customization layer section title
Post by sorin_ristache »
Hi,
I suppose you want to keep the article title but don't want to display any section title in the transformation output. In this case you could create a document with a section or sect1 root element instead of article so that you have only one title in the document. The section/sect1 title would contain exactly what you have now as the article title. You just transform the section or sect1 document to PDF, no customization of the Docbook stylesheets is needed, all you have to do is create a document with only one title.
If you need to keep both the article title and the section title but remove the section title only from the transformation output then you should create a customization of the Docbook PDF transformation. You can create a new XSLT stylesheet that imports and extends [Oxygen-install-dir]/frameworks/docbook/xsl/fo/docbook_custom.xsl and add the following XSLT template in the new XSLT stylesheet that will override the default one from the imported stylesheet:
The customization process is explained in a video tutorial on our video demo page. Please let us know if your customized Docbook PDF transformation does not run or if you need further help.
Regards,
Sorin
I suppose you want to keep the article title but don't want to display any section title in the transformation output. In this case you could create a document with a section or sect1 root element instead of article so that you have only one title in the document. The section/sect1 title would contain exactly what you have now as the article title. You just transform the section or sect1 document to PDF, no customization of the Docbook stylesheets is needed, all you have to do is create a document with only one title.
If you need to keep both the article title and the section title but remove the section title only from the transformation output then you should create a customization of the Docbook PDF transformation. You can create a new XSLT stylesheet that imports and extends [Oxygen-install-dir]/frameworks/docbook/xsl/fo/docbook_custom.xsl and add the following XSLT template in the new XSLT stylesheet that will override the default one from the imported stylesheet:
Code: Select all
<xsl:template name="section.heading"/>
Regards,
Sorin
-
- Posts: 11
- Joined: Mon Mar 25, 2013 9:52 pm
Re: Docbook v5 article: customization layer section title
Hi
Following on from this, I now have my sect1 titles hidden, but have added a sect2 and would like to display that title. How can I edit this parameter
in my customisation layer to achieve that?
Thank you very much.
Best wishes,
Helen
Following on from this, I now have my sect1 titles hidden, but have added a sect2 and would like to display that title. How can I edit this parameter
Code: Select all
<xsl:template name="section.heading"/>
Thank you very much.
Best wishes,
Helen
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Docbook v5 article: customization layer section title
Post by sorin_ristache »
Hi Helen,
The template that you have to customize in your Docbook customization layer is located in the stylesheet [Oxygen-install-dir]\frameworks\docbook\xsl\xhtml\sections.xsl and is this:
This template has a parameter called level so inside that template you have to do the normal processing only if $level = 2.
Regards,
Sorin
The template that you have to customize in your Docbook customization layer is located in the stylesheet [Oxygen-install-dir]\frameworks\docbook\xsl\xhtml\sections.xsl and is this:
Code: Select all
<xsl:template name="section.heading">
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service