W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2010

Re: Mixed page sizes in a section

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Tue, 27 Apr 2010 12:59:16 +0100 (IST)
Message-ID: <19252.87.232.94.112.1272369556.squirrel@mail3.webfaction.com>
To: www-xsl-fo@w3.org
On Tue, April 27, 2010 11:59 am, scopley wrote:
> Here is a snippet of the XML File:
>
> <mmchapter chapnbr="4" id="ch04" revdate="00/00/00">
> <mmfigure id="fig100">
> <mmsheet foldout="1">
> <mmeffect>ALL</mmeffect>
> <mmgraphic chg="u" gnbr="c130h7930007a"/>
> </mmsheet>
> </mmfigure>
> </mmchapter>
>
> Here is a snippet of my Chapter template:
>
> <xsl:template match="imm:mmchapter">
> <fo:page-sequence master-reference="master" initial-page-number="1">

You could do:

<xsl:if test="not(preceding-sibling::imm:mmchapter)">
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
</xsl:if>

so you only set it on the first chapter.

> <fo:flow flow-name="body">
> <fo:block xsl:use-attribute-sets="headfoot top" text-align="center"
> font-size="14pt" space-after="10pt" padding-top="20pt"
> break-before="odd-page" id="{@id}">CHAPTER
> <xsl:value-of select="@chapnbr"/>
> </fo:block>
> <fo:block xsl:use-attribute-sets="headfoot bottom" text-align="center"
> font-size="14pt" space-after="25pt" padding-bottom="20pt">
> <xsl:value-of select="imm:mmtitle"/>
> </fo:block>
> <xsl:apply-templates/>
> <fo:block id="{generate-id(.)}"/>
> </fo:flow>
> </fo:page-sequence>
> </xsl:template>
>
> Here is a snippet of my figure template:
>
> <xsl:template match="imm:mmfigure">
> <xsl:variable name="total" select="@shttotal"/>
> <xsl:choose>
> <xsl:when test="imm:mmsheet/@foldout='1'">
> <fo:page-sequence master-reference="11x17" initial-page-number="auto-odd">
> <fo:flow flow-name="body11x17">
> <fo:block-container id="{@id}" xsl:use-attribute-sets="figsp"
> keep-together="always" span="all">
> <xsl:apply-templates/>
> </fo:block-container>
> </fo:flow>
> </fo:page-sequence>
> </xsl:when>

You appear to be putting fo:page-sequence inside fo:flow, which I'm
surprised works at all for you.

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2
Received on Tuesday, 27 April 2010 11:59:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 April 2010 11:59:45 GMT