xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Rhodes <rhode...@telerama.com>
Subject 2 flows to same page?
Date Tue, 03 Sep 2002 02:08:32 GMT
Hi.
I have an xml doc, "book" is the root, with many "chapter" child elements.

I am creating a new page for every chapter.  For each chapter, I want to 
put some text in the "xsl-region-start" and "xsl-region-body" for the page.

I tried putting two flows in the page sequence, but it errors out saying 
that one can not have 2 flows in the same page sequence.  I have two page 
sequences, each with the different flow, but this does not appear to be 
working.

Here is my stylesheet.  Thanks for any help or pointers.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <xsl:template match="/">
         <xsl:apply-templates/>
    </xsl:template>

   <xsl:template match="book">
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <fo:layout-master-set>
                 <fo:simple-page-master  master-name="US-Letter"
                      page-height="11in"   page-width="8.5in"
                      margin-top="0.5in"   margin-bottom="0.5in"
                      margin-left="0.5in"  margin-right="0.5in">
                         <fo:region-start  extent="2.0in"/>
                         <fo:region-body/>
                 </fo:simple-page-master>
       </fo:layout-master-set>
         <xsl:apply-templates/>
         </fo:root>
   </xsl:template>

    <xsl:template match="chapter">
       <fo:page-sequence master-reference="US-Letter">
          <fo:flow flow-name="xsl-region-start">
           <fo:block><xsl:value-of select="@chapterTitle"/></fo:block>
          </fo:flow>

                 <!--
                         Can't do this, that is, put two flows into one 
page sequence.
          <fo:flow flow-name="xsl-region-body">
           <fo:block><xsl:value-of select="@chapterText"/></fo:block>
          </fo:flow>

                 -->
       </fo:page-sequence>
       <fo:page-sequence master-reference="US-Letter">
          <fo:flow flow-name="xsl-region-body">
           <fo:block><xsl:value-of select="@chapterText"/></fo:block>
          </fo:flow>
       </fo:page-sequence>
    </xsl:template>

</xsl:stylesheet>


Mime
View raw message