docbook v5 customization layer - indent 1st paragraph line
-
- Posts: 18
- Joined: Wed Sep 03, 2008 10:12 pm
docbook v5 customization layer - indent 1st paragraph line
Hello DocBook users
I am trying to introduce a customization layer for docbook v5 to indent the 1st paragraph line.
Normally, by re-defining normal.para.spacing attribute set in the customization layer this is possible:
How and where this code should be introduced in the docbook v5 xsl ?
Thanks very much for your assistance
regards, Peter
I am trying to introduce a customization layer for docbook v5 to indent the 1st paragraph line.
Normally, by re-defining normal.para.spacing attribute set in the customization layer this is possible:
Code: Select all
<xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="text-indent">24pt</xsl:attribute>
</xsl:attribute-set>
Thanks very much for your assistance
regards, Peter
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: docbook v5 customization layer - indent 1st paragraph line
Post by sorin_ristache »
Hello Peter,
The attribute set normal.para.spacing is defined in the various param.xsl stylesheets from Docbook XSL used for generating output formats like PDF and XHTML. These stylesheets are located in directory [Oxygen-install-dir]\frameworks\docbook\xsl, for example the stylesheets for the PDF output are located in the fo subdirectory of this directory, the stylesheets for the XHTML output are located in the xhtml subdirectory, etc. You just have to add the attribute called text-indent in this set, for example:
The steps for creating and applying a Docbook customization layer in Oxygen are explained in a video demonstration on the video demo page of the Oxygen website. Please let us know if the process outlined there is not clear / helpful enough.
Regards,
Sorin
The attribute set normal.para.spacing is defined in the various param.xsl stylesheets from Docbook XSL used for generating output formats like PDF and XHTML. These stylesheets are located in directory [Oxygen-install-dir]\frameworks\docbook\xsl, for example the stylesheets for the PDF output are located in the fo subdirectory of this directory, the stylesheets for the XHTML output are located in the xhtml subdirectory, etc. You just have to add the attribute called text-indent in this set, for example:
Code: Select all
<xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="text-indent">24pt</xsl:attribute>
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
</xsl:attribute-set>
Regards,
Sorin
-
- Posts: 18
- Joined: Wed Sep 03, 2008 10:12 pm
Re: docbook v5 customization layer - indent 1st paragraph line
Hello Sorin
thanks for quick reply
Your idea was also mine but this does not work, see the xsl file:
- the html subdir does not contain the docbook.xsl
- the xhtml transformation in Oxygenxml transforms OK but does not show the transformed file
- the customization layer for docbook v5 is described here http://www.docbook.org/tdg51/en/html/ch05.html fully differently.
- do you have any idea what I have to change here ?
best regards, peter
thanks for quick reply
Your idea was also mine but this does not work, see the xsl file:
Code: Select all
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="xhtml/docbook.xsl"/>
<xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="text-indent">24pt</xsl:attribute>
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
- the xhtml transformation in Oxygenxml transforms OK but does not show the transformed file
- the customization layer for docbook v5 is described here http://www.docbook.org/tdg51/en/html/ch05.html fully differently.
- do you have any idea what I have to change here ?
best regards, peter
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: docbook v5 customization layer - indent 1st paragraph line
Post by sorin_ristache »
Hi Peter,
The location where you save your new XSLT stylesheet (your customization layer) is very important for resolving the relative path in your import element:
For the above import element to work you have to place your stylesheet in the [Oxygen-install-dir]/frameworks/docbook/xsl directory.
Please follow the example of the XSLT stylesheet from the built-in Oxygen scenario called DocBook XHTML, that is [Oxygen-install-dir]/frameworks/docbook/xsl/xhtml/docbook_custom.xsl. It imports (indirectly) the same docbook.xsl stylesheet and it works, but it is located in the [Oxygen-install-dir]/frameworks/docbook/xsl/xhtml/docbook_custom.xsl directory, otherwise the relative paths for the imported stylesheets would not work.
You should validate your XSLT customization layer stylesheet with the Validate action (with the shortcut Ctrl+Shift+V) available on the toolbar and also on the menu Document -> Validate. Usually fixing all validation errors prevents any transformation errors.
Regards,
Sorin
The location where you save your new XSLT stylesheet (your customization layer) is very important for resolving the relative path in your import element:
Code: Select all
<xsl:import href="xhtml/docbook.xsl"/>
Please follow the example of the XSLT stylesheet from the built-in Oxygen scenario called DocBook XHTML, that is [Oxygen-install-dir]/frameworks/docbook/xsl/xhtml/docbook_custom.xsl. It imports (indirectly) the same docbook.xsl stylesheet and it works, but it is located in the [Oxygen-install-dir]/frameworks/docbook/xsl/xhtml/docbook_custom.xsl directory, otherwise the relative paths for the imported stylesheets would not work.
You should validate your XSLT customization layer stylesheet with the Validate action (with the shortcut Ctrl+Shift+V) available on the toolbar and also on the menu Document -> Validate. Usually fixing all validation errors prevents any transformation errors.
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