Hi Pascal,
 
If I'm understanding you correctly I think this could work.  I realize it's for 
FOP development and it may not be an FOP issue, but it's not a pure XSLT issue. 
 The XSLT handles HTML style formatting.  The FOP is the paging formatter.  
This is a page issue.  As you say try "2 passes" I'm thinking I just need to 
separate the tags, that I'm trying to break on PAGE_DATA which triggers the new 
page call to the simple-page-master, then I'm trying to find the page layout 
data under the PAGE_DATA.  I should be able to get the page layout data before 
I find the PAGE_DATA tag to start the new pages..

________________________________

From: Pascal Sancho [mailto:[email protected]] 
Sent: Thursday, August 05, 2010 8:52 AM
To: [email protected]
Subject: Re: XSL Page Variable


Hi Eric,

this list is about FOP development, not XSLT or XSL-FO questions.
That said:
 - all pages features are nested in the fo:root/fo:layout-master-set element,
 - while content is nested in fo:root/fo:page-sequence.

Therefore you should process your XML in a 2 passes XSLT:
 - 1 template for page masters,
 - 1 template for content.

Pascal


Le 05/08/2010 14:26, Eric Douglas a écrit : 

        If the shell of my XSL looks like this: 
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format 
<http://www.google.com/url?sa=D&q=http://www.w3.org/1999/XSL/Format&usg=AFQjCNHZhPMfx2p6D5n2w5qLURB5k932Cw>
 ">
        <fo:layout-master-set>
        <fo:simple-page-master>
        <xsl:attribute name="master-name">STANDARD_PAGE</xsl:attribute>
        <xsl:attribute name="margin-bottom"><xsl:value-of
        select="PAGE_DATA/MARGIN_BOTTOM"/></xsl:attribute>
        <fo:region-body>
        </fo:region-body>
        </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence>
        <xsl:attribute name="master-reference">STANDARD_PAGE</xsl:attribute>
        <fo:flow>
        <xsl:attribute name="flow-name">xsl-region-body</xsl:attribute>
        <xsl:for-each select="PAGE_DATA">
        <fo:block>
        <xsl:attribute name="break-before">page</xsl:attribute>
        <xsl:for-each select="*">
        ...
        </xsl:for-each>
        </fo:block>
        </xsl:for-each>
        </fo:flow>
        </fo:page-sequence>
        </fo:root> 
        So I have all my data grouped by what to print on each page, under a
        PAGE_DATA tag in the XML. Now I'm trying to put a tag under the
        PAGE_DATA tag to specify different attributes for each page, such as
        the margin-bottom mentioned here. As it is written here, it is using
        the value of the MARGIN_BOTTOM tag for the margin-bottom attribute,
        but it's only taking the last tag in the XML and applying it to all
        pages. How do I change the attributes for each page?
        Is there a place where I can set a variable from the XML tag value
        which can be processed after the for-each statement and before the
        page attributes? 


Reply via email to