W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2001

XSL-FO: corresponding absolute and relative properties

From: MURAKAMI Shinyu <murakami@nadita.com>
Date: Mon, 25 Jun 2001 11:58:06 -0400 (EDT)
To: xsl-editors@w3.org
Message-Id: <200106260057.IBI76698.BLVNBJSN@nadita.com>
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 Monday, 25 June 2001 13:05:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT