W3C home > Mailing lists > Public > public-tt@w3.org > December 2008

Re: Specification problem - referential style chaining.

From: Glenn A. Adams <gadams@xfsi.com>
Date: Sun, 07 Dec 2008 06:48:56 +0800
To: Sean Hayes <Sean.Hayes@microsoft.com>, Public TTWG List <public-tt@w3.org>
Message-ID: <C5612258.6D08%gadams@xfsi.com>

I disagree. The lexical order of the style element in the document should
have no affect on the order of style resolution in the case of multiple
style chains. The reason for this is that these style specification chains
are semantically ordered via id references, and not lexically ordered
(according to appearance in document order).

It would also be more difficult for a processor to resolve styles using a
combination of style id references and the order of appearance of the
defining element.

The spec should not be changed.

Glenn


On 12/6/08 10:01 PM, "Sean Hayes" <Sean.Hayes@microsoft.com> wrote:

> 
> The spec currently says:
> 
> " If the same style property is specified in more than one referenced
> specification, then the last referenced style specification applies, where the
> order of application starts from the affected element and proceeds to
> referenced style specifications, and, in turn, to subsequent referenced style
> specifications."
> 
> I don't think this is clear enough on how referential styling is supposed to
> work.I think it works for cases such as the following:
> 
>             <style id="s1" tts:color="brown" />
>             <style id="s2" tts:color="black"/>
>             <style id="s3" style="s1 s2" />
> 
> An element referencing s3, would have color black.
> 
> But in this case:
>             <style id="s1" tts:color="brown" />
>             <style id="s2" style="s1" tts:color="black"/>
>             <style id="s3" style="s2" />
> 
> The 'last' referenced style here is s1, and thus an element referencing s3,
> would have color brown.
> 
> This is not my understanding of how it is supposed to work, which is that the
> order is a linearization of the tree in a depth first pre-order. Such that the
> 'last' element is black in both cases.
> 
> To clarify this I suggest we edit the last sentence to:
> 
> where the order of application is a depth first pre-order tree walk starting
> from the affected element including referenced style specifications, and all
> subsequent referenced style specifications."
> 
> Example:
> 
>             <style id="s1" tts:color="brown" />
>             <style id="s2" style="s1" tts:color="black"/>
>             <style id="s3" tts:color="green" />
>             <style id="s4" style="s3" tts:color="yellow"/>
>             <style id="s5" style="s4 s2" tts:color="pink" />
> 
>             <p style="s5" tts:color="red">...</p>
> 
> The depth first pre order for color here would be:
>    green, yellow, brown, black, pink, red.
> 
> The last and therefore applied color being red.
> 
> 
> Sean Hayes
> Media Accessibility Strategist
> Accessibility Business Unit
> Microsoft
> 
> Office:  +44 118 909 5867,
> Mobile: +44 7875 091385
> 
> 
Received on Saturday, 6 December 2008 22:49:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 November 2009 22:41:39 GMT