wiki:RdfWorkshop

Version 10 (modified by Earle Martin, 15 years ago) (diff)

more output differences, comments, suggestions

Rationale

Both OpenGuides and WikiTravel produce ResourceDescriptionFramework output for their pages. It is probably desirable, given the similar scope of the two projects, that both use an interchangeable format. Let's use this page to work one out.

Participants:

What do we want to list?

  • Page metadata
    • Name
    • Revision date
    • Comments about this revision? (or is that better modelled as a property of a Revision class, rather than a property of the page?)
  • Physical metadata
    • Name
    • Address
    • Telephone
    • Fax? (how often is the fax field completed? is this unnecessary duplication of information?)
    • Postcode/ZIP
    • URL
    • Categories
    • Locales
    • Opening hours?
    • Summary? (like the stuff that goes in the "summary of this node" field)
  • Contributor Metadata
    • Nickname
    • Real Name (optional)
    • Mailbox hash, e.g. foaf:mbox_sha1sum (optional)
    • Homepage/FOAF URI/some other target for rdfs:seeAlso (optional)

Access to RDF

  • OpenGuides: Link from navigation toolbar on every node. Should have a <link rel="alternate" type="application/rdf+xml"> as well; Earle is planning this for the next version.
  • WikiTravel: Global Special:Rdf script with form, enter page name and select what to output

Differences

Example of current OpenGuides RDF:

Example of current WikiTravel RDF:

What does OpenGuides do in RDF that WikiTravel doesn't?

  • As far as I can work out, the major feature that OpenGuides has is RDF describing the "thing" the page is about, not just RDF about the actual wiki entry. This is a really valuable feature imho. -- TomHeath?
  • Has JSON output, I think - ChrisSchmidt?, did your code for this ever get in? -- EarleMartin

What does WikiTravel do in RDF that OpenGuides doesn't?

  • Supports a range of output formats (Turtle and NTriples, as well as RDF/XML). The OpenGuides doesn't do this AFAIK, but I could be wrong. -- TomHeath?
  • Various Dublin Core metadata items:
    • Links to the page (<dcterms:isReferencedBy>)
    • Links from the page (<dcterms:references>)
    • Historical versions of the page (<dcterms:hasVersion>), each with its own rdf:Description block containing version URL, creator, timestamp and language (plus <dcterms:isVersionOf>)
    • Images in the page (<dcterms:hasPart>), each with its own rdf:Description block containing <dc:type rdf:resource="http://purl.org/dc/dcmitype/Image"/>

Comments

I like the range of Dublin Core in WikiTravel's output and think we should match it all by default (i.e. as if the user had selected all the options in WT's Special:Rdf). The selective option is nice, though, because I can imagine that you might want to retrieve a selected subset of data for a wide range of pages. So, we should support a URL argument for specifying what kind of RDF is wanted. A small script that allows you to do this in a pointy-clicky way - i.e., a clone of Special:Rdf! - as well as hacking the URL would be useful.

WikiTravel and OpenGuides do location hierarchy in a different way. OpenGuides:

<foaf:based_near>
  <wn:Neighborhood>
    <dc:title>Westminster</dc:title>
  </wn:Neighborhood>
</foaf:based_near>

WikiTravel:

<rdf:Description rdf:about="urn:x-wikitravel:en:Milton_Keynes">
  <dcterms:isPartOf rdf:resource="urn:x-wikitravel:en:Bedfordshire"/>
</rdf:Description>

(Note that WikiTravel uses URNs, but that's a separate topic I'd like to discuss later.)

Both approaches have their benefits, and I wonder if we could merge them. Something like:

<!-- sucky URLs may be subject to change! -->
<dcterms:isPartOf rdf:resource="http://london.openguides.org/index.cgi?id=Westminster;format=rdf#obj"/>
<foaf:based_near>
  <wn:Neighborhood rdf:about="http://london.openguides.org/index.cgi?id=Westminster;format=rdf#obj">
    <dc:title>Westminster</dc:title>
  </wn:Neighborhood>
</foaf:based_near>

Make sense?

As Tom comments above, WikiTravel is currently lacking data about the subject of the page itself. It would be great to get this in.

That's all I can think of for the moment but more will probably be coming.

-- EarleMartin