W3C home > Mailing lists > Public > public-html@w3.org > March 2015

Fwd: @srcdoc content parsing in XHTML documents

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Fri, 13 Mar 2015 17:01:01 +0100
Message-ID: <CAGxST9mhg5K1C3BVKEbgoztkrpfCpH4GG2kpP3xJJQ=y+dv4zA@mail.gmail.com>
To: "public-html@w3.org LIST" <public-html@w3.org>
>From the W3 spec (all versions, for what I remember), the rules for parsing
documents in <iframe@srcdoc> are as follows:

"For iframe elements in HTML documents, the srcdoc attribute, if present,
must have a value using the HTML syntax that consists of the following
syntactic components, in the given order: ..." followed by a list
comprehensive of HTML elements, some of which can be omitted when implied.

"For iframe elements in XML documents, the srcdoc attribute, if present,
must have a value that matches the production labeled document in the XML
specification." Which, in short terms, means that (once unescaped) it must
consist of XML elements properly nested, with one element accomplishing the
role of "root" element (i.e. with no parents and no siblings).

Now, this is my question: consider a document represented by the following
markup (properly escaped):
<p>This is an <abbr>HTML</abbr> paragraph with <b>nested

This is very simple, of course. It matches the requirements for
srcdoc-based documents in HTML, as it represents a whole page
(<html>,<head> and <body> have all implied start and end tags; <title> is
not necessary in srcdoc documents).
It's also a valid XML document because its elements are properly nested and
it has a root <p> element. However, of course it isn't an XHTML document,
as in XHTML no tags can be implied and therefore there's no <html> root
element as it'd be required. It's not even expected to be rendered as an
(X)HTML document, as nothing says that it has to be treated as such (note:
(X)HTML elements in non-XHTML xml documents are rendered properly in some
UAs if they are declared in the XHTML namespace).

How are UAs supposed to treat a value like the one proposed above, apart
from current interpretations? FF a couple of versions ago implemented HTML
serialisation on iframe elements in XHTML documents, as Chrome currently
does, thus ignoring self-closing elements and adding implied ones. Should
(or must) the document be implicitly completed? If not, is the expected
rendering the same of HTML elements?
Thanks in advance.
Received on Friday, 13 March 2015 16:01:28 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:12 UTC