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 Reichert Bernard <va...@gmx.net> on 2002/07/18 10:07:48 UTC

xsl:if how to?

Hi !
I need some helop using xsl :if I want to check if the current page
isn’t the first :
	<xsl:if test="page-number>1">
	<fo:table-row>
		<fo:table-cell border=...>
		...
it should be something like this does somebody knwo how I could do that?
Do I need to add a variale wich is increased on every new side?
Regards
Reichert Bernard



Re: xsl:if how to?

Posted by sascha <sa...@assbach.de>.
i think it's not > but &gt

sascha


----- Original Message ----- 
From: "Reichert Bernard" <va...@gmx.net>
To: <fo...@xml.apache.org>
Sent: Thursday, July 18, 2002 10:07 AM
Subject: xsl:if how to?


Hi !
I need some helop using xsl :if I want to check if the current page
isn't the first :
<xsl:if test="page-number>1">
<fo:table-row>
<fo:table-cell border=...>
...
it should be something like this does somebody knwo how I could do that?
Do I need to add a variale wich is increased on every new side?
Regards
Reichert Bernard



AW: xsl:if how to?

Posted by Reichert Bernard <va...@gmx.net>.
Thanks but I found an other solution.
I just sat the Variable after the header on the first side.
And then every tim ewhen the header is found he will use the Variable to
add supplemental data only the fist page wont use it.
Thanks however 
Regards
Reichert Bernard

-----Ursprüngliche Nachricht-----
Von: Rodolphe VAGNER [mailto:rodolphe.vagner@eurodoc-sofilog.com] 
Gesendet: Thursday, July 18, 2002 10:36 AM
An: fop-user@xml.apache.org
Betreff: Re: xsl:if how to?

I beleave Chris is rigth,
you should try to use something like :

<fo:page-sequence-master  master-name="nameOfSequence">
        <fo:repeatable-page-master-alternatives>
           <fo:conditional-page-master-reference
master-reference="blank"
blank-or-not-blank="blank"/>
           <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForOddPages" odd-or-even="odd"
page-position="rest" />
             <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForEvenPages"
odd-or-even="even"
page-position="rest"/>
             <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForFirstPage"
page-position="first"/>
        </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

So you'll have different simple-page master on first and other pages.
Does it help ?



----- Original Message -----
From: "Christopher R. Maden" <cr...@maden.org>
To: <fo...@xml.apache.org>
Sent: Thursday, July 18, 2002 10:11 AM
Subject: Re: xsl:if how to?


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At 01:07 18/7/02, Reichert Bernard wrote:
> >I need some helop using xsl :if I want to check if the current page
> >isn't the first :
> >         <xsl:if test="page-number>1">
> >         <fo:table-row>
> >                 <fo:table-cell border=...>
> >                 ...
>
> That's a big no-can-do.
>
> The <xsl:if> element is processed by the XSLT transformation stage to
> create the FO output.  Since it's the FO processor that turns the FO
> document into a laid-out document, there's no concept of page numbers
at
> the XSLT stage.
>
> To handle different pages differently, use different page masters; see
the
> examples that ship with FOP.
>
> ~Chris
> - --
> Christopher R. Maden, Principal Consultant, crism consulting
> DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
> <URL: http://crism.maden.org/consulting/ >
> PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Personal Privacy 6.5.8
>
> iQA/AwUBPTZ4TaxS+CWv7FjaEQKX9QCgjV4gBhumK/2sbcNnmrQuuMZAe34AoN5G
> F+m2SzWFawaWI/7qPAUuBoAz
> =UXrd
> -----END PGP SIGNATURE-----
>


Re: xsl:if how to?

Posted by Rodolphe VAGNER <ro...@eurodoc-sofilog.com>.
I beleave Chris is rigth,
you should try to use something like :

<fo:page-sequence-master  master-name="nameOfSequence">
        <fo:repeatable-page-master-alternatives>
           <fo:conditional-page-master-reference   master-reference="blank"
blank-or-not-blank="blank"/>
           <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForOddPages" odd-or-even="odd"
page-position="rest" />
             <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForEvenPages" odd-or-even="even"
page-position="rest"/>
             <fo:conditional-page-master-reference
master-reference="nameOfSimple-page-masterForFirstPage"
page-position="first"/>
        </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

So you'll have different simple-page master on first and other pages.
Does it help ?



----- Original Message -----
From: "Christopher R. Maden" <cr...@maden.org>
To: <fo...@xml.apache.org>
Sent: Thursday, July 18, 2002 10:11 AM
Subject: Re: xsl:if how to?


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At 01:07 18/7/02, Reichert Bernard wrote:
> >I need some helop using xsl :if I want to check if the current page
> >isn't the first :
> >         <xsl:if test="page-number>1">
> >         <fo:table-row>
> >                 <fo:table-cell border=...>
> >                 ...
>
> That's a big no-can-do.
>
> The <xsl:if> element is processed by the XSLT transformation stage to
> create the FO output.  Since it's the FO processor that turns the FO
> document into a laid-out document, there's no concept of page numbers at
> the XSLT stage.
>
> To handle different pages differently, use different page masters; see the
> examples that ship with FOP.
>
> ~Chris
> - --
> Christopher R. Maden, Principal Consultant, crism consulting
> DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
> <URL: http://crism.maden.org/consulting/ >
> PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Personal Privacy 6.5.8
>
> iQA/AwUBPTZ4TaxS+CWv7FjaEQKX9QCgjV4gBhumK/2sbcNnmrQuuMZAe34AoN5G
> F+m2SzWFawaWI/7qPAUuBoAz
> =UXrd
> -----END PGP SIGNATURE-----
>


Re: xsl:if how to?

Posted by "Christopher R. Maden" <cr...@maden.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 01:07 18/7/02, Reichert Bernard wrote:
>I need some helop using xsl :if I want to check if the current page
>isn't the first :
>         <xsl:if test="page-number>1">
>         <fo:table-row>
>                 <fo:table-cell border=...>
>                 ...

That's a big no-can-do.

The <xsl:if> element is processed by the XSLT transformation stage to 
create the FO output.  Since it's the FO processor that turns the FO 
document into a laid-out document, there's no concept of page numbers at 
the XSLT stage.

To handle different pages differently, use different page masters; see the 
examples that ship with FOP.

~Chris
- -- 
Christopher R. Maden, Principal Consultant, crism consulting
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA
-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.8

iQA/AwUBPTZ4TaxS+CWv7FjaEQKX9QCgjV4gBhumK/2sbcNnmrQuuMZAe34AoN5G
F+m2SzWFawaWI/7qPAUuBoAz
=UXrd
-----END PGP SIGNATURE-----


AW: if how to?

Posted by Reichert Bernard <va...@gmx.net>.
But it doesn't works why?
See my source:
<xsl:template name="Index">
	<fo:table-header>
	<xsl:if test="not-first-page='true'">
	<fo:table-row>
		<fo:table-cell border-color="white" border-style="solid"
border-width=".2pt" border-bottom-width=".4pt">
			<fo:block  border-color="white"
border-style="solid" border-width=".1pt"  font-size="8pt" >
				&#160;sdfjjjjjjjjjjjjjjjjjjjjjjjjjjjj
			</fo:block>
		</fo:table-cell>
	</fo:table-row>
	</xsl:if>
		<fo:table-row>
			<fo:table-cell border-color="black"
border-style="solid" border-bottom-color="black"  border-width=".2pt"
border-bottom-width=".4pt">
				<fo:block  border-bottom-color="black"
border-style="solid" border-width=".1pt"  font-size="8pt">
			 [Total]<xsl:variable name="not-first-page"
select="true"/>
				</fo:block>
			</fo:table-cell>	
		</fo:table-row>
	</fo:table-header>
</xsl:template>

-----Ursprüngliche Nachricht-----
Von: Reichert Bernard [mailto:valen16@gmx.net] 
Gesendet: Thursday, July 18, 2002 10:08 AM
An: fop-user@xml.apache.org
Betreff: xsl:if how to?

Hi !
I need some helop using xsl :if I want to check if the current page
isn’t the first :
	<xsl:if test="page-number>1">
	<fo:table-row>
		<fo:table-cell border=...>
		...
it should be something like this does somebody knwo how I could do that?
Do I need to add a variale wich is increased on every new side?
Regards
Reichert Bernard