a custom header according to page number

2001-12-03 Thread Ismaeil, Sameh Z

Hello everybody
I am a FOP beginner, can somebody help me please with this problem

I need to put a cutsomized header in my pages, the header should contain a
different block (of text) according to the page currently being generated,
so the condition will be based on the page number

1. is there an fo property I can use (say for the static-content or the
block elemtents) that makes certain blocks appear/disappear from headers
according to page number
2. how can I use FOP to generate this content

Thanks a million

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: a custom header according to page number

2001-12-03 Thread Cyril Rognon

Your question is a little underspecified ...

if you want to distinguish odd and even pages, the page master
conditionnal part is for you (see the page master fo definition : chapter
6.4.11
http://www.w3.org/TR/xsl/slice6.html#fo_conditional-page-master-reference).
I think you may handle more than just odd-even with this. Use this with
different header section...

Don't think about using some predicate considering the page number, xsl
fo and fop are loosely coupled, it is meant to be that way. So it forbids
the user to use the internal page number programaticaly (some FO
processor provide extension to do this, fop does not).

if your need is more complex and you have some magic formula to guess
wich page is affected, conditionnal master-page may be to low level
...

Good luck.

At 13:13 03/12/2001 +, you wrote:
Hello everybody
I am a FOP beginner, can somebody help me please with this problem

I need to put a cutsomized header in my pages, the header should contain
a
different block (of text) according to the page currently being
generated,
so the condition will be based on the page number

1. is there an fo property I can use (say for the static-content or
the
block elemtents) that makes certain blocks appear/disappear from
headers
according to page number
2. how can I use FOP to generate this content


Cyril Rognon
http://www.objectiva.fr



RE: a custom header according to page number

2001-12-03 Thread Ismaeil, Sameh Z



Thanks 
Cyril,
please 
see answers below

  -Original Message-From: Cyril Rognon 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, December 03, 2001 3:46 
  PMTo: [EMAIL PROTECTED]Subject: Re: a custom header 
  according to page numberYour question is a little 
  underspecified ...if you want to distinguish odd and even pages, the 
  page master conditionnal part is for you (see the page master fo definition : 
  chapter 6.4.11 
  http://www.w3.org/TR/xsl/slice6.html#fo_conditional-page-master-reference). I 
  think you may handle more than just odd-even with this. Use this with 
  different header section...[Ismaeil, Sameh]no, I don't want to 
  distinguish odd and even pages,specifically, I need to distinguish the 
  frist page from the rest of the pages, any clue?Don't 
  think about using some predicate considering the page number, xsl fo and fop 
  are loosely coupled, it is meant to be that way. So it forbids the user to use 
  the internal page number programaticaly (some FO processor provide extension 
  to do this, fop does not).[Ismaeil, Sameh]yes, I kind of noticed 
  that , it is usually one way: FOP code - fo XSL -pdf 
  documentif your need is more complex and you have some magic 
  formula to guess wich page is affected, conditionnal master-page may be to low 
  level ...[Ismaeil, Sameh]I'll give conditional-master-page some insight 
  and hope it will work, thanks a lotGood 
  luck.At 13:13 03/12/2001 +, you wrote:
  Hello everybodyI am a FOP 
beginner, can somebody help me please with this problemI need to put 
a cutsomized header in my pages, the header should contain adifferent 
block (of text) according to the page currently being generated,so the 
condition will be based on the page number1. is there an fo property 
I can use (say for the static-content or theblock elemtents) that makes 
certain blocks appear/disappear from headersaccording to page 
number2. how can I use FOP to generate this 
  content
  Cyril Rognonhttp://www.objectiva.fr 



RE: a custom header according to page number

2001-12-03 Thread Cyril Rognon

If you only need to ditinguish the first page from the other ones, simply
use a different page-master (reference or name ;-) according to the spec
conformance) and use this page master for your cover page only. This will
do the trick easily.

one page-master for the cover (one page-sequence using this
page-master-reference) , and different page-master for the rest of the
page sequences.

I strongly recomend you to read some FO tutorial, this will spare you a
lot of research work (you'll find some ref on
http://www.w3.org/Style/XSL/)
At 14:18 03/12/2001 +, you wrote:
Thanks
Cyril,
please see answers
below

Your question is a little underspecified ...
...
[Ismaeil, Sameh] no, I don't want to distinguish odd and even pages,
specifically, I need to distinguish the frist page from the rest of the
pages, any clue? 
Don't think about using some predicate considering the page number,
xsl fo and fop are loosely coupled, it is meant to be that way. So it
forbids the user to use the internal page number programaticaly (some FO
processor provide extension to do this, fop does
not).
[Ismaeil, Sameh] yes, I kind of noticed that , it is usually one way:
FOP code - fo XSL -pdf document
if your need is more complex and you have some magic formula to guess
wich page is affected, conditionnal master-page may be to low level
...
[Ismaeil, Sameh] I'll give conditional-master-page some insight and
hope it will work, thanks a lot
Good luck.
...


Cyril Rognon
http://www.objectiva.fr



Re: a custom header according to page number

2001-12-03 Thread Jens Eckert


I do have a similar (or the same?) problem. I have a flow that runs
through all the pages. On the first page, though, I'd like to have a different
header (static content). So far I defined two simple-page masters and a
page-sequence-master that uses a simple-page master for the first page
and the other one for the rest.
But where do I specify where which (static content) header to use? In
the page-masters I can only set margins etc.(?) I tried to use two
page-sequences, one for each page master, but then I get the XML-content
twice: once for the first page sequence once for the second. Can I specify
static content in the page-master?
Thanks
Jens

Cyril Rognon schrieb:
If you only need to ditinguish the first page
from the other ones, simply use a different page-master (reference or name
;-) according to the spec conformance) and use this page master for your
cover page only. This will do the trick easily.
one page-master for the cover (one page-sequence using this page-master-reference)
, and different page-master for the rest of the page sequences.
I strongly recomend you to read some FO tutorial, this will spare you
a lot of research work (you'll find some ref on http://www.w3.org/Style/XSL/)
At 14:18 03/12/2001 +, you wrote:
Thanks
Cyril,
please see answers
below


Your question is a little underspecified ...


...


[Ismaeil, Sameh]
no, I don't want to distinguish odd and even pages, specifically, I need
to distinguish the frist page from the rest of the pages, any clue?


Don't think about using some predicate considering the page number, xsl
fo and fop are loosely coupled, it is meant to be that way. So it forbids
the user to use the internal page number programaticaly (some FO processor
provide extension to do this, fop does not).


[Ismaeil, Sameh]
yes, I kind of noticed that , it is usually one way: FOP code -> fo XSL
->pdf document


if your need is more complex and you have some magic formula to guess wich
page is affected, conditionnal master-page may be to low level ...


[Ismaeil, Sameh]
I'll give conditional-master-page some insight and hope it will work, thanks
a lot


Good luck.


...



Cyril Rognon
http://www.objectiva.fr



Re: a custom header according to page number

2001-12-03 Thread Arved Sandstrom



Hi, Jens

In the page masters you can explicitly specify the 
region-master names also, using the 'region-name' property. It so happens that 
many people leave these off in examples, and the default values (such as 
'xsl-region-start') get assigned. So don't trust examples all the time. 
:-)

Let's say you have one page-master for the first 
page, and another page-master for the rest of the pages. Give the 
region-before's different region-names. Then, in your page-sequence, define 2 
static-contents for the headers, one of which references one region-name, and 
the other references the other region-name. They will get appropriately 
mapped.

Hope this helps.

Arved Sandstrom

  - Original Message - 
  From: 
  Jens 
  Eckert 
  To: [EMAIL PROTECTED] 
  Sent: Monday, December 03, 2001 11:21 
  AM
  Subject: Re: a custom header according to 
  page number
  I do have a similar (or the same?) problem. I have a flow 
  that runs through all the pages. On the first page, though, I'd like to have a 
  different header (static content). So far I defined two simple-page masters 
  and a page-sequence-master that uses a simple-page master for the first page 
  and the other one for the rest. 
  But where do I specify where which (static content) header to use? In the 
  page-masters I can only set margins etc.(?) I tried to use two 
  page-sequences, one for each page master, but then I get the XML-content 
  twice: once for the first page sequence once for the second. Can I specify 
  static content in the page-master? 
  Thanks 
  Jens  
  Cyril Rognon schrieb: 
  If you only need to ditinguish the first page 
from the other ones, simply use a different page-master (reference or name 
;-) according to the spec conformance) and use this page master for your 
cover page only. This will do the trick easily. 
one page-master for the cover (one page-sequence using this 
page-master-reference) , and different page-master for the rest of the page 
sequences. 
I strongly recomend you to read some FO tutorial, this will spare you a 
lot of research work (you'll find some ref on http://www.w3.org/Style/XSL/) At 
14:18 03/12/2001 +, you wrote: 
Thanks Cyril, please see answers 
  below 
  
Your question is a little underspecified ... 
... 
[Ismaeil, Sameh] 
no, I don't want to distinguish odd and even pages, specifically, I need 
to distinguish the frist page from the rest of the pages, any 
clue? 
Don't think about using some predicate considering the page number, 
xsl fo and fop are loosely coupled, it is meant to be that way. So it 
forbids the user to use the internal page number programaticaly (some FO 
processor provide extension to do this, fop does not). 
[Ismaeil, Sameh] 
yes, I kind of noticed that , it is usually one way: FOP code - fo 
XSL -pdf document 
if your need is more complex and you have some magic formula to 
guess wich page is affected, conditionnal master-page may be to low 
level ... 
[Ismaeil, Sameh] 
I'll give conditional-master-page some insight and hope it will work, 
thanks a lot 
Good luck. 
... 
Cyril Rognon http://www.objectiva.fr


Re: a custom header according to page number

2001-12-03 Thread Cyril Rognon

Jens,

I think you are trying to do too much in the fo stage. It is aknowledged
that you have the power of xsl fo to take care of formatting. The feature
you are talking about is a document structure decision. It is meant to be
done by XSLT code. When you decide to create your fo document, you must
have a way to know wether you are writing the cover page or some of the
content after. Thus, you can have one xsl template that will create a
different page-sequence with the appropriate header in the static-content
and some other template that will use a regular page-sequence for the
rest of the document.

this is definitely a job for XSLT. Not to be done in fo only. You need
two explicit page-sequence and you drive this by XSLT.

I hope my explaination is as clear as in my mind... ;-)

At 16:21 03/12/2001 +0100, you wrote:
I do have a similar (or the
same?) problem. I have a flow that runs through all the pages. On
the first page, though, I'd like to have a different header (static
content). So far I defined two simple-page masters and a
page-sequence-master that uses a simple-page master for the first page
and the other one for the rest. 

But where do I specify where which (static content) header to use? In the
page-masters I can only set margins etc.(?) I tried to use two
page-sequences, one for each page master, but then I get the XML-content
twice: once for the first page sequence once for the second. Can I
specify static content in the page-master? 

Cyril Rognon
http://www.objectiva.fr



Re: a custom header according to page number

2001-12-03 Thread Jens Eckert


I had this idea as well, but only FO knows which if it is formatting the
first or the other pages.
But Arved's approach works fine. Thanks a lot!
Jens
Cyril Rognon schrieb:
Jens,
I think you are trying to do too much in the fo stage. It is aknowledged
that you have the power of xsl fo to take care of formatting. The feature
you are talking about is a document structure decision. It is meant to
be done by XSLT code. When you decide to create your fo document, you must
have a way to know wether you are writing the cover page or some of the
content after. Thus, you can have one xsl template that will create a different
page-sequence with the appropriate header in the static-content and some
other template that will use a regular page-sequence for the rest of the
document.
this is definitely a job for XSLT. Not to be done in fo only. You need
two explicit page-sequence and you drive this by XSLT.
I hope my explaination is as clear as in my mind... ;-)
At 16:21 03/12/2001 +0100, you wrote:
I do have a similar (or the same?)
problem. I have a flow that runs through all the pages. On the first page,
though, I'd like to have a different header (static content). So far I
defined two simple-page masters and a page-sequence-master that uses a
simple-page master for the first page and the other one for the rest.
But where do I specify where which (static content) header to use? In
the page-masters I can only set margins etc.(?) I tried to use two
page-sequences, one for each page master, but then I get the XML-content
twice: once for the first page sequence once for the second. Can I specify
static content in the page-master?

Cyril Rognon
http://www.objectiva.fr