W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > September 2009

Re: HTML+RDFa (3.1 Document Conformance)

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Wed, 16 Sep 2009 14:15:57 -0400
Message-ID: <4AB12B5D.6070401@digitalbazaar.com>
To: public-rdf-in-xhtml-tf@w3.org
Dr. Olaf Hoffmann wrote:
> I think, it would be more consistent to use
> something like 'HTML5+RDFa1.0' as a value
> for the HTML5 superset to avoid confusion, because
> the semantics, content models and element and attribute
> collection of HTML5 are different (and partly incompatible) from
> XHTML1.1 and none of them is a superset of the other,
> therefore another version indication for the HTML5 variant
> seems to be essential to be able to distinguish.

Hi Olaf,

This is one of the items that will be covered on one of the upcoming
RDFa telecons, so the language in that spec is preliminary and hasn't
been discussed in detail.

I was attempting to find a balance between backwards compatibility and
semantic accuracy when writing that section.

My reading is that the WHAT WG and HTML WG do not want to be able to
distinguish between HTML4 and HTML5, as HTML5 is meant to be a
backwards-compatible, natural progression to HTML4. Several people have
asserted that HTML5 shouldn't be versioned, so if we were to put "HTML5"
in the @version attribute, there would probably be push-back.

The first draft of the HTML+RDFa spec actually specified only one
version: "XHTML+RDFa 1.0", which seemed inaccurate when the version
attribute was specified in a non-XML mode document (HTML5 vs. XHTML5).

So, we could have two acceptable @version attribute values for RDFa (one
for non-XML mode and another for XML mode):

version="HTML+RDFa 1.0"
version="XHTML+RDFa 1.0"

This is a bit annoying because we really only care about the "RDFa 1.0"
part of the version string. So, to be backwards-compatible with
XHTML+RDFa 1.0 and to provide some degree of future-proofing, we could
say that the @version string should contain the text "RDFa 1.0" in it
somewhere. The following regular expression could be used to detect the
string in the @version attribute in any language employing RDFa:

\+?RDFa 1\.0(\+|\+.*|)$

Basically, if the string "RDFa 1.0" exists in the @version attribute
(either surrounded by '+' characters or not), then the document contains
RDFa 1.0 syntax. This allows people to do stuff like:

version="SVGTiny 1.2+RDFa 1.0" or
version="HTML+RDFa 1.0+CoolLanguageExtension 2.1"

This is beneficial because we do want RDFa to be easily mixed-in with
future element/attribute-based languages.

> By the way, 2.1 explains, that the document structure
> can be changed. Maybe it could be useful to add a
> note for authors, that they can avoid this, if they note
> implied elements and other HTML artefacts explicitly
> to ensure, that such a modification does not change
> their intents...

I'm not quite sure I understand what you mean completely, so the
following may not address your concern.

AFAIK, there is currently no way to signal that a document's elements
shouldn't be re-arranged by an HTML5 parser. Henri, Ian, is this correct?

Since RDFa usually sits on top of the DOM layer in XHTML and HTML, or is
provided a SAX-based interface to the document, the RDFa Processor
doesn't know if the input stream was or wasn't modified by a document
parser. In short, I don't think there is any way for us to say that
authors can avoid document restructuring as that happens outside of the
RDFa Processor's purview.

I've added your primary concern to the wiki:

http://rdfa.info/wiki/Html5-rdfa-wd-issues#3.1_Document_Conformance

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: The Pirate Bay and Building an Equitable Culture
http://blog.digitalbazaar.com/2009/08/30/equitable-culture/
Received on Wednesday, 16 September 2009 18:16:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 September 2009 18:16:39 GMT