W3C home > Mailing lists > Public > public-html@w3.org > January 2013

NU’s polyglot possibilities (Was: The non-polyglot elephant in the room)

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Thu, 24 Jan 2013 01:23:16 +0100
To: "Michael[tm] Smith" <mike@w3.org>
Cc: Martin J. Dürst <duerst@it.aoyama.ac.jp>, Henri Sivonen <hsivonen@iki.fi>, public-html WG <public-html@w3.org>, "www-tag@w3.org List" <www-tag@w3.org>
Message-ID: <20130124012316445187.8a68b238@xn--mlform-iua.no>
Michael[tm] Smith, Mon, 21 Jan 2013 23:47:40 +0900:
> Martin J. Dürst, 2013-01-21 20:14 +0900:

>> What would be the effort of checking for polyglot markup?

> In the simplest implementation, the validator would need to 
> automatically parse and validate the document twice

1 Could you do that? Just guide the user through two steps:
  HTML-validation + XHTML-validation? The second step could also
  produce a comparison of the DOM produced by the two steps.

2 But if the author uses a good, XHTML5-aware authoring tool that
  keeps the code well-formed, then a *single* validation as
  text/html should already bring you quite far.

3 Finally, one very simple thing: polyglot dummy code! The NU
  validator’s Text Field contains a HTML5 dummy that validates,
  but only as HTML, since the namespace isn't declared. Bug 
  20712 proposes to add a dummy for the XHTML5 presets as well.[1]
  Such a dummy no doubt serves as a teachable moment for many. And
  as long as you just add the namespace and otherwise keep the 
  current dummy document intact, it would also, without banging
  it into anyone’s head, be a polyglot example.

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20712

-- 
leif halvard silli
Received on Thursday, 24 January 2013 00:23:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 24 January 2013 00:23:50 GMT