Skip to main content
10-Marble
April 23, 2010
Question

XSL FO 11x17 Foldouts

  • April 23, 2010
  • 3 replies
  • 754 views

Has anyone sucessfully created a template for 11x17 foldouts using XSL FO?

Through the use of an attribute I'm able to switch between different pagemasters and get the sizing that I want however when it switches back to the 8.5x11 it resets page number back to one.

I know that it is because I have my initial page number set to 1 on my chapter template so when it goes back to that page set it resets it to 1. Is there a way to make the initial page number attribute conditional or is there a better way to switch page sizes within a section?

Here is a snippet of my Chapter template:

<xsl:template<font color="#ff0000"> match="imm:mmchapter">

imm:mmchapter

<fo:page-sequence master-reference="master" initial-page-number="1">

<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">

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>

Sorry for such a long post. Any help would be greatly appreciated.

Sarah

    3 replies

    1-Visitor
    April 23, 2010
    This probably isn't going to help you much, but our organization produces both 11 X 17 and 11 X 45 foldouts. We segregate them in a separate wrapper tag at the end of a chapter or procedure. The reason for this is that none of our printers will switch back and forth on-the-fly between 8.5 X 11 and 11 X 17 and/or 11 X 45 pages. The foldouts always have to be done in a separate print job. This also eliminates any problems with resetting page numbering, although since we use FOSI we wouldn't have that problem, anyway.
    If possible, you might want to think about gathering all of your foldouts together in one place at the end of you document(s).
    1-Visitor
    April 23, 2010
    Hi, Sarah...

    I'm not completely clear on how the different snippets of your
    stylesheet fit together, or the conditions under which you need the
    initial-page-number attribute to be different, but in your chapter
    template, you should be able to remove the current initial-page-number
    attribute from the page-sequence element and place something like this
    just inside the element:

    <xsl:choose>
    <xsl:when test="@some" ==" 'value'&quot;=">
    <xsl:attribute name="initial-page-number">1</xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
    <xsl:attribute name="initial-page-number">auto</xsl:attribute>
    </xsl:otherwise>
    </xsl:choose>

    That said, switching page sizes in the middle of a chapter based on
    certain conditions in the content is a tricky affair in XSL-FO, since,
    according to the standard, page-sequences are not allowed to be
    nested. Based on the snippets of your stylesheet, it appears that you
    are nesting them and I'm guessing your processor is letting you get
    away with the non-standard usage.

    Which processor are you using? If it's Arbortext PE (or Print
    Composer), I wouldn't find it too surprising, since the underlying
    FOSI engine has explicit support for nested (or "local") page
    sequences. However, I don't know offhand how page numbering would be
    handled in this case, since it's non-standard and probably not really
    documented.

    If you find you need to generate separate page-sequences, non-nested,
    it can be done, with some fancy XSLT footwork. Let us know how this
    develops for you.

    -Brandon 🙂


    10-Marble
    April 23, 2010
    I'm using Arbortext Print Composer.

    Yes I am nesting my page sequences in order to accommodate the different page sizes and it is working all except the page numbering. The output is Page 1, Page 2, Page 3 (foldout page), Page 1.

    I've tried running a test but since you can't save fo:page-number as a variable, or at least I haven't found a way to, I can't get my test to work. I've tried adjusting the existing page-width in my page-sequence based on an attribute value but again I haven't had any luck.

    IF you know of a way to do this without moving all my foldouts to the end of the chapter please share in your wealth of knowledge.

    To bad you can't mixed FOSI edits in with XSL:FO. FOSI works great.

    sarah