Specification problem - referential style chaining.

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 14:02:24 UTC