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

Re: <iframe> content model

From: Michael[tm] Smith <mike@w3.org>
Date: Thu, 13 Feb 2014 00:56:41 +0900
Cc: www-validator@w3.org
Message-ID: <20140212155637.GB23799@sideshowbarker>
"Jukka K. Korpela" <jkorpela@cs.tut.fi>, 2014-02-10 22:00 +0200:

> <iframe src="foo">Hello world</iframe>
...
> 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.

Yeah, that was a bug. Fixed now.

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

FWIW if you want to avoid the need to upload a file you can instead supply
the document as a data-scheme URL with an application/xhtml+xml media type,
like this:

  http://validator.w3.org/nu/?doc=data:application/xhtml+xml,<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Test</title></head><body><iframe>invalid</iframe></body></html>

That'll cause the document to be parsed as XML and checked against the
XHTML5 schema).

-- 
Michael[tm] Smith http://people.w3.org/mike
Received on Wednesday, 12 February 2014 15:57:01 UTC

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