[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Custom page master
Yes, it appears that border on region-body is not supported in FOP 0.20.5. In version 0.92beta, it reports and error and fails. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Daniela Dänzer" <daniela.daenzer@gmail.com> To: "Bob Stayton" <bobs@sagehill.net> Cc: <docbook-apps@lists.oasis-open.org> Sent: Friday, December 08, 2006 12:02 AM Subject: Re: [docbook-apps] Custom page master Hi Bob, thanks a lot for your reply. I tried your suggestion and it works fine, now my custom page masters are called. But: I want to use these page masters to draw a vertical line on the outer side of my text body. You suggested the way to do this not long ago in this message: "vertical line between margin and text" on this list. However, this doesn't work for me. I added a "background-color="red"" to the region-body of the simple-page-master 'adito_body-odd' to make sure the right page master is used <fo:simple-page-master master-name="adito_body-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}"> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" column-gap="{$column.gap.body}" column-count="{$column.count.body}" border-start-color="black" border-start-width="2pt" border-start-style="solid" background-color="red" /> <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> and this works fine. But I never get to see the border. Am I missing something? Regards, Daniela On 12/7/06, Bob Stayton <bobs@sagehill.net> wrote: > Hi Daniela, > It looks like you have set up your user.pagemasters correctly, but your > select.user.pagemaster is not working. The stylesheets work off the > page-sequence-master names, not the simple-page-master names. You should > be able to use this: > > <xsl:choose> > <xsl:when test="$default-pagemaster = 'body'">adito_body</xsl:when> > <xsl:otherwise><xsl:value-of > select="$default-pagemaster"/></xsl:otherwise> > </xsl:choose> > > The handling of the first, odd, even, etc. is handled by the > page-sequence-master. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Daniela Dänzer" <daniela.daenzer@gmail.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Wednesday, December 06, 2006 1:38 AM > Subject: [docbook-apps] Custom page master > > > > Hello, > > > > I try to use custom page masters in my customization layer (see code > > snippet below). But it seems that these are never used. Am I missing > > something? How can I be sure that the templates for custom page > > masters are called? Is there a way to debug my customization layer? > > I'm using docbook-xsl 1.69.1, xsltproc and fop 0.20.5 > > > > Thanks in advance for any ideas! > > > > Regards, > > Daniela > > > > My customized pagemaster: > > > > <xsl:template name="user.pagemasters"> > > <!-- Body-Seiten --> > > <fo:simple-page-master master-name="adito_body-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}"> > > <fo:region-body margin-bottom="{$body.margin.bottom}" > > margin-top="{$body.margin.top}" > > column-gap="{$column.gap.body}" column-count="{$column.count.body}" > > border-start-color="black" border-start-width="2pt" > > border-start-style="solid" /> > > <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="adito_body-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}"> > > <fo:region-body margin-bottom="{$body.margin.bottom}" > > margin-top="{$body.margin.top}" > > column-gap="{$column.gap.body}" column-count="{$column.count.body}" > > border-start-color="black" border-start-width="2pt" > > border-start-style="solid" > > background-color="red" /> > > <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="adito_body-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}"> > > <fo:region-body margin-bottom="{$body.margin.bottom}" > > margin-top="{$body.margin.top}" > > column-gap="{$column.gap.body}" column-count="{$column.count.body}" > > border-start-color="black" border-start-width="2pt" > > border-start-style="solid" /> > > <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="adito_body"> > > <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="adito_body-first" page-position="first"/> > > <fo:conditional-page-master-reference > > master-reference="adito_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">adito_body-even</xsl:when> > > <xsl:otherwise>adito_body-odd</xsl:otherwise> > > </xsl:choose> > > </xsl:attribute> > > </fo:conditional-page-master-reference> > > </fo:repeatable-page-master-alternatives> > > </fo:page-sequence-master> > > </xsl:template> > > > > > > <xsl:template name="select.user.pagemaster"> > > <xsl:param name="element"/> > > <xsl:param name="pageclass"/> > > <xsl:param name="default-pagemaster"/> > > > > <!-- Return my customized title page master name if for titlepage, > > otherwise return the default --> > > > > <xsl:choose> > > <xsl:when test="$default-pagemaster = 'body-first'"><xsl:value-of > > select="'adito_body-first'" /></xsl:when> > > <xsl:when test="$default-pagemaster = 'body-odd'"><xsl:value-of > > select="'adito_body-odd'" /></xsl:when> > > <xsl:when test="$default-pagemaster = 'body-even'"><xsl:value-of > > select="'adito_body-even'" /></xsl:when> > > <xsl:otherwise><xsl:value-of > > select="$default-pagemaster"/></xsl:otherwise> > > </xsl:choose> > > </xsl:template> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > > > > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]