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 "Peter B. West" <pb...@powerup.com.au> on 2002/11/23 14:42:11 UTC

Problems with examples

Fop-devs,

I have debugging my FO tree building be running it against various 
example fo files.  Of the three I have used so far, I have found 
problems with two.

./docs/examples/pagination/allregions.fo has the problem that I 
mentioned in an earlier past; the simple-page-master does not have 
region-body as the first region specified.

./docs/examples/tables/background.fo has two problems. 
<uri-specification>s are not defined using the url() notation, but the 
text of the URI is used directly, as in

<fo:basic-link external-destination="normal.pdf">normal.pdf</fo:basic-link>

In addition, the text uses "orange" as a colour, which it ain't, at 
least as far as XSL-FO is concerned.  It is a system-color(), however, 
as far as FOP is concerned.

I assume that these errors are not deliberate, and that I should clean 
them up as I go.

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by Oleg Tkachenko <ol...@multiconn.com>.
W. Eliot Kimber wrote:

>> In the meantime, the spec is plain on this point, so why not follow it? 
> 
> 
> Absolutely, we should follow the spec--that is the safest route. I was 
> really just noting that, given the unique aspect of this one sequence 
> group, XEP's validator was not entirely out of line for not enforcing it 
> strictly. But it probably should issue a warning, at least. I'll submit 
> that on the XEP support list.

I agree that formally it's an error, but considering the current status 
quo I believe we can afford only a warning.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by Oleg Tkachenko <ol...@multiconn.com>.
W. Eliot Kimber wrote:

>> strictly. But it probably should issue a warning, at least. I'll 
>> submit that on the XEP support list.
> 
> 
> RenderX reports that this change will be in the next maintenance release 
> of XEP.
btw, apart from mandatory first region-body there is also 
region-before?, region-after?, region-start?, region-end? ordered 
sequence. Are they planning to validate it also?

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by "W. Eliot Kimber" <el...@isogen.com>.
W. Eliot Kimber wrote:

> strictly. But it probably should issue a warning, at least. I'll submit 
> that on the XEP support list.

RenderX reports that this change will be in the next maintenance release 
of XEP.

Cheers,

E.
-- 
W. Eliot Kimber, eliot@isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by "W. Eliot Kimber" <el...@isogen.com>.
Peter B. West wrote:
> W. Eliot Kimber wrote:

> Eliot,
> 
> I'm not sure how to proceed.  The war-cry of workers on the X-web is 
> surely, "Remember HTML!"  The argument for a new content model for 
> simple-page-master is cogent, and I'm sure that the editors will listen 
> to it. (How the result will be expressed is a different matter.  How 
> *do* you express it?)
> 
> In the meantime, the spec is plain on this point, so why not follow it? 

Absolutely, we should follow the spec--that is the safest route. I was 
really just noting that, given the unique aspect of this one sequence 
group, XEP's validator was not entirely out of line for not enforcing it 
strictly. But it probably should issue a warning, at least. I'll submit 
that on the XEP support list.

Any AND content model can be refactored as an OR group of sequence groups:

<!ELEMENT page-sequence-master
    ((region-body,
      region-before?,
      region-after?,
      region-start?,
      region-end?) |
     (region-before,
      region-body,
      region-after?,
      region-start?,
      region-end?) |
     ...
 >

But as you can imagine, this can get quite long, especially when you 
have to ensure that the resulting model is not ambiguous. I will submit 
a request to clarify the true constraints on this content model to the 
FO editors list.

Cheers,

Eliot
-- 
W. Eliot Kimber, eliot@isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by "Peter B. West" <pb...@powerup.com.au>.
W. Eliot Kimber wrote:
> Oleg Tkachenko wrote:
> 
>> Peter B. West wrote:
>>
>>> I have debugging my FO tree building be running it against various 
>>> example fo files.  Of the three I have used so far, I have found 
>>> problems with two.
>>>
>>> ./docs/examples/pagination/allregions.fo has the problem that I 
>>> mentioned in an earlier past; the simple-page-master does not have 
>>> region-body as the first region specified.
>>
>>
>> Hmmm, allregions.fo looks okay to me. Probably this stuff is also in 
>> tables/background.fo, this one really have
>> <fo:region-before extent="1cm"/>
>> <fo:region-body margin-top="1cm"/>
>> <fo:region-after extent="1.5cm"/>
>> btw, neither antenna nor XEP don't complain on it.
> 
> 
> The FO spec is clear that the content is a sequence group. However, 
> semantically, there's no point in constraining the order of occurrence 
> in this case as there is no interdependenc of the elements. I'm sure 
> that if XML had AND connectors the editors would have used them. Since 
> there can be no practical failure that would result from a different 
> order of region declarations, I think it's appropriate to not enforce 
> the content model.
> 
> In fact, I did a quick survey of all the formatting objects and this is 
> the only case in which a sequence group is used where the order does not 
> have some obvious purpose (e.g., putting declarations before uses).
> 
> While any implementation would be free to complain if the order were not 
> followed, I would consider that to be a "Simon Says" behavior--that is, 
> complaining about something that could either be recovered from without 
> risk or that cannot possibly hurt anything in the first place. I'm not 
> sure how culturally distributed the childs' game of Simon Says is, but 
> the basic idea is that one child gives orders and the other performs 
> them IFF the first child says "Simon Says", as in "Simon says touch your 
> nose" or "touch your nose" (if the orderee complies, the first child 
> says iperiously "I didn't say Simon Says") (at least I think that's how 
> it's played--it's been a long time since I played it and I have no 
> children at hand to remind me of the details). In any case, I consider 
> Simon Says behavior to be one of the more heinous sins of software 
> implementation. It's especially prevelant in the implementation of 
> standards, as one might expect.
> 
> On the other hand, unrestrained recovery and fallback can lead to its 
> own problems, as we learned from HTML. For example, I've found XSL 
> Formatter's almost total lack of validation of FO instances to be 
> counter productive in the long run if one is not checking their FO 
> markup, either with XEP or by inspection against the spec. Fortunately, 
> RenderX provides their validator as service to the community, so there's 
> no excuse for anyone producing FO instances that don't at least conform 
> to the rules XEP validates.

Eliot,

I'm not sure how to proceed.  The war-cry of workers on the X-web is 
surely, "Remember HTML!"  The argument for a new content model for 
simple-page-master is cogent, and I'm sure that the editors will listen 
to it. (How the result will be expressed is a different matter.  How 
*do* you express it?)

In the meantime, the spec is plain on this point, so why not follow it? 
   There are plenty of points on which the spec is not plain, and on the 
which the quickest way forward is a straw poll of implementations. 
Although I haven't tried it, I assume from what has been said that the 
XEP validator allows FO which is simply non-conformant in this respect. 
  That seems a good reason not to rely on it.

Taking ad hoc decisions about variations to the spec can generate 
unexpected problems.  E.g., an implementor deciding to loosen the s-p-m 
model might easily find himself (or herself - just paying my feminism 
tax) cycling through the children of s-p-m, handling multiples by 
silently overriding the earlier occurrences.  That might not be a 
decision everyone would make, but in extra-spec territory, anything is 
possible.  Some users eventually discover this behaviour when they 
realise the reason for small errors in their documents, and complain 
that the processor did not pick up the duplications, which, in their 
case, were meant to be something else.  So the authors change the 
behaviour, whereupon a number of other users complain that their 
(non-conforming but working) documents are now broken.

Better to get the spec changed, I think.  "Simon Says" is best played in 
a group, where the non-conforming players stand out like sore thumbs, so 
nothing has to be said, although it usually is.  Eliot, I was *never* 
imperious.  Cross my heart.

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by "W. Eliot Kimber" <el...@isogen.com>.
Oleg Tkachenko wrote:
> Peter B. West wrote:
> 
>> I have debugging my FO tree building be running it against various 
>> example fo files.  Of the three I have used so far, I have found 
>> problems with two.
>>
>> ./docs/examples/pagination/allregions.fo has the problem that I 
>> mentioned in an earlier past; the simple-page-master does not have 
>> region-body as the first region specified.
> 
> Hmmm, allregions.fo looks okay to me. Probably this stuff is also in 
> tables/background.fo, this one really have
> <fo:region-before extent="1cm"/>
> <fo:region-body margin-top="1cm"/>
> <fo:region-after extent="1.5cm"/>
> btw, neither antenna nor XEP don't complain on it.

The FO spec is clear that the content is a sequence group. However, 
semantically, there's no point in constraining the order of occurrence 
in this case as there is no interdependenc of the elements. I'm sure 
that if XML had AND connectors the editors would have used them. Since 
there can be no practical failure that would result from a different 
order of region declarations, I think it's appropriate to not enforce 
the content model.

In fact, I did a quick survey of all the formatting objects and this is 
the only case in which a sequence group is used where the order does not 
have some obvious purpose (e.g., putting declarations before uses).

While any implementation would be free to complain if the order were not 
followed, I would consider that to be a "Simon Says" behavior--that is, 
complaining about something that could either be recovered from without 
risk or that cannot possibly hurt anything in the first place. I'm not 
sure how culturally distributed the childs' game of Simon Says is, but 
the basic idea is that one child gives orders and the other performs 
them IFF the first child says "Simon Says", as in "Simon says touch your 
nose" or "touch your nose" (if the orderee complies, the first child 
says iperiously "I didn't say Simon Says") (at least I think that's how 
it's played--it's been a long time since I played it and I have no 
children at hand to remind me of the details). In any case, I consider 
Simon Says behavior to be one of the more heinous sins of software 
implementation. It's especially prevelant in the implementation of 
standards, as one might expect.

On the other hand, unrestrained recovery and fallback can lead to its 
own problems, as we learned from HTML. For example, I've found XSL 
Formatter's almost total lack of validation of FO instances to be 
counter productive in the long run if one is not checking their FO 
markup, either with XEP or by inspection against the spec. Fortunately, 
RenderX provides their validator as service to the community, so there's 
no excuse for anyone producing FO instances that don't at least conform 
to the rules XEP validates.

Cheers,

E.
-- 
W. Eliot Kimber, eliot@isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with examples

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Peter B. West wrote:

> I have debugging my FO tree building be running it against various 
> example fo files.  Of the three I have used so far, I have found 
> problems with two.
> 
> ./docs/examples/pagination/allregions.fo has the problem that I 
> mentioned in an earlier past; the simple-page-master does not have 
> region-body as the first region specified.
Hmmm, allregions.fo looks okay to me. Probably this stuff is also in 
tables/background.fo, this one really have
<fo:region-before extent="1cm"/>
<fo:region-body margin-top="1cm"/>
<fo:region-after extent="1.5cm"/>
btw, neither antenna nor XEP don't complain on it.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org