[xsl] 2 column page layouts in FO

Subject: [xsl] 2 column page layouts in FO
From: Dan Vint <dvint@xxxxxxxxx>
Date: Thu, 15 Sep 2005 11:59:44 -0700
I'm trying to create an index for my publication and set it on a 2 column page, where the rest of the pub is one column. What I'm finding is the first page of this section is setting as a single page wide column and follow on pages are setting as 2 column correctly. I don't set any spans and when I check to bounding boxes in Antenna House it shows blocks spanning the whole page on the first page and the second page shows two columns.

So I know my text output and its blocks are correct because they format properly on subsequent pages, so it seems like it should be in the page layout information where this is being changed, but I can't see the problem. Also, if I force a page break before my heading of Index, all the text formats correctly.

Here are my page layouts:

<fo:simple-page-master master-name="index-2col"
	page-height="{$pageHeight}" page-width="{$pageWidth}"
	margin-top=".5in"
	margin-bottom=".5in"
	margin-left=".75in"
	margin-right=".75in" >

	  <fo:region-body margin-top=".5in" margin-bottom=".35in"/>
  <fo:region-before extent=".5in" display-align="before" />
  <fo:region-after extent=".5in" display-align="after"/>

	<fo:region-body column-count="2" column-gap=".5in"
		margin-bottom=".35in"/>
</fo:simple-page-master>


<fo:page-sequence-master master-name="index"> <fo:repeatable-page-master-reference master-reference="index-2col" /> </fo:page-sequence-master >



Here is the template that creates the new section and calls in the page layout and calls templates that set everything but the heading of Index:



<xsl:template match="index">

<xsl:comment>index template processing start </xsl:comment>

		<!-- Process the INDEX section of the document -->
  <fo:page-sequence

            font-family="sans-serif" color="#000000"
            text-align="justify" font-size="10pt"
            master-reference="index"
            >

<fo:static-content flow-name="xsl-region-before">
</fo:static-content>
<fo:static-content flow-name="xsl-region-after" >
<fo:block>
<fo:block >
<fo:leader leader-pattern="rule" leader-length="7in" />
</fo:block>
<fo:table table-layout="fixed">
<fo:table-column column-width="1.75in"/>
<fo:table-column column-width="3.5in"/>
<fo:table-column column-width="1.75in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block text-align="start" font-size="6pt" font-family="sans-serif">
<xsl:value-of select="/ACORDdoc/header/copyright"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="center" font-size="6pt" font-family="sans-serif">
<xsl:value-of select="/ACORDdoc/header/title"/>
</fo:block>
<fo:block text-align="center" font-size="6pt" font-family="sans-serif">
<xsl:value-of select="/ACORDdoc/header/version"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="end" font-size="8pt" font-family="sans-serif">
<fo:page-number/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>



<fo:flow flow-name="xsl-region-body"> <fo:block xsl:use-attribute-sets="div1-attrs" > <xsl:if test="$processor='AXF'"> <!-- bookmarks --> <xsl:if test="$TOC='Yes'"> <fo:block axf:outline-level="1" axf:outline-expand="false" axf:outline-title="Index"/> </xsl:if> </xsl:if>

	  <fo:block
		font-size="{$sec1-font-size}"
		text-align='center'
		span="all"
		xsl:use-attribute-sets="title-attrs"
		>
		<xsl:text>Index</xsl:text>
	  </fo:block>

<xsl:call-template name="process-index-entries" />

	</fo:block>
     </fo:flow>
    </fo:page-sequence>

</xsl:template>


thanks ..dan --------------------------------------------------------------------------- Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com

voice: 510-522-4703

Current Thread