Subject: [xsl] Continuous Document Flow From: Horace Burke <xmlmarkup@xxxxxxxxx> Date: Tue, 7 Jul 2009 08:24:28 -0700 (PDT) |
Hi All, 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. 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? I provide snippets of my XML and stylesheet. Please let me know if additional information is needed. Thanks in advance for your help. I really appreciate it. Regards, Horace ====================XML================= <Product.Insert column="1col" dbSvr="mfgdev" docID="248210" docrev="KA" pgHeight="11in" pgWidth="8.5in" status="preview"> <docinfo> <docDate>March 2007</docDate> .... </docinfo> <toc display="no"/> <lang langID="EN" language=" English" fontFam=" Arial"> <fixedterms> <term id="caution" text="CAUTION"/> <term id="notice" text="NOTICE"/> <term id="warning" text="WARNING"/> </fixedterms> <productInfo> <systemname>SYNCHRON<superscript>®</superscript> Systems</systemname> <productname>CREATINE KINASE-MB ISOENZYME (CKMB)</productname> <kitRef><Ref>445375</Ref></kitRef> <forUse>For <emphasis role="bolditalics">In Vitro</emphasis> Diagnostic Use</forUse> </productInfo> <body> <level1><title>Contents</title> <para><emphasis role="bold">Each kit contains the following items:</emphasis></para> ...... </level1> </body> </lang> <lang langID="FR" language=" Frangais" fontFam=" Arial"> <fixedterms> <term id="caution" text="ATTENTION"/> <term id="notice" text="REMARQUE"/> <term id="warning" text="AVERTISSEMENT"/> </fixedterms> <productInfo> <systemname>SYSTEMES SYNCHRON<superscript>®</superscript></systemname> <productname>ISOENZYME CREATINE KINASE - MB (CKMB)</productname> <kitRef><Ref>445375</Ref></kitRef> <forUse>Riservi aux dosages biologiques in vitro</forUse> </productInfo> <body> <level1><title>CONTENU</title> <para><emphasis role="bold">Chaque Coffret contient les produits suivants:</emphasis></para> ..... </level1> </body> </lang> <lang langID="DE" language="Deutsch" fontFam="Arial"> <fixedterms> <term id="caution" text="WARNHINWEIS"/> <term id="warning" text="WARNUNG"/> <term id="notice" text="HINWEIS"/> </fixedterms> <productInfo> <systemname>SYNCHRON<superscript>®</superscript> SYSTEME</systemname> <productname>KREATINKINASE - MB ISOENZYM (CKMB)</productname> <kitRef><Ref>445375</Ref></kitRef> <forUse>In-Vitro Diagnostikum</forUse> </productInfo> <body> <level1><title>INHALT</title> <para><emphasis role="bold">Jeder Reagenzienkit enthdlt die folgenden Bestandteile:</emphasis></para> ..... </level1> </body> </lang> </Product.Insert> ====================XSL-FO================= <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <!--+===Arbortext "float-class" extension declaration; current use is for "Continued" Section titles===+--> <atixslfoext:float-class float-class-name="continueSecTitle" float-type="repeat-at-page-break" space-between="8pt"/> <xsl:choose> <!--+===Conditional test for attribute 'status' with values 'draft' and 'preview' ===+--> <xsl:when test="Product.Insert[@status='draft'] | Product.Insert[@status='preview']"> <!--++ Establish the Language ("lang") pages ++--> <fo:simple-page-master master-name="Insrt-body-page" page-height="{$doc_height}" page-width="{$doc_width}" margin-top="0.13in" margin-bottom="0.2in" margin-left="0.45in" margin-right="0.45in"> <!--++ Establish the output area(s) language pages ++--> <xsl:choose> <!--++One column 8.5x11 page Inserts++ --> <xsl:when test="//Product.Insert/@column='1col' and //Product.Insert/@pgWidth='8.5in'"> <fo:region-body region-name="Insrt-pgbody" margin-top="0.12in" margin-bottom="0.5in" background-image="watermark.eps"/> <fo:region-before region-name="bcilogo_prodName" extent="13mm" /> <fo:region-after region-name="Col_CpyRght-Footer" extent=".5in"/> <!--++Page count for one column "1col" 8.5x11 Inserts++--> <fo:region-end region-name="lang-pg-ct" extent="0.75in"/> </xsl:when> <xsl:otherwise> <!--++Body pages for all other Inserts++ --> <fo:region-body region-name="Insrt-pgbody" margin-top="0.1in" margin-bottom="0.2in" background-image="watermark.eps"> <!--+===Continued Section Titles on cover page ===+--> <atixslfoext:float-region-before> <atixslfoext:single-float-class-reference float-class-reference="continueSecTitle"/> </atixslfoext:float-region-before> </fo:region-body> <fo:region-after region-name="lang-pg-ct" extent="3mm" /> <fo:region-before region-name="dbServer" extent="3mm" /> </xsl:otherwise> </xsl:choose> </fo:simple-page-master> <!--++ Display entire data in the inserts ++--> <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"> <xsl:choose> <xsl:when test="//toc[@display='yes']"> <xsl:if test="not(position() = 1) and @langID='EN'"> <xsl:attribute name="initial-page-number">1</xsl:attribute> </xsl:if> </xsl:when> <xsl:otherwise><!--This FO is not necessary--></xsl:otherwise> </xsl:choose> <fo:flow flow-name="Insrt-pgbody" font-family="{$font_Fam}"> <xsl:apply-templates mode="OneCol" select="preceding-sibling::productInfo"/> <fo:block keep-with-previous="always"> <xsl:apply-templates/> </fo:block> <!--+Bottom border line ~~ separates each language 8.5x11 single column Inserts+--> <fo:block space-before="2.25mm" text-align="center"> <fo:leader leader-pattern="rule" rule-thickness="4pt" leader-length="80%"/> </fo:block> </fo:flow> </fo:page-sequence><!-- </xsl:for-each>--> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Difference between xmlns:, Florent Georges | Thread | Re: [xsl] Continuous Document Flow, G. Ken Holman |
Re: [xsl] Migration to Xalan 2.7.1, Michael Ludwig | Date | Re: [xsl] Continuous Document Flow, G. Ken Holman |
Month |