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

Re: XSL-FO: from-parent(NCName?) etc. (was RE: keyword "inherit")

From: MURAKAMI Shinyu <murakami@nadita.com>
Date: Fri, 29 Jun 2001 12:50:04 -0400 (EDT)
To: alrb@us.ibm.com
Cc: xsl-editors@w3.org
Message-Id: <200106300149.IGG32089.JNBNBLVS@nadita.com>
I have another question about 'inherit' keyword and property functions.

Which is correct?
   inherit = from-parent()
   inherit = inherited-property-value()

The XSL CR spec:

    5.9.10.1 inherit
    The property takes the same computed value as the property for
    the formatting object's parent object

According to this, "inherit = from-parent()" seems to be correct.

But I've heard the 'inherit' keyword is present for CSS2 compatibility.
See the CSS2 spec:

    6.2.1 The 'inherit' value
    Each property may also have a specified value of 'inherit', which
    means that, for a given element, the property takes the same
    computed value as the property for the element's parent. 

AND the CSS2 Errata:
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#x57

    Section 6.2.1
    The 'inherit' value causes the properties value to be inherited.
    This applies even to properties for which values do not otherwise
    inherit. 

According to this, "inherit = inherited-property-value()" seems to be
correct, and it is very natural, 'inherit' should be the default of 
the "inheritable" properties.

I put an example to clarify this problem.

  <fo:block font-size="8pt" line-height="2">
   Here the cumputed value of line-height is 16pt (8pt * 2).

   When the specified value of line-height property is a number
   the computed value of the line-height property is 
   this number multiplied by the element's font size.
   However, the number, not the computed value, is inherited.

   <fo:block font-size="16pt">
     Here the cumputed value of line-height is 32pt (16pt * 2;
     inherited value is the number).
   </fo:block>

   <fo:block font-size="16pt" line-height="inherited-property-value(line-height)">
     Here the cumputed value of line-height is 32pt (16pt * 2;
     inherited value is the number;
     same as the above block).
   </fo:block>

   <fo:block font-size="16pt" line-height="from-parent(line-height)">
     Here the cumputed value of line-height is 16pt
     (cumputed value from parent).
   </fo:block>

   <fo:block font-size="16pt" line-height="inherit">

     Here the cumputed value of line-height is 32pt or 16pt ?
     
     I think 'inherit' means inherited property value and 
     the inherited property value is the number, it should be 32pt
     (16pt * 2).

   </fo:block>


There is still an issue:

    5.10.4 Property Value Functions
    Function: object inherited-property-value(NCName) 

    The inherited-property-value function returns the inherited value 
    of the property whose name matches the argument specified.
    It is an error if this property is not an inherited property.

IMHO this last sentence should be deleted.
(same as the above CSS2 Errata) "This applies even to properties for 
which values do not otherwise inherit."


Shinyu Murakami
Antenna House XSL Formatter team
http://www.antennahouse.com
Received on Friday, 29 June 2001 15:47:54 GMT

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