- From: Anders Berglund <alrb@us.ibm.com>
- Date: Mon, 2 Jul 2001 15:08:08 -0400
- To: MURAKAMI Shinyu <murakami@nadita.com>
- Cc: xsl-editors@w3.org
>Dear XSL authors, > >I have still question about the conditionality of space/border/paddings. > >The section [4.3 Spaces and Conditionality] of XSL CR says about this >but it seems insufficient. There is no description about the condition >of is-first and is-last traits, although such description is found in >each section of border/paddings. These traits are defined in sectin 4.2.2. > 7.6.9 "border-before-width" > ...... The .conditionality component may be set to > "discard" or "retain" to control if the border should be 0 > or retained if its associated edge is a leading-edge in a > reference-area for areas generated from this formatting > object that have an is-first value of "false". > > 7.6.34 "padding-end" > ...... The .conditionality component may be set to > "discard" or "retain" to control if the padding should be 0 > or retained if its associated edge is a trailing-edge in a > line-area for areas generated from this formatting object > that have an is-last value of "false". > > (etc.) > >But in section 4.3.1: > > The border or padding at the before-edge or after-edge of a > block-area may be specified as conditional. If so, then it is > set to zero if its associated edge is a leading or trailing edge > in a reference-area. In this case, the border or padding is > taken to be zero for purposes of the stacking constraint > definitions. > > The border or padding at the start-edge or end-edge of an > inline-area may be specified as conditional. If so, then it is > set to zero if its associated edge is a leading or trailing edge > in a reference-area or line-area. In this case, the border or > padding is taken to be zero for purposes of the stacking > constraint definitions. This is an error; the same text with "is-first" and "is-last" should be added in 4.3.1. >(BTW in the last paragraph why "reference-area or" ?) > >If the condition "is-first/last value of false" is missing, the >conditional border/padding has different behavior. For example: > > <fo:block> > <fo:inline border-style="solid" > border-start-width="1mm" > border-start-width.conditionality="discard" > border-end-width="1mm" > border-end-width.conditionality="discard"> >This inline begins a line, has conditional border-start/end, and >continues to the next line. > </fo:inline> > <fo:inline>Here is another inline.</fo:inline> > </fo:block> > >(of course .conditionality="discard" need not to be specified since it >is the default) > >The expected result is: > > +------------------------------------------------------------- > | This inline begins a line, has conditional border-start/end, > +------------------------------------------------------------- > --------------------------------+ > and continues to the next line. | Here is another inline. > --------------------------------+ > >The border-start of the first inline-area is not discarded because this >inline-area has the is-first value of "true". Which is the expected result. Correct? >The is-first/last problem is not only about border/paddings but also >about spaces. However the problem is different. > >Example of conditional spaces: > > <fo:block> > <fo:inline space-start="1cm" > space-start.conditionality="discard" > space-end="1cm" > space-end.conditionality="discard"> >This inline begins a line, has conditional space-start/end, and >continues to the next line. > </fo:inline> > <fo:inline>Here is another inline.</fo:inline> > </fo:block> > >The expected result is: (here [SPACE-*] represents spaces) > > This inline begins a line, has conditional space-start/end, > and continues to the next line.[SPACE-END]Here is another inline. > > >Note that the space-before of the first inline-area is discarded >(different from conditional padding/borders). Spaces are normally used >as separator and should be descarded at the first and last. > >Example of non-conditional spaces: > > <fo:block> > <fo:inline space-start="1cm" > space-start.conditionality="retain" > space-end="1cm" > space-end.conditionality="retain"> >This inline begins a line, has non-conditional space-start/end, and >continues to the next line. > </fo:inline> > <fo:inline>Here is another inline.</fo:inline> > </fo:block> > >A possible result is: > > [SPACE-START]This inline begins a line, has non-conditional[SPACE-END] > [SPACE-START]space-start/end, and continues to the next[SPACE-END] > [SPACE-STAET]line.[SPACE-END]Here is another inline. > >According to the current XSL CR spec this seems to be correct, but >probably the following is more reasonable. > > [SPACE-START]This inline begins a line, has non-conditional space- > start/end, and continues to the next line.[SPACE-END]Here is another > inline. > >An important point is that the latter is compatible with CSS margins and >the former is not. > >Therefore, I think the rule should be changed. > >Any space-before and space-start should not have effect on areas that >have an is-first value of "false". >Any space-after and space-end should not have effect on areas that have >an is-last value of "false". >(i.e., when an area is split, spaces have no effect where the split >occurs.) The intended usage of space-start and space-end is for effects like letter-spacing and for that usage I think that the semantics as defined in the CR are correct (notably that they are INDEPENDENT of the is-first and is-last value). The functionality that you seem to be looking for appears to me covered by generating an fo:character (with code U+0020 or another "space" value if "20" is a candidate for removal) with appropriate properties before and after the first fo:inline. >Best regards, > >Shinyu Murakami >Antenna House XSL Formatter team Anders
Received on Monday, 2 July 2001 15:08:42 UTC