RE: Specification problem - referential style chaining.

I wasn't talking about lexical order of elements, but of chains with multiple links. In a single chain the last referenced style would be the most distant from the affected element; which is wrong.

Sean Hayes
Media Accessibility Strategist
Accessibility Business Unit
Microsoft

Office:  +44 118 909 5867,
Mobile: +44 7875 091385


-----Original Message-----
From: Glenn A. Adams [mailto:gadams@xfsi.com]
Sent: 06 December 2008 22:49
To: Sean Hayes; Public TTWG List
Subject: Re: Specification problem - referential style chaining.

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 23:20:31 UTC