W3C home > Mailing lists > Public > www-tag@w3.org > January 2013

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

From: Kingsley Idehen <kidehen@openlinksw.com>
Date: Fri, 25 Jan 2013 14:33:57 -0500
Message-ID: <5102DE25.6010702@openlinksw.com>
To: www-tag@w3.org
On 1/25/13 2:23 PM, David Sheets wrote:
> What is your motivation for advocating against polyglot? What harm do
> you see it doing as a REC?
> David
My concern is that it encourages the problem I outlined earlier:

We assume this to be a standard (X)HTML5 polyglot snippet:
<!DOCTYPE html>
<html lang="" xmlns="http://www.w3.org/1999/xhtml" xml:lang="">
     <title>Polyglot Test</title>
     <meta name="generator" content="BlueGriffon wysiwyg editor" />
     <meta charset="UTF-8" />

Here is one example from the wild of an HTML5 polyglot document the 
includes an RDFa based structured data island: 
http://schema.org/docs/schema_org_rdfa.html .

Please note this excerpt from the above:
<!DOCTYPE html>
     <title>RDFa Lite Reflection</title>
     <h1>Schema.org core schema</h1>
     <p>This is an <b>experimental</b> RDFa 1.1 Lite representation of 
the schema.org schema, copied here for collaboration and <a 
     <hr />
     <div typeof="rdfs:Class" resource="http://schema.org/Thing">
       <span class="h" property="rdfs:label">Thing</span>
       <span property="rdfs:comment">The most generic type of item.</span>

Here is the cURL ouput:
curl -I http://schema.org/docs/schema_org_rdfa.html
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: text/html

As you can see from the above, we have Content-type squatting where 
XHTML5 is being packed into HTML via the so called (X)HTML5 polyglot 
that ultimately forces the developer of a parser or any other consumer 
to sniff content if it seeks to generate an RDF based Linked Data graph 
from this document.

As I've already stated, and still await some convincing response from 
the TAG, this is just wrong.

XHTML5 != HTML5. Each should have its own mime type. Or we have to be 
crystal clear about the fact that an (X)HTML5 polyglot must contain the 
<html/> attribute @xmlns as in:
<html lang="" xmlns="http://www.w3.org/1999/xhtml" xml:lang=""> .

I specifically picked a schema.org example because it exemplifies the 
bigger problem re. (X)HTML5 that embeds RDFa.



Kingsley Idehen	
Founder & CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca handle: @kidehen
Google+ Profile: https://plus.google.com/112399767740508618350/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen

Received on Friday, 25 January 2013 19:34:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:51 UTC