[whatwg] WA1: <style> element content model

Ian Hickson ian at hixie.ch
Mon Jul 18 06:14:08 PDT 2005


On Mon, 18 Jul 2005, fantasai wrote:
>
> # For styling languages that consist of pure text, user agents must use a
> # concatenation of the contents of all the text nodes and CDATA nodes that are
> # direct children of the style  element (ignoring any other nodes such as
> # comments or elements), in tree order.
> 
> This does not give the intended behavior in the following two HTML documents:
> 
>  HTML document:
> 
>   <style type="text/css">
>      .foo { content: "<foo></foo>" }
>   </style>
> 
>  HTML document:
> 
>   <style type="text/css">
>   <!--
>      .foo { color: blue }
>   -->
>   </style>

You are making unwarranted assumptions about the future contents of the 
Parsing section.

 
> # For XML-based styling languages, user agents must use all the children
> # nodes of the style element as the style.
> 
> Are HTML documents allowed to use such XML-based styling languages in
> the <style> element as well?

Yes, but the only way that they're going to be able to get anything to 
work would be by inserting the nodes via the DOM.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list