W3C home > Mailing lists > Public > www-html@w3.org > April 2007

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

From: Henri Sivonen <hsivonen@iki.fi>
Date: Sun, 22 Apr 2007 16:18:35 +0300
Message-Id: <EE7B3669-4C12-4ED1-B545-C4381EE0716F@iki.fi>
Cc: W3C HTML <www-html@w3.org>
To: David Woolley <forums@david-woolley.me.uk>

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.


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

P.S. Please consider sending feedback about HTML5 to the WHATWG list:
(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
Received on Sunday, 22 April 2007 13:19:17 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:02 UTC