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

Specification problem - referential style chaining.

From: Sean Hayes <Sean.Hayes@microsoft.com>
Date: Sat, 6 Dec 2008 14:01:42 +0000
To: "public-tt@w3.org" <public-tt@w3.org>
Message-ID: <90EEC9D914694641A8358AA190DACB3D2FCE9A20EF@EA-EXMSG-C334.europe.corp.microsoft.com>

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."


            <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

Office:  +44 118 909 5867,
Mobile: +44 7875 091385
Received on Saturday, 6 December 2008 14:02:24 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 18:24:03 UTC