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

Re: RDFa and Web Directions North 2009

From: Toby A Inkster <tai@g5n.co.uk>
Date: Sun, 15 Feb 2009 16:04:50 +0000
Message-Id: <93634D5F-D02C-46EF-B033-EC9369FC66A1@g5n.co.uk>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>, rubys@intertwingly.net, public-rdfa@w3.org, ian@hixie.ch
Sam Ruby wrote:

> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-January/ 
> 018242.html

Yes, this shows that there are differences between the XHTML and HTML  
DOM trees. I don't think anyone doubted that. The question is whether  
these differences make it necessary to distinguish between HTML and  
XHTML trees when extracting RDFa data.

In fact, Henri's pages show that Attribute.name and Attribute.value  
behave identically under the HTML and XHTML DOMs. In my experience in  
implementing RDFa, name and value are the only properties of  
Attribute nodes which are needed by implementations. (And they're  
only needed for step 2 of the processing sequence given in the RDFa  
syntax document. For the rest of the processing, plain old  
Element.getAttribute is sufficient, provided that your scripting  
environment provides a way of distinguishing between unset attributes  
and attributes set to the empty string - which most seem to.)

There are theoretical objections to using xmlns:* attributes for RDFa  
in HTML. I understand them and mostly agree. It would be good to find  
a solution to these. But the practical problems are really minimal -  
once a stream of bytes has been turned into a DOM tree (and that is  
where the major differences between XHTML and HTML processing lie),  
the DOM tree can be processed as RDFa using the same algorithm for  
both XHTML and HTML.

In fact, the RDFa concept is flexible enough to apply to any tree- 
like structure where the tree nodes are capable of holding attributes  
- think the Windows system registry, GConf, nested associative arrays  
in various programming languages, etc. There is probably little value 
[*] in implementing RDFa parsers for those media, but it is  
immediately clear how the RDFa processing sequence could be applied  
to them.

[*] = RDFa is primarily intended as a way of intermingling machine- 
readable data with human-readable data. The Windows registry, GConf  
and associative arrays are already machine-readable and are rarely  
read by humans, so there would not be much point in storing RDFa data  
there - RDF could be stored in a simple machine-readable format -  
perhaps a format similar to RDF/JSON.

Toby A Inkster
Received on Sunday, 15 February 2009 16:05:40 UTC

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