- From: Paul Mitchell <paul@paul-mitchell.me.uk>
- Date: Sat, 11 Feb 2006 20:51:28 +0000
- To: www-style@w3.org
Anne van Kesteren wrote: > > On Sat, 11 Feb 2006 21:23:10 +0100, Paul Mitchell > <paul@paul-mitchell.me.uk> wrote: > >>> As for <style>, supposedly this works: >>> >>> <?xml-stylesheet href="#xxx" type="text/css"?> >>> <root> >>> <foo xml:id="xxx"> >>> bar { background: green; } >>> </foo> >>> <bar>test</bar> >>> </root> >> >> >> That doesn't looks correct to me. #xxx doesn't exist at the time the >> processing instruction is encountered. > > > By that logic, > > <root ...> > <xh:style> #foo { background:lime } </xh:style> > <bar xml:id="foo">Test</bar> > </root> > > ... would not work either. In your example, the UA doesn't need style #foo until element id foo is encountered, which comes after the style has been defined, not before as in the previous example, where the style for element root is needed before the stylesheet that defines it has materialised. -- Paul Mitchell www.paul-mitchell.me.uk
Received on Saturday, 11 February 2006 20:52:32 UTC