W3C home > Mailing lists > Public > public-rdfa@w3.org > May 2009

Re: The Minimal Set of Attributes for RDFa

From: Toby A Inkster <tai@g5n.co.uk>
Date: Sun, 31 May 2009 21:25:35 +0100
Message-Id: <CF84ADD5-BDD7-4F9E-90B7-ADA246692897@g5n.co.uk>
Cc: public-rdfa@w3.org, Tim Berners-Lee <timbl@w3.org>, "Ralph R. Swick" <swick@csail.mit.edu>
To: Oshani Seneviratne <oshani@csail.mit.edu>
On 29 May 2009, at 03:49, Oshani Seneviratne wrote:

> I am trying to figure out an efficient way to determine whether a
> given document has valid RDFa in it or not, without having to parse
> the entire DOM.


ARC2 has an interesting method -- the document is parsed as RDFa if  
any of the following are true:

1. /html@version contains "XHTML+RDFa".
2. Any tag has an xmlns:* attribute (excluding the XHTML namespace).
3. Any tag contains one of these attributes: about, typeof, property.

That said, you should be able to parse any XHTML (and any pre-HTML5  
HTML) using the RDFa processing algorithm and get sensible results  
from it, so determining which documents "are" or "are not" RDFa is  
not usually necessary, except perhaps as an optimisation.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Sunday, 31 May 2009 20:25:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:43 UTC