Re: ISSUE-41: Facebook open graph protocol

Leif Halvard Silli, Sat, 24 Apr 2010 19:21:41 +0200:
> Sam Ruby, Thu, 22 Apr 2010 17:00:19 -0400:
>> On 04/22/2010 03:31 PM, Maciej Stachowiak wrote:
>>> On Apr 22, 2010, at 12:28 PM, Philippe Le Hegaret wrote:
>>> 
>>>> Facebook announced yesterday support for the open graph protocol [1]
>    [...]
>>> If their use of xmlns attributes is limited to RDFa, and they don't use
>>> any namespaced elements or attributes other than xmlns:, then I think
>>> their use is covered by the HTML+RDFa specification:
>>> 
>>> http://www.w3.org/TR/rdfa-in-html/

>    [...]
>> 3) Does this affect the Polyglot spec?
> 
> Yes. The Polyglot spec says:
> 
> ]]
> The following guidelines apply to namespaces used in polyglot documents.
>     [ snip ]
>   - No other elements should have namespace declarations.
> [[
> 
> The Polyglot spec thus says that even "xmlns attributes [...] limited 
> to RDFa" should not occur. This needs to change  [ … snip … ]

I just filed bug 9647 against HTML5+RDFa: [1]

}}
RDFa in HTML is a natural feature to specify in a polyglot way. And the
HTML+RDFa begins optimistically:

]]
This specification defines rules and guidelines for adapting the RDFa 
Core 1.1
specification for use in HTML5 and XHTML5. The rules defined in this
specification not only apply to HTML5 documents in non-XML and XML 
mode, but
also to HTML4 and XHTML documents interpreted through the HTML5 parsing 
rules.
[[

And it also has this concrete example, which seems like it could be 
valid both
in XHTML5 and in HTML5.

]]
An example of a conforming HTML+RDFa document:
<html version="HTML+RDFa 1.1" lang="en">
[[

But, alas,  another section talks about one HTML (text/html) way and 
another
XHTML way:

]]
There should be a version attribute on the html element. The value of 
the
version attribute should be "HTML+RDFa 1.1" if the document is a 
non-XML mode
document, or "XHTML+RDFa 1.1" if the document is a XML mode document.
[[

The [spec] *fails* to speak about the version attribute for 
HTML401+RDFa. Would it be
<html version="HTML 4.01+RDFa 1.1"> ?

There seems to be two options for turing HTML+RDFa into a polyglot spec:

EITHER: forbid all XHTML-isms (such as xmlns) in HTML5 documents that 
are *not*
polyglot (aka XHTML) documents.  (This means that HTML4+RDFa must be 
dropped.)

OR:  create a versioning mechanism which is independet of text/html vs
application/xhtml+xml. I don't know if this is possible or even 
desirable. But
regardless: by having a method which would work also in a polyglot 
spec, then
this option would be possible to deal with.

Other options:

XHTML 1.0+RDFa:
  A DTD for XHTML 1.0+RDFa seems much more relevant, than a DTD for
HTML401+RDFa. Both when we consider what authors (e.g. Facebook) 
actually do
but also because XHTML 1.0 is a defacto polyglot spec - the Appendix C 
section
of XHTML1.0 is permitted in the text/html serialization of HTML5.

An XHTML5+RDFa Doctype:
  Tools in the wild already *depends* on the doctype
http://lists.w3.org/Archives/Public/public-html/2010Apr/1204.html


 Therefore a DTD less XHTML5+RDFa doctype would also serve as input to 
the
versioning ISSUE of HTML5
http://lists.w3.org/Archives/Public/public-html/2010Jan/0015


Proposed DOCTYPE: 
<!DOCTYPE html PUBLIC "-//W3C//XML XHTML5+RDFa 1.1//EN" 
"about:legacy-compat">
{{

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

-- 
leif halvard silli

Received on Monday, 3 May 2010 13:43:30 UTC