Hello List,
tried to set up a customized page sequence to rotate a region body. This Guide (http://www.sagehill.net/docbookxsl/PageDesign.html#LandscapePageSequence) was very helpful. So here my customizations:
<xsl:template name="select.user.pagemaster">
<xsl:param name="element"/>
<xsl:param name="pageclass"/>
<xsl:param name="default-pagemaster"/>
<xsl:choose>
<xsl:when test="@role = 'landscape'">landscape</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$default-pagemaster"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="user.pagemasters">
<fo:simple-page-master master-name="landscape-first"
page-width="{$page.width}"
page-height="{$page.height}"
margin-top="{$page.margin.top}"
margin-bottom="{$page.margin.bottom}"
margin-left="{$margin.left.inner}"
margin-right="{$page.margin.outer}">
<xsl:if test="$axf.extensions != 0">
<xsl:call-template name="axf-page-master-properties">
<xsl:with-param name="page.master">body-first</xsl:with-param>
</xsl:call-template>
</xsl:if>
<fo:region-body margin-bottom="{$body.margin.bottom}"
margin-top="{$body.margin.top}"
reference-orientation="90"
column-gap="{$column.gap.body}"
column-count="{$column.count.body}">
</fo:region-body>
<fo:region-before region-name="xsl-region-before-first"
extent="{$region.before.extent}"
display-align="before"/>
<fo:region-after region-name="xsl-region-after-first"
extent="{$region.after.extent}"
display-align="after"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="landscape-odd"
page-width="{$page.width}"
page-height="{$page.height}"
margin-top="{$page.margin.top}"
margin-bottom="{$page.margin.bottom}"
margin-left="{$margin.left.inner}"
margin-right="{$page.margin.outer}">
<xsl:if test="$axf.extensions != 0">
<xsl:call-template name="axf-page-master-properties">
<xsl:with-param name="page.master">body-odd</xsl:with-param>
</xsl:call-template>
</xsl:if>
<fo:region-body margin-bottom="{$body.margin.bottom}"
margin-top="{$body.margin.top}"
reference-orientation="90"
column-gap="{$column.gap.body}"
column-count="{$column.count.body}">
</fo:region-body>
<fo:region-before region-name="xsl-region-before-odd"
extent="{$region.before.extent}"
display-align="before"/>
<fo:region-after region-name="xsl-region-after-odd"
extent="{$region.after.extent}"
display-align="after"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="landscape-even"
page-width="{$page.width}"
page-height="{$page.height}"
margin-top="{$page.margin.top}"
margin-bottom="{$page.margin.bottom}"
margin-left="{$margin.left.outer}"
margin-right="{$page.margin.inner}">
<xsl:if test="$axf.extensions != 0">
<xsl:call-template name="axf-page-master-properties">
<xsl:with-param name="page.master">body-even</xsl:with-param>
</xsl:call-template>
</xsl:if>
<fo:region-body margin-bottom="{$body.margin.bottom}"
margin-top="{$body.margin.top}"
reference-orientation="90"
column-gap="{$column.gap.body}"
column-count="{$column.count.body}">
</fo:region-body>
<fo:region-before region-name="xsl-region-before-even"
extent="{$region.before.extent}"
display-align="before"/>
<fo:region-after region-name="xsl-region-after-even"
extent="{$region.after.extent}"
display-align="after"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="landscape">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
<fo:conditional-page-master-reference master-reference="landscape-first"
page-position="first"/>
<fo:conditional-page-master-reference master-reference="body-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
odd-or-even="even">
<xsl:attribute name="master-reference">
<xsl:choose>
<xsl:when test="$double.sided != 0">landscape-even</xsl:when>
<xsl:otherwise>landscape-odd</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</fo:conditional-page-master-reference>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</xsl:template>
Then I set in my Input-Docbook-XML-File the attribute role to landscape in the appendix tag like this
<appendix role="landscape">
Next step was to generate output PDF with FOP 0.95 beta under Win and docbook-xsl-1.74.0. Result: Nothing. The appendix and integrated informaltable are still in portrait format.
What is wrong?
The very simplest way is to set orient=land to informaltable and this will rotate on page but with overfloating the page border ... :-(
<informaltable orient="land">
Next step is using the PSMI from here
http://www.cranesoftwrights.com/resources/psmi/index.htm. This changed last in 2003. Couldn't this included in the Docbook-XSL-Stylesheet?
Any suggestions?
Thanks.
Best Regards,
Lee
__________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com