Re: <iframe> content model

"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