W3C home > Mailing lists > Public > public-lod@w3.org > June 2012

validating parsable RDFa

From: Tim rdf <timrdf@gmail.com>
Date: Sat, 2 Jun 2012 00:51:48 -0400
Message-ID: <CAHsHvEuJsCCh7NgmNjW0BDziftCFLm-ObruS4cdAFWDcESV73w@mail.gmail.com>
To: public-lod@w3.org
public-lod,

Where's the best place to get some RDFa help?

While developing the HTML document for W3C's upcoming PROV-O
recommendation, I'm trying to nibble on some dog food.

I've snuck some RDFa into [1], which encodes (among other stuff [2])
the following triples according to pyRdfa [3]:

=======
<http://dvcs.w3.org/hg/prov/raw-file/d53b5b7c1a32/ontology/Overview.html#inverse-names-592b37e4-ac61-11e1-b149-b6e4fd0676c2>
a prov:Dictionary ;
     prov:generatedAtTime "2012-06-02T03:16:30.563734"^^xsd:dateTime ;
     prov:member
<http://dvcs.w3.org/hg/prov/raw-file/d53b5b7c1a32/ontology/Overview.html#inverse-of-wasDerivedFrom>
.

<http://dvcs.w3.org/hg/prov/raw-file/d53b5b7c1a32/ontology/Overview.html#inverse-of-wasDerivedFrom>
a prov:KeyValuePair ;
     prov:pairKey "http://www.w3.org/ns/prov#wasDerivedFrom" .
=======

Which is dandy.
Except that my document needs to pass W3C pub rules, one of which is
passing http://validator.w3.org. [1] certainly does NOT pass (see the
55 errors at [4]).

So, my RDFa is pretty ugly. Really ugly.
But I got it to work.




Question)
Can any RDFa ninjas out there show the way to a more eloquent RDFa
encoding that actually validates?





The snippet of interest (and disgust) is from [1]:

<table about="#inverse-names-592b37e4-ac61-11e1-b149-b6e4fd0676c2"
       xmlns:prov="http://www.w3.org/ns/prov#"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
       typeof="prov:Dictionary" class="inverse-names">
  <span rel="prov:wasDerivedFrom"
resource="http://www.w3.org/TR/prov-o/prov.owl"/>
  <span rel="prov:wasTracedTo"
resource="http://www.w3.org/TR/rdfa-syntax/#rdfa-attributes"/>
  <span rel="prov:wasTracedTo"
resource="http://data.semanticweb.org/person/alvaro-graves"/>
  <span rel="prov:wasTracedTo"
resource="http://tw.rpi.edu/instances/TimLebo"/>
  <span rel="prov:specializationOf" resource="#inverse-names"><span
rel="rdf:type" resource="http://www.w3.org/ns/prov#Dictionary"/></span>
  <span property="prov:generatedAtTime"
content="2012-06-02T03:16:30.563734" datatype="xsd:dateTime"/>
  <caption>Names of inverses</caption>
  <tr>
    <th>PROV-O Property</th>
    <th>Recommended inverse name</th>
  </tr>
  <span rel="prov:member">
    <tr about="#inverse-of-member" typeof="prov:KeyValuePair">
      <td property="prov:pairKey"
content="http://www.w3.org/ns/prov#member"><a
title="http://www.w3.org/ns/prov#member" href="#member"
class="owlproperty">prov:member</a></td>
      <td rel="prov:pairValue"><span typeof="prov:Entity"
property="prov:value"
content="inMembership">prov:inMembership</span></td>
    </tr>
  </span>

Thanks much!

Regards,
Tim Lebo

[1] http://dvcs.w3.org/hg/prov/raw-file/d53b5b7c1a32/ontology/Overview.html
[2] http://www.w3.org/2007/08/pyRdfa/extract?format=turtle&uri=http://dvcs.w3.org/hg/prov/raw-file/d53b5b7c1a32/ontology/Overview.html
[3] http://www.w3.org/2007/08/pyRdfa/
[4] http://validator.w3.org/check?uri=http%3A%2F%2Fdvcs.w3.org%2Fhg%2Fprov%2Fraw-file%2Fd53b5b7c1a32%2Fontology%2FOverview.html&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3
Received on Saturday, 2 June 2012 04:52:17 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:40 UTC