[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: team wise <dfanster@xxxxxxxxx>
Date: Thu, 6 Oct 2011 21:36:52 +0800
Re:  how to trigger a new page sequence
Thanks Brandon for your contined interest in following up this thread of
emails.
Sorry about being wordy.
Let me reiterate:
I want to a final PDF comes with a single back page only and remove
the duplicate one. The cause of the problem , to the best of my
knowledge, is due to the fact that the <insert.chapter> template takes
recursively each topicref node in the merged DITA XML, without giving
considerations to the other 'insert.lastchapter' that already
generates the back page with desireable rendering effect.
I think I am really weak in applying Xpath properly.

Cheers,
Ray
2011/10/6 Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx>:
> I have read all of your messages and I still don't understand what
> you're trying to do.  I suspect that this is because you're trying to
> explain what you want in terms of how you've tried to solve it, which
> isn't working.
>
> Can you just tell us what you want the result to be?  Pretend you
> don't know anything about XSL-FO or XSLT.  Just describe the outcome
> from the point of view of an author who understands the DITA source.
> A few short sentences should be adequate. :)
>
> -Brandon :)
>
>
> On Thu, Oct 6, 2011 at 8:29 AM, team wise <dfanster@xxxxxxxxx> wrote:
>> Hi XSL list,
>> Thanks to Tony's generous help,  I have been very close to solving the
>> problem I have when outputing a desirable PDF using XSL FO. However, I
>> am still stuck in the final step.
>> To facilitate this problem solving endeavor,I am trying to make the
>> problem statement as succint as possible to get started quickly.
>> Problem:
>> 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"/>
>>      <xsl:if test="$outputformat = 'UG_Booklet_Print'">
>>        <xsl:for-each select="*[contains(@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>
>>          <xsl:choose>
>>         <xsl:when test="position() = last()">
>>           <xsl:attribute name="axf:background-color">
>>           <xsl:message>21</xsl:message>
>>           <xsl:value-of
>>           select="$background_colour"/></xsl:attribute>
>>           <xsl:attribute
>> name="color">rgb-icc(#CMYK,0%,0%,0%,0%)</xsl:attribute>
>>         </xsl:when>
>>         <xsl:otherwise>
>>           <xsl:attribute
>> name="color">rgb-icc(#CMYK,0%,0%,0%,80%)</xsl:attribute>
>>         </xsl:otherwise>
>>       </xsl:choose>
>>       <xsl:apply-templates select=". |
>> preceding-sibling::*[count(preceding-sibling::*[contains(@outputclass,
>> 'pagebreak')]) = $position - 1]" />
>>    <fo:flow flow-name="region.body">
>>     </fo:flow>
>>     </fo:page-sequence>
>>  </xsl:for-each>
>>   </xsl:if>
>> </xsl:template>
>>
>> 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
>>     <xsl:when test="(contains($outputformat, 'UG_Booklet_Print') and
>> position() != 'last()')">
>>  or <xsl:when test="contains($outputformat, 'UG_Booklet_Print') and
>> not (position() = last())"> within <xsl:for-each
>> select="*[contains(@refclass, '
>>
>> map/topicref ')]">...</xsl:for-each>  , which is of no avail,
>> unfortunately. As it has taken me a while to solve it, I am asking if
>> anyone who is able to help me out?
>> The input to FO is effectively a merged 'DITA XML' that features this node
tree:
>> <map>
>>   <concept>
>>     <title>Getting started</title>
>>        ...
>>   </concept>
>>    <Reference>
>>     <title>Android Market</title>
>>        ...
>>    </Reference>
>>    <concept>
>>     <title>Exploring and get support</title>
>>     </concept>
>> </map>
>> Thanks.
>> Ray
>
>



--
Keep an Exacting Eye for Detail

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.