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

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

From: David Woolley <forums@david-woolley.me.uk>
Date: Sat, 21 Apr 2007 14:52:46 +0100
Message-ID: <462A172E.5060903@david-woolley.me.uk>
To: www-html@w3.org

A combination of the recent posting by Lachlan and an article on the 
lynx-dev@nongnu.org mailing list has made me look fairly closely at the 
parsing rules for script start tags in HTML5.

The lynx-dev thread started with a patch submitted to treat <tag /> as 
<tag></tag> as the author believed that that was the current definition 
of HTML.  That in itself is worrying, because it would be a bad 
consequence of Appendix C compatibilty mode if browsers had started 
accepting full XML syntax rules because people were submitting broken 
compatibility mode documents.

I checked the HTML parse rules for / in start tags, and they do appear 
to be ignore it (with a parse error if the element is not one of those 
which is always empty).  However, the lynx-dev author claims that 
<script src=.... /> is being used successfully in the wild.  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.  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=...., or the description of script needs to expand on 
what happens if the should be empty rule is violated.
Received on Saturday, 21 April 2007 13:53:55 UTC

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