Re: XSL-FO: corresponding absolute and relative properties

Absolute properties have precedence over relative ones to provide
compatibility with CSS2.

Following another comment the text has been clarified and the text now
clearly states that border-start-width will be 10pt.

MURAKAMI Shinyu <murakami@nadita.com>@w3.org on 06/25/2001 11:58:06 AM

Sent by:  w3c-xsl-fo-sg-request@w3.org


To:   xsl-editors@w3.org
cc:
Subject:  XSL-FO: corresponding absolute and relative properties



The XSL CR spec says:

    5.3.1 Border and Padding Properties

    ... If the corresponding absolute variant of the property is
    specified on the formatting object, its computed value is used to
    set the computed value of the corresponding relative property....

    ... If both an absolute and a corresponding relative property are
    explicitly specified, then the above rule gives precedence to the
    absolute property, and the specified value of the corresponding
    relative property is ignored in determining the computed value of
    the corresponding properties.


I don't understand why the absolute properties should take precedence
over the relative properties. I think this rule should be changed --
the relative properties should take precedence. This change solves at
least one problem. For example, the following case:

  <fo:block border-style="solid"
            border-width="1pt"
            border-start-width="10pt">
     TEST
  </fo:block>

If the absolute properties take precedence, this border-start-width="10pt"
will be overridden by border-width="1pt" since the shorthand property is
expanded to absolute properties, as follows:

  <fo:block border-top-style="solid"
            border-right-style="solid"
            border-bottom-style="solid"
            border-left-style="solid"
            border-top-width="1pt"
            border-right-width="1pt"
            border-bottom-width="1pt"
            border-left-width="1pt"
            border-start-width="10pt">
     TEST
  </fo:block>

But shorthand properties have less precedence than non-shorthand,
therefore the border-start-width="10pt" (non-shorthand) should not be
overridden by the border-width="1pt" (shorthand).
It is very contradicted and the spec seems not clear about this.

In XSL FO spec, relative properties are more important and more
detailed. It is natural that the relative properties take precedence.

This problem is not only about border and padding properties, but also
margin, space and indent properties. For example,

  <fo:block margin="0pt" space-before="10pt" start-indent="1in">
    TEST
  </fo:block>

and

  <xsl:attribute-set name="margin0">
    <xsl:attribute name="margin-top">0pt</xsl:attribute>
    <xsl:attribute name="margin-right">0pt</xsl:attribute>
    <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
    <xsl:attribute name="margin-left">0pt</xsl:attribute>
  </xsl:attribute-set>
  ...
  <fo:block xsl:use-attribute-sets="margin0"
            space-before="10pt" start-indent="1in">
    TEST
  </fo:block>

In both cases, the space-before="10pt" and start-indent="1in"
(relative properties) should not be overridden by the margin
properties (absolute).

(margin="0pt" or such attribute-set will be often used for CSS compatible
border/padding layout.)


Regards,

Shinyu Murakami
Antenna House XSL Formatter team
http://www.antennahouse.com

Received on Wednesday, 27 June 2001 13:11:05 UTC