Re: <iframe> content model

2014-02-10 20:40, Andry Rendy wrote:

> To the attention of validator.w3.org/nu <http://validator.w3.org/nu> staff.

Hi Andry,

I’m not affiliated with W3C in any way, just reading this list and 
trying to make some contributions.

>  But the specification states, as content model for
> <iframe> in XML (and therefore in XHTML) that this element must be
> empty. So it had to flag both cases as the same error, while the
> requirements given in prose should be valid only in HTML (no test of
> this case anyway).

I can confirm that both validator.w3.org/nu and validator.w3.org and 
www.validator.nu pass an XHTML document that starts with <!DOCTYPE html> 
(triggering HTML5 validation in XHTML mode) containing

<iframe src="foo">Hello world</iframe>

I tested this using file upload with a filename ending with .xhtml, and 
the syntax check was thus performed by XHTML rules.

Since HTML5 CR clearly says “The iframe element must be empty in XML 
documents”, this seems to be a bug in the validators. They apply the 
HTML rules even when for XHTML documents.

Yucca

P.S. The iframe element has no content model in XML—XML as such defines 
no content models. Its allowed content as per HTML5 is defined in the 
prose of HTML5 drafts (not in a DTD), so the prose cited in the 
question, and quoted above, is the only ground for deciding what is 
allowed in the content.

Received on Monday, 10 February 2014 20:01:06 UTC