[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: how to trigger a new page sequence, depending on

Subject: Re: how to trigger a new page sequence, depending on specific input conditions
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Thu, 6 Oct 2011 14:37:28 +0100 (IST)
Re:  how to trigger a new page sequence
On Thu, October 6, 2011 1:29 pm, team wise wrote:
...
> FO implementations that are comprised of two separate
> <fo:page-sequence>, among others result in PDF that contains two back
> page.
>
> Solutions I have taken so far, which do not work as expected, are
> explained below:
>
> First, here is the 'insert.lastchapter' named template that triggers a
> new page sequence for the 'back page' only, which works just fine.
> Note that 'insert.lastchapter' is pretty much duplicate of the
> 'insert.chapter', which is briefly explained below.
>
> <xsl:template name="insert.lastchapter">
>   <xsl:param name="content"/>

What does $content do?  You don't seem to be using it.

>       <xsl:if test="$outputformat = 'UG_Booklet_Print'">
>         <xsl:for-each select="*[contains(@outputclass, 'pagebreak')]">

It's still not clear to me how much is being repeated that isn't wanted,
but this will process only the last element that has
'outputclass="pagebreak"' [2]:

   <xsl:for-each select="*[contains(@outputclass, 'pagebreak')][last()]">

It's also not clear to me whether there's anything that comes after the
last element that has 'outputclass="pagebreak"'.

>          <xsl:variable name="position" select="position()" />
>           <fo:page-sequence initial-page-number="auto" format="1">
>             <xsl:attribute
> name="master-reference">chapter-master</xsl:attribute>

That could have been a literal attribute.

...
>        <xsl:apply-templates select=". |
> preceding-sibling::*[count(preceding-sibling::*[contains(@outputclass,
> 'pagebreak')]) = $position - 1]" />
>     <fo:flow flow-name="region.body">

I would have thought that the xsl:apply-templates would have gone here,
not before the fo:flow.

>      </fo:flow>
>      </fo:page-sequence>
>   </xsl:for-each>
>    </xsl:if>
> </xsl:template>

Is it the case that all you really need is 'break-after="page"' or
'break-after="odd-page"' [1] on the fo:block for the element that has
'outputclass="pagebreak"'?

> Second, as indicated below, to prevent <fo:flow
> flow-name"region.body"> from flowing in the last node to appear on the
> last page or the back page repeatedly within 'insert.chapter', I have
> tried

I don't understand "prevent <fo:flow flow-name"region.body"> from flowing
in the last node".

Regards,


Tony Graham                                   tgraham@xxxxxxxxxx
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming

[1] http://www.w3.org/TR/xsl11/#break-after
[2] And, if you keep the current contents of the xsl:for-each,
    maybe some of its siblings as well.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.