You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Kelly Campbell <ca...@camk.net> on 2000/11/09 09:18:24 UTC
page-sequence-master spec questions
I've been trying to study the xsl spec in regards to helping Arved with
the flow/static content regions implementation, and I think I sort of
understand what the spec is saying. I just wanted to solicit some feedback
from Arved or anyone else on the list who has studied this to make sure
I'm understanding it, and also to see if anyone has some good examples of
where this would be used in publishing, say, a book.
The rest of this message might be alot to digest. If anyone has pointers
to examples, tutorials, or other resources that might make this clearer to
me, I'd appreciate it. I think I understand the static content pretty well
since it is rather straightforward. It's the flows and how they relate to
named regions that I'm struggling with.
I tried to rewrite the spec of page-sequence-master in normal human
readable terms. My brain can only handle so many sequences of words with
the word "sequence". Here's what I gleaned:
>>>>> BEGIN
6.4.7: fo:page-sequence-master
There are 2 kinds of sub-sequences:
1. a list of references to page masters
2. a repeating list of page masters
Constraint:
The children of the fo:page-sequence-master make a list of
"sub-sequence-specifiers"
properties of this constraint:
a) the resulting page sequence can be grouped into lists of pages which
map 1:1 to the list of sub-sequence-specifiers which are children of
the page-sequence-master
b) for each group of pages, the pages satisfy the constraints of the
cooresponding sub-sequence-specifier
Note: there can be more sub-sequence-specifiers than there are groups of
pages
It is an error if the entire list of sub-sequence-specifiers is used up
and some areas returned by a flow are not placed. Implementations may
recover by reusing the last sub-sequence-specifier that was used to
generate a page.
<<<<< END
Questions:
On a bounded repeatable-master-reference, is property b) broken if the
flow is longer than the allowed number of repeating pages?
What do you do with the left-over flow content if b) can't be met?
Of the two types of sub-sequences, I'm assuming you can intermix them. Is
this correct?
When you have just a list of simple-page-master-references, do you just
iterate over them, e.g. m1, m2, m3, m1, m2, m3, m1... or does property 1
not hold if you do this?
When you have a flow that wants to be associated with a named region, e.g.
xsl-region-body2 in multiflows.fo (Arved's examples), what do you do?
start the new sub-sequence with the second repeatable-page-master I
assume. What if the flow wants the default xsl-region-body? which
sub-sequence do you use?
Can flows be named for and render into before and after areas just like
static content?
-Kelly
--
Kelly A. Campbell Software Engineer
camk@channelpoint.com Channelpoint, Inc.
camk@camk.net camk@merlotxml.org Colorado Springs, Co.
Re: page-sequence-master spec questions
Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 01:18 AM 11/9/00 -0700, Kelly Campbell wrote:
[ Snippage ]
>On a bounded repeatable-master-reference, is property b) broken if the
>flow is longer than the allowed number of repeating pages?
There are more pages in the sequence than can be mapped to the
subsequence-specifier; the pages do NOT satisfy the constraints.
>What do you do with the left-over flow content if b) can't be met?
As you suggest, you don't know that there is too much flow for the
subsequence-specifier, as a rule, until you lay stuff out. At that point I'd
say the app throws an exception: the FO explicitly set an incorrect
"maximum-repeats". The process terminates because the FO was wrong.
>Of the two types of sub-sequences, I'm assuming you can intermix them. Is
>this correct?
I'm not sure I understand. An fo:page-sequence can only reference 1
simple-page-master OR 1 page-sequence-master. In the sense that one FO file
can have multiple page-sequences, each referencing either a different
simple-page-master, or a different page-sequence-master (with each of
_these_ being a list of references), then yes, at that level. But there is
no intermixing of masters, directly, for a given page-sequence. Section 6.4.7
indicates that the possible and allowable intermixing is for single and
repeatable _page-master-references_.
>When you have just a list of simple-page-master-references, do you just
>iterate over them, e.g. m1, m2, m3, m1, m2, m3, m1... or does property 1
>not hold if you do this?
There are N pages that map to N single-page-master-references. A
single-page-master-reference is used once and once only. So there is no
iteration of the sort that you suggest.
I should add that the XSL spec, in Section 6.4.7, allows us (FOP developers)
to recover from subsequence-specifier exhaustion by using the last one. I
don't have my code right in front of me (I'm on Windows, and my stuff is on
Linux), but as I recall, I considered that in most cases this was not
sensible, particularly for an explicit maximum-repeats situation. If someone
were to argue that if an FO specified 3 single-page-master-references m1, m2
and m3, and we needed 5 pages, and since the spec would allow us to re-use
m3 to layout page 4 and page 5, that we should do it this way, I could be
swayed, provided that we issued a warning.
>When you have a flow that wants to be associated with a named region, e.g.
>xsl-region-body2 in multiflows.fo (Arved's examples), what do you do?
>start the new sub-sequence with the second repeatable-page-master I
>assume. What if the flow wants the default xsl-region-body? which
>sub-sequence do you use?
I should elaborate on my take on multiple flows in a page-sequence. The BNF
in Section 6.4.5 indicates that we have ONE fo:flow. However, bearing in
mind that the language "flow children" means both fo:flows and
fo:static-contents, there is at least one revealing phrase elsewhere in that
section, namely:
"The default ordering constraints apply to the child fo:flow objects;
special ordering constraints apply to the child fo:static-content objects."
This clearly suggests the presence of multiple fo:flows. Furthermore,
consider a situation that is probably not out to lunch, where the body
content of alternating pages (left and right) logically comes from different
streams.
Having said all that, "multiflows.fo" is a stretch-the-limit "proof of
concept" FO that explores the spec. It's a test case for fringe behaviour.
So I'd be careful with it. :-) However, I do believe that in that example,
as atrocious as it might be, when flow 1 runs out, and the constraints on
the first repeatable-page-master-reference certainly are not violated, flow
2 can be satisfied by repeatable-page-master-reference #2, and so forth
(order must be satisfied). But it's ugly. Much better to use multiple
page-sequences.
>Can flows be named for and render into before and after areas just like
>static content?
Yes, and static-content can go into the region-body. We just haven't set up
FOP that way.
It ought not to be any great stretch to go for broke and adapt FOP to have
regions (all 5 of them) accept content from _any_ flow.
Arved
Senior Developer
e-plicity.com (www.e-plicity.com)
Halifax, Nova Scotia
"B2B Wireless in Canada's Ocean Playground"