Re: HTML5 script start tag should select appropriate content model according to src

On Apr 21, 2007, at 16:52, David Woolley wrote:

> Looking at the HTML5 parsing rules for script, there is narrative  
> that the content model switches to empty if there is a src  
> attribute, which would work to get the reported error recovery in  
> this case.

I see no mention of "src" in the parsing section. Perhaps you are  
confusing the conformance requirements on the DOM shapes with the  
parsing rules. An element having an empty content model for the  
purposes of DOM shape conformance has no implied relationship with an  
element being a void element for the purposes of the parsing algorithm.

> However, the rules for the script start tag explicitly state a  
> content model switch, and it is not conditional on the src  
> attribute's presence.

Right.

> I think that either the script start tules need to change to  
> special case <script src=....,

The spec needs to reflect what browsers already do here.

> or the description of script needs to expand on what happens if the  
> should be empty rule is violated.

Parsing is unaffected. UAs must consider the script from the external  
file (i.e. ignore element content). A document conformance  
requirement is violated.
http://www.whatwg.org/specs/web-apps/current-work/#src9
http://www.whatwg.org/specs/web-apps/current-work/#executing

P.S. Please consider sending feedback about HTML5 to the WHATWG list:
http://www.whatwg.org/mailing-list#specs
(I'm not saying public-html, because the new HTML WG has not yet  
reached a decision on using WHATWG HTML5 as the starting point.)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Sunday, 22 April 2007 13:19:17 UTC