voiD to describe graphs

My parser <http://buzzword.org.uk/swignition/> understands a variety of 
techniques for embedding triples in HTML (and a number of other formats), 
but until recently had kept them all in one big graph. I'm now beginning 
the work needed to make it aware of multiple graphs. So for example, the 
RDFa data can be kept in a different graph to the GRDDL data. 

It struck me that perhaps voiD might offer a way of describing these 
graphs and their relationships with each other. Here's an example 
document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
    "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html>
        <head profile="http://www.w3.org/2003/g/data-view">
                <title>Example</title>
                <link rel="transformation" href="http://www.w3.org/2001/sw/grddl-wg/td/glean_title.xsl" />
        </head>
        <body xmlns:dc="http://purl.org/dc/terms/">
                <h1>Example</h1>
                <address property="dc:creator">Joe Bloggs</address>
        </body>
</html>

Now, the GRDDL transformation will generate the following triples:

<http://example.com/doc> <http://purl.org/dc/elements/1.1/title> "Example" .

Whereas RDFa would generate:

<http://example.com/doc> <http://purl.org/dc/terms/creator> "Joe Bloggs" .

That could be represented in Notation 3 using voiD like this:

@prefix rdf   : <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc    : <http://purl.org/dc/terms/> .
@prefix void  : <http://rdfs.org/ns/void#> .
@prefix scovo : <http://purl.org/NET/scovo#> .

_:rdfaGraph 
        a void:Dataset ;
        dc:source <http://example.com/doc> ;
        dc:description "Triples generated by RDFa processing." ;
        void:statItem [ rdf:value 1; scovo:dimension void:numberOfTriples ] ;
        = { <http://example.com/doc> dc:creator "Joe Bloggs" . } .

_:grddlGraph1 
        a void:Dataset ;
        dc:source <http://example.com/doc> ;
        dc:description "Triples gleaned using transformation http://www.w3.org/2001/sw/grddl-wg/td/glean_title.xsl" ;
        void:statItem [ rdf:value 1; scovo:dimension void:numberOfTriples ] ;
        = { <http://example.com/doc> <http://purl.org/dc/elements/1.1/title> "Example" . } .

_:combinedGraph
        a void:Dataset ;
        dc:source <http://example.com/doc> ;
        void:subset _:rdfaGraph , _:grddlGraph1 ;
        void:statItem [ rdf:value 2; scovo:dimension void:numberOfTriples ] ;
        = {
                <http://example.com/doc> dc:creator "Joe Bloggs" ;
                        <http://purl.org/dc/elements/1.1/title> "Example" .
        } .

Does this sound like a good use of voiD or an abuse?

-- 
Toby A Inkster

Received on Friday, 30 January 2009 11:00:47 UTC