On 14.02.2006 07:24:03 Manuel Mall wrote:
> Jeremias,
> 
> I did read those sections of the spec at the time and that's how the
> question arose. I didn't check the code though. Any way the spec says in
> 7.28.4:
> 
> body-start() = the value of the start-indent + start-intrusion-adjustment
> + the value of the provisional-distance-between-starts of the closest
> ancestor fo:list-block.
> 
> The questions arises what is meant by 'the value of the start-indent',
> i.e. the start-indent of which fo is suppose to be used? Does the suffix
> 'of the closest ancestor fo:list-block' apply to all three terms
> 'start-indent', 'start-intrusion-adjustment' and
> 'provisional-distance-between-starts' or only to
> 'provisional-distance-between-starts'?.

"start-indent" can't be the start-indent of the list-item-body, that
much is clear. I always assumed it was inherited(start-indent). Anything
else would make no sense (recursion). I guess the spec could be clearer.
"of the closest anscestor fo:list-block" (at least for me) applies
directly and only to "provisional-distance-between-starts". That
property is inherited but only applies to fo:list-block. Furthermore,
start-intrusion-adjustment is something that can't come from the
list-block.

> I assume now it means the further that is start-indent is to be taken from
> the closest ancestor fo:list-block. Therefore my initial concern that we
> have a recursive case here is probably not an issue.

As I wrote above, I believe it's inherited(start-indent), i.e. comes
from the parent fo:list-item, not the list-block. This is important
because it allows you to indent individual list-items differently in the
same list-block.

> Now (finally) looking at the code it navigates up the fo tree until the
> nearest ancestor fo:list-item and not fo:list-block. If start-indent on a
> fo:list-item is always identical to the start-indent on the ancestor
> list-block thats fine. If its not then we may have a problem.

I don't think we have a problem. I believe the code is correct. What we
could do, however, is add additional test cases which exercise the
different start-indent scenarios. That would also allow comparisons with
other implementations.

> Manuel
> 
> PS: Moved the thread to fop-dev.
> 
> > Manuel,
> >
> > see 7.28.4. “provisional-distance-between-starts” and 5.10.4. "Property
> > Value
> > Functions"
> >
> > In the source code: org.apache.fop.fo.expr.BodyStartFunction
> >
> > On 13.02.2006 09:31:47 Manuel Mall wrote:
> >> Jeremias,
> >>
> >> just out of curiosity and not directly related to the posters question:
> >>
> >> The definition of block-start() refers to start-indent. Here we are
> >> actually setting start-indent. Which value of start-indent is used in
> >> calculating block-start()?
> >>
> >> Manuel
> >>
> >> > I think XEP is wrong if it reports an error. XSL-FO 1.0 says in "5.9
> >> > Expressions": "All property value specifications in attributes within
> >> an
> >> > XSL stylesheet can be expressions."
> >> >
> >> > IMO, your expression for start-indent is valid.
> >> >
> >> > On 13.02.2006 04:59:48 Paul Tremblay wrote:
> >> >> I have the following line in my of.xml file:
> >> >>
> >> >>
> >> >>     <fo:list-item space-before="12pt">
> >> >>         <fo:list-item-label end-indent="label-end()">
> >> >>                 <fo:block></fo:block>
> >> >>         </fo:list-item-label>
> >> >>         <fo:list-item-body start-indent="body-start() + 12pt"
> >> >>         text-indent="-12pt">
> >> >>            <fo:block>In late
> >> >> winter</fo:block></fo:list-item-body></fo:list-item>
> >> >>
> >> >> I want to create a hanging indents for long lines of poetry. When I
> >> >> run this document through xep's processor, I get the following error:
> >> >>
> >> >>  [warning] Bad attribute start-indent: Cannot add type Word to type
> >> >>  Length
> >> >>
> >> >> However, when I run it through fop .91 beta, it works exactly like I
> >> >> want it to.
> >> >>
> >> >> Is xep correct in reporting an error? Is fop cheating? Of course, I
> >> am
> >> >> glad that fop processes the document the way I want!


Jeremias Maerki

Reply via email to