Re: [xsl] Continuous Document Flow

Subject: Re: [xsl] Continuous Document Flow
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Jul 2009 11:32:49 -0400
At 2009-07-07 08:24 -0700, Horace Burke wrote:
I am creating XSL-FO stylesheet for a multi-language documents and would like the languages to flow one after the other separate by a rule (about 80% of page width). The issue that I am having is that the languages are starting on a new page.

Because you are asking it to by using <page-sequence>.


The starting point in the XML for each language is by using a "<lang >" tag. How can I get the languages to flow one after the other and not starting on a new page?

By not using <page-sequence> for every <lang>. Just use one <page-sequence> for your entire document and in the match for <lang> put yout your horizontal rule.


I provide snippets of my XML and stylesheet.

Please let me know if additional information is needed.

You did not supply a small working stylesheet for volunteers to change, so I'll just make some observations about what I see in your code.


====================XSL-FO=================
<xsl:template match="/">
...
                        </xsl:otherwise>
                </xsl:choose>
</fo:simple-page-master>

<!--++ Display entire data in the inserts ++-->

Here is where you would put the one <page-sequence> for your entire document.


   <xsl:apply-templates/>
 <!--++ Display data on Document Rear (last page) ++-->
 <xsl:apply-templates select="Product.Insert/docinfo" mode="doc-Rear"/>
 </fo:root>
 </xsl:template>

<!--======+Language "lang" Template+======-->
<xsl:template match="lang">
   <xsl:variable name="font_Fam">
      <xsl:choose>
        <xsl:when test="@fontFam">
          <xsl:value-of select="@fontFam"/>
        </xsl:when>
      </xsl:choose>
   </xsl:variable>
<!--
<xsl:for-each select="body">-->
   <fo:page-sequence master-reference="Insrt-body-page">

That element is triggering the new page for each <lang>, so remove it and simply add your 80% wide horizontal rule.


I hope this helps.

. . . . . . . . . . Ken

--
Possible July/August XSLT/XQuery/XSL-FO training in Oakland/CA/USA
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread