You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Christiane Fritze <fr...@bbaw.de> on 2006/03/06 17:54:20 UTC
page sequencing for parallel print
Hi all,
for a parallel printed edition I need two different transformations of
the same xml-document, which is easily made by means of the 'mode'
attribute.
Parallel printed means that one version of the text has to be on all odd
pages, the other version on all even pages (if you need see below).
If two <fo:flow>s in <fo:page-sequence>s were allowed, I could have
somthing like this:
<fo:page-sequence master-reference="allPages" force-page-count="auto"
format="1"> >
...
<fo:flow flow-name="bodyPageRight">
<xsl:apply-templates mode="right">
</fo flow>
<fo:flow flow-name="bodyPageLeft">
<xsl:apply-templates mode="left">
</fo flow>
</fo:page-sequence>
So I need two <fo:page-sequence>s (for the complete strucure of my
fo.xsl see below).
But how do I have to handle the <fo:page-sequence-master>s to get an
page-alternately rendered text?
| page 1 | page 2 |
| | |
| text version one text | same text version two sa |
| version one text vers | me text version two same |
| ion one text version | text version two same te |
| one text version one | xt version two same text |
| text version one text | version two same text ve |
| page 3 | page 4 |
| | |
| version one text vers | rsion two same text vers |
| ion one text version | ion two same text versio |
| one text version one | n two same text version |
| text version one text | two same text version tw |
| version one text vers | o same text version two |
and so on...
I use FOP 0.91 beta.
Thank you in advance for any help.
--
Christiane
--------------------------------------------------
The complete but shortened structure of my fo.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- some parameters -->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
font-selection-strategy="character-by-character">
<fo:layout-master-set>
<fo:simple-page-master master-name="pageRight"
page-height="{$hoehe}" page-width="{$breite}" margin-top="1cm"
margin-bottom="1cm" margin-left="2.5cm" margin-right="2cm">
<fo:region-body margin-top="0.5cm" margin-bottom="0.5cm"
column-count="{$Spaltenanzahl}" column-gap="0.7cm"
region-name="bodyPageRight"/>
<fo:region-before extent="1cm" region-name="oben_rechts"/>
<fo:region-after extent="0.5cm" region-name="unten_rechts"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="pageLeft"
page-height="{$hoehe}" page-width="{$breite}" margin-top="1cm"
margin-bottom="1cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="0.5cm" margin-bottom="0.5cm"
column-count="2" column-gap="0.7cm" region-name="bodyPageLeft"/>
<fo:region-before extent="3cm" region-name="oben_links"/>
<fo:region-after extent="0.5cm" region-name="unten_links"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="pagesRight">
<!-- ??? -->
</fo:page-sequence-master>
<fo:page-sequence-master master-name="pagesLeft">
<!-- ??? -->
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="pagesRight"
force-page-count="auto" format="1">
<fo:static-content flow-name="unten_rechts">
<fo:block space-before="5pt" text-align="right"
font-size="{$Schriftgroesse}" font-family="serif">
<fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="bodyPageRight" font-size="{$Schriftgroesse}"
language="de" text-align="justify" font-family="{$Schriftart}">
<fo:block>
<xsl:apply-templates mode="right"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="pagesLeft"
force-page-count="auto" format="1">
<fo:static-content flow-name="unten_rechts">
<fo:block space-before="5pt" text-align="right"
font-size="{$Schriftgroesse}" font-family="serif">
<fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="bodyPageLeft"
font-size="{$Schriftgroesse}" language="de" text-align="justify"
font-family="{$Schriftart}">
<fo:block>
<xsl:apply-templates mode="left"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="iconographia" mode="right">
<!-- something to do -->
</xsl:template>
<xsl:template match="preservation" mode="left">
<!-- something else to do -->
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: page sequencing for parallel print
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Partially. We've already implemented the bookmark feature in 0.91beta.
Other features will be added as people invest effort into FOP.
On 07.03.2006 11:33:11 Christiane Fritze wrote:
> Will the next FOP follow the new XSL 1.1 candidate recommendation?
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: page sequencing for parallel print
Posted by Christiane Fritze <fr...@bbaw.de>.
Jeremias,
thank you for your informations. I already looked at the XSL 1.1
recommendation
but I think the flow-map too will not work in my case because I need
some page
related fo functions like page number, running headers etc...
So I will have a look at the PDF post processors.
Will the next FOP follow the new XSL 1.1 candidate recommendation?
Thanks,
Christiane
Jeremias Maerki schrieb:
>Hmm, I don't think that will help Christiane. This doesn't allow you to
>alternate between two flows. XSL 1.0 only supports one flow per
>page-sequence. Maybe the flow maps in the upcoming XSL 1.1 might help.
>But these are not supported by FOP, yet.
>
>My suggestion is to render the two editions after each other in two
>separate page-sequences and then using a PDF post-processor [1] to
>rearrange the page order inside the document.
>
>[1] http://xmlgraphics.apache.org/fop/resources.html#products-pdf
>
>On 07.03.2006 00:54:27 Karl Roberts wrote:
>
>
>>Check out http://xmlgraphics.apache.org/fop/fo.html#fo-oddeven
>>
>>It'll show you how (basically you set up a <fo:page-sequence-master
>>master-name="parallel"/> that contains
>><fo:repeatable-page-master-alternatives>'s for your left and right hand
>><fo:simple-page-master> then make your <fo:page-sequence
>>master-reference="parallel">
>>
>>Cheers
>>
>>Karl
>>
>>-----Original Message-----
>>From: Christiane Fritze [mailto:fritze@bbaw.de]
>>Sent: Tuesday, 7 March 2006 3:54 AM
>>To: fop-users@xmlgraphics.apache.org
>>Subject: page sequencing for parallel print
>>
>>Hi all,
>>
>>for a parallel printed edition I need two different transformations of
>>the same xml-document, which is easily made by means of the 'mode'
>>attribute.
>>
>>Parallel printed means that one version of the text has to be on all odd
>>pages, the other version on all even pages (if you need see below).
>>
>>If two <fo:flow>s in <fo:page-sequence>s were allowed, I could have
>>somthing like this:
>>
>><fo:page-sequence master-reference="allPages" force-page-count="auto" format="1"> >
>> ...
>> <fo:flow flow-name="bodyPageRight">
>> <xsl:apply-templates mode="right">
>> </fo flow>
>> <fo:flow flow-name="bodyPageLeft">
>> <xsl:apply-templates mode="left">
>> </fo flow>
>></fo:page-sequence>
>>
>>So I need two <fo:page-sequence>s (for the complete strucure of my
>>fo.xsl see below).
>>But how do I have to handle the <fo:page-sequence-master>s to get an
>>page-alternately rendered text?
>>
>>| page 1 | page 2 |
>>| | |
>>| text version one text | same text version two sa | version one text
>>| vers | me text version two same |
>>| ion one text version | text version two same te |
>>| one text version one | xt version two same text |
>>| text version one text | version two same text ve |
>>
>>
>>| page 3 | page 4 |
>>| | |
>>| version one text vers | rsion two same text vers |
>>| ion one text version | ion two same text versio |
>>| one text version one | n two same text version |
>>| text version one text | two same text version tw | version one text
>>| vers | o same text version two |
>>
>>and so on...
>>
>>
>>I use FOP 0.91 beta.
>>
>>Thank you in advance for any help.
>>
>>
><snip/>
>
>Jeremias Maerki
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: page sequencing for parallel print
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, I don't think that will help Christiane. This doesn't allow you to
alternate between two flows. XSL 1.0 only supports one flow per
page-sequence. Maybe the flow maps in the upcoming XSL 1.1 might help.
But these are not supported by FOP, yet.
My suggestion is to render the two editions after each other in two
separate page-sequences and then using a PDF post-processor [1] to
rearrange the page order inside the document.
[1] http://xmlgraphics.apache.org/fop/resources.html#products-pdf
On 07.03.2006 00:54:27 Karl Roberts wrote:
> Check out http://xmlgraphics.apache.org/fop/fo.html#fo-oddeven
>
> It'll show you how (basically you set up a <fo:page-sequence-master
> master-name="parallel"/> that contains
> <fo:repeatable-page-master-alternatives>'s for your left and right hand
> <fo:simple-page-master> then make your <fo:page-sequence
> master-reference="parallel">
>
> Cheers
>
> Karl
>
> -----Original Message-----
> From: Christiane Fritze [mailto:fritze@bbaw.de]
> Sent: Tuesday, 7 March 2006 3:54 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: page sequencing for parallel print
>
> Hi all,
>
> for a parallel printed edition I need two different transformations of
> the same xml-document, which is easily made by means of the 'mode'
> attribute.
>
> Parallel printed means that one version of the text has to be on all odd
> pages, the other version on all even pages (if you need see below).
>
> If two <fo:flow>s in <fo:page-sequence>s were allowed, I could have
> somthing like this:
>
> <fo:page-sequence master-reference="allPages" force-page-count="auto" format="1"> >
> ...
> <fo:flow flow-name="bodyPageRight">
> <xsl:apply-templates mode="right">
> </fo flow>
> <fo:flow flow-name="bodyPageLeft">
> <xsl:apply-templates mode="left">
> </fo flow>
> </fo:page-sequence>
>
> So I need two <fo:page-sequence>s (for the complete strucure of my
> fo.xsl see below).
> But how do I have to handle the <fo:page-sequence-master>s to get an
> page-alternately rendered text?
>
> | page 1 | page 2 |
> | | |
> | text version one text | same text version two sa | version one text
> | vers | me text version two same |
> | ion one text version | text version two same te |
> | one text version one | xt version two same text |
> | text version one text | version two same text ve |
>
>
> | page 3 | page 4 |
> | | |
> | version one text vers | rsion two same text vers |
> | ion one text version | ion two same text versio |
> | one text version one | n two same text version |
> | text version one text | two same text version tw | version one text
> | vers | o same text version two |
>
> and so on...
>
>
> I use FOP 0.91 beta.
>
> Thank you in advance for any help.
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org