Alberto P. wrote:
in the customize directory i have a custom_fo.xsl file which
contains xml code to override attributes and templates in the
..xsl/fo/*.xsl files.
I modified the pagination.xsl file, as you can see below, to place
borders around pages which works fine.
<!-- body-page ========== -->
<fo:simple-page-master master-name="first-body-page"
page-width="{$page-width}"
page-height="{$page-height}"
margin-top="{$page-top-margin}"
margin-bottom="{$page-bottom-margin}"
margin-left="{$page-inner-margin}"
margin-right="{$page-outer-margin}">
/<!-- <fo:region-body margin-top="{$body-top-margin}"//
//margin-bottom="{$body-bottom-margin}"/>//
// <fo:region-before extent="{$header-height}"//
// display-align="before"//
//region-name="first-page-header"/>//
// <fo:region-after extent="{$footer-height}"//
// display-align="after"//
//region-name="first-page-footer"/> --> /
<fo:region-body margin-top = "{$page-top-margin}"
margin-bottom = "{$page-bottom-margin}"
border-style = "double" border-width = "5px"
border="gray" padding="0.1cm"/>
<fo:region-before extent="{$header-height}"
display-align="before"
region-name="first-page-header"/>
<fo:region-after extent="{$footer-height}"
display-align="after"
region-name="first-page-footer"/>
<fo:region-start extent="0.05cm"/>
<fo:region-end extent="0.05cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="odd-body-page"
page-width="{$page-width}"
page-height="{$page-height}"
margin-top="{$page-top-margin}"
margin-bottom="{$page-bottom-margin}"
margin-left="{$page-inner-margin}"
margin-right="{$page-outer-margin}">
/<!-- <fo:region-body margin-top="{$body-top-margin}"//
//margin-bottom="{$body-bottom-margin}"/>//
// <fo:region-before extent="{$header-height}"//
// display-align="before"//
//region-name="odd-page-header"/>//
// <fo:region-after extent="{$footer-height}"//
// display-align="after"//
//region-name="odd-page-footer"/> -->/
<fo:region-body margin-top = "{$page-top-margin}"
margin-bottom = "{$page-bottom-margin}"
border-style = "double" border-width = "5px"
border="gray" padding="0.1cm"/>
<fo:region-before extent="{$header-height}"
display-align="before"
region-name="first-page-header"/>
<fo:region-after extent="{$footer-height}"
display-align="after"
region-name="first-page-footer"/>
<fo:region-start extent="0.05cm"/>
<fo:region-end extent="0.05cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="even-body-page"
page-width="{$page-width}"
page-height="{$page-height}"
margin-top="{$page-top-margin}"
margin-bottom="{$page-bottom-margin}"
margin-left="{$page-outer-margin}"
margin-right="{$page-inner-margin}">
/<!-- <fo:region-body margin-top="{$body-top-margin}"//
//margin-bottom="{$body-bottom-margin}"/>//
// <fo:region-before extent="{$header-height}"//
// display-align="before"//
//region-name="even-page-header"/>//
// <fo:region-after extent="{$footer-height}"//
// display-align="after"//
//region-name="even-page-footer"/> -->
/ <fo:region-body margin-top = "{$page-top-margin}"
margin-bottom = "{$page-bottom-margin}"
border-style = "double" border-width = "5px"
border="gray" padding="0.1cm"/> -->
<fo:region-before extent="{$header-height}"
display-align="before"
region-name="first-page-header"/>
<fo:region-after extent="{$footer-height}"
display-align="after"
region-name="first-page-footer"/>
<fo:region-start extent="0.05cm"/>
<fo:region-end extent="0.05cm"/>
</fo:simple-page-master>
But what i would really like to do now is move this code into the
customize directory as a template of some sort that will override the
page class in the pagination.xsl file.
I know this sounds like a support question, and would not bother asking
you if how to do so were included in the XMLmind user manual, but i
can't such instructions anywhere.
Your question is in fact about XSLT, and not about XMLmind DITA Converter.
What follows applies to your case:
XMLmind DITA Converter Manual
2. Customizing the look of the PDF files generated by ditac
http://www.xmlmind.com/ditac/_distrib/doc/manual/manual-6.html#customAttributeSet
because a .xsl customization file is not limited to containing
attribute-sets. It may also contain templates. See below.
I have tried to get this to work like you would for a titlepage.fo file
and as well as a template.xsl file with no luck.
Could you be so kind to a least provide me with some hints about how to
go about this.
I am rendering xml files to PDF using Apache FOP.
1) Restore the stock "pagination.xsl".
2) Copy in your "custom_fo.xsl" the template you have modified in
"pagination.xsl". Copy just your custom version of this template, which
seems to be:
<xsl:template name="layoutMasterSet">
<fo:layout-master-set>
...
</fo:layout-master-set>
</xsl:template>
This works because your "custom_fo.xsl" imports the stock "fo.xsl"
(which in turn imports "pagination.xsl"), hence your custom
<xsl:template name="layoutMasterSet"> has priority over the stock
<xsl:template name="layoutMasterSet">.
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support