W3C home > Mailing lists > Public > www-validator@w3.org > February 2014

Re: <iframe> content model

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 10 Feb 2014 22:00:35 +0200
Message-ID: <52F92FE3.4030105@cs.tut.fi>
To: www-validator@w3.org
CC: "master.skywalker.88@gmail.com >> Andry Rendy" <master.skywalker.88@gmail.com>
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.


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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:10 UTC