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

I wrote:
> Which is correct?
>    inherit = from-parent()
>    inherit = inherited-property-value()

Maybe this was a silly question. 
I think now the following interpretation is more reasonable.

  for inheritable properties:
    inherit = inherited-property-value()

  for not inheritable properties:
    inherit = from-parent()

And the definition of inherited-property-value() need not be changed.


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


At Sat, 30 Jun 2001 01:49:46 +0900, MURAKAMI Shinyu wrote:
> 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:48:03 UTC