<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.jenitennison.com/blog" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>rdf</title>
 <link>http://www.jenitennison.com/blog/taxonomy/term/31</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>Metadata about RDF triples: reification and Linked Data</title>
 <link>http://www.jenitennison.com/blog/node/85</link>
 <description>&lt;p&gt;Those of you who have been following this blog will know that I&amp;#8217;ve been thinking recently about &lt;a href=&quot;http://www.jenitennison.com/blog/node/67#comment-4512&quot; title=&quot;Jeni&#039;s Musings: Web 2.0 project: RDF and uncertainty&quot;&gt;how to handle uncertainty related to RDF triples&lt;/a&gt; (specifically in the context of a genealogical web app). Certainty isn&amp;#8217;t the only kind of metadata-about-triples that you&amp;#8217;d want to keep in an app like this. We need to know things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who made the statement&lt;/li&gt;
&lt;li&gt;when the statement was made&lt;/li&gt;
&lt;li&gt;what evidence that led to the statement being made&lt;/li&gt;
&lt;li&gt;licensing information about the reuse of the statement&lt;/li&gt;
&lt;li&gt;(if we go with the rating idea) what ratings the statement has been given&lt;/li&gt;
&lt;li&gt;(if we allow editing of statements) what changes have been made to the statement over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and so on. In short, all the metadata that you&amp;#8217;d want to associate with &lt;em&gt;resources&lt;/em&gt; you&amp;#8217;d also want to associate with &lt;em&gt;statements&lt;/em&gt;.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;I&amp;#8217;d anticipated using &lt;a href=&quot;http://www.w3.org/TR/rdf-primer/#reification&quot; title=&quot;W3C: RDF Primer: Reification&quot;&gt;reification&lt;/a&gt; to associate metadata with statements. Something like this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;rdf:Statement rdf:about=&quot;#statement1&quot;&amp;gt;
  &amp;lt;rdf:subject rdf:resource=&quot;/people/CharlesDarwin&quot; /&amp;gt;
  &amp;lt;rdf:predicate rdf:resource=&quot;/ontology/event-roles/passenger&quot; /&amp;gt;
  &amp;lt;rdf:object rdf:resource=&quot;/events/BeagleVoyage&quot; /&amp;gt;
  &amp;lt;dc:creator rdf:resource=&quot;/users/JeniT&quot; /&amp;gt;
  &amp;lt;dc:date rdf:datatype=&quot;xsd:date&quot;&amp;gt;2008-04-11&amp;lt;/dc:date&amp;gt;
  &amp;lt;g:certainty rdf:datatype=&quot;xsd:decimal&quot;&amp;gt;1.0&amp;lt;/g:certainty&amp;gt;
  ...
&amp;lt;/rdf:Statement&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or &lt;a href=&quot;http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Syntax-reifying&quot; title=&quot;W3C: RDF/XML Syntax Specification: Reifying Statements: rdf:ID&quot;&gt;using &lt;code&gt;rdf:ID&lt;/code&gt;&lt;/a&gt;, although this does limit the URI of our statements to hash-URIs:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;rdf:Description about=&quot;/people/CharlesDarwin&quot;&amp;gt;
  &amp;lt;r:passenger rdf:ID=&quot;#statement1&quot; rdf:resource=&quot;/events/BeagleVoyage&quot; /&amp;gt; 
&amp;lt;/rdf:Description&amp;gt;
&amp;lt;rdf:Description about=&quot;#statement1&quot;&amp;gt;
  &amp;lt;dc:creator rdf:resource=&quot;/users/JeniT&quot; /&amp;gt;
  &amp;lt;dc:date rdf:datatype=&quot;xsd:date&quot;&amp;gt;2008-04-11&amp;lt;/dc:date&amp;gt;
  &amp;lt;g:certainty rdf:datatype=&quot;xsd:decimal&quot;&amp;gt;1.0&amp;lt;/g:certainty&amp;gt;
&amp;lt;/rdf:Description&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Please feel free to correct my RDF, RDF-folks!)&lt;/p&gt;

&lt;p&gt;We can embed this information into our web pages using RDFa:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;div about=&quot;#statement1&quot; instanceof=&quot;rdf:Statement&quot;&amp;gt;
  &amp;lt;p class=&quot;statement&quot;&amp;gt;
    &amp;lt;a rel=&quot;rdf:subject&quot; href=&quot;/people/CharlesDarwin&quot;&amp;gt;
      Charles Darwin
    &amp;lt;/a&amp;gt;
    was a
    &amp;lt;a rel=&quot;rdf:predicate&quot; href=&quot;/ontologies/event-roles/passenger&quot;&amp;gt;
      passenger
    &amp;lt;/a&amp;gt;
    on the
    &amp;lt;a rel=&quot;rdf:object&quot; href=&quot;/events/BeagleVoyage&quot;&amp;gt;
      &amp;lt;span about=&quot;/people/CharlesDarwin&quot; 
            rel=&quot;r:passenger&quot; 
            resource=&quot;/events/BeagleVoyage&quot;&amp;gt;
        Beagle Voyage
      &amp;lt;/span&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;/p&amp;gt;
  &amp;lt;dl class=&quot;metadata&quot;&amp;gt;
    &amp;lt;dt&amp;gt;Author:&amp;lt;/dt&amp;gt;
    &amp;lt;dd&amp;gt;
      &amp;lt;a rel=&quot;dc:creator&quot; href=&quot;/users/JeniT&quot;&amp;gt;
        Jeni Tennison
      &amp;lt;/a&amp;gt;
    &amp;lt;/dd&amp;gt;
    &amp;lt;dt&amp;gt;Date:&amp;lt;/dt&amp;gt;
    &amp;lt;dd property=&quot;dc:date&quot; datatype=&quot;xsd:date&quot; 
        content=&quot;2008-04-11&quot;&amp;gt;
      11 Apr, 2008
    &amp;lt;/dd&amp;gt;
    &amp;lt;dt&amp;gt;Certainty:&amp;lt;/dt&amp;gt;
    &amp;lt;dd property=&quot;b:certainty&quot; datatype=&quot;xsd:decimal&quot;
        content=&quot;1.0&quot;&amp;gt;
      &amp;lt;img src=&quot;stars5.gif&quot; alt=&quot;five stars&quot; /&amp;gt;
    &amp;lt;/dd&amp;gt;
  &amp;lt;/dl&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that I&amp;#8217;ve incorporated both the reified statement and the statement itself into the RDFa. If I&amp;#8217;m correct in my mental parsing of RDFa, I think this leads to the set of triples from the RDF/XML in the above examples plus the triple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;/people/CharlesDarwin&amp;gt; r:passenger &amp;lt;/events/BeagleVoyage&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But then the other day, I was reading the tutorial &lt;a href=&quot;http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/&quot; title=&quot;How to publish Linked Data on the Web&quot;&gt;How to publish Linked Data on the Web&lt;/a&gt;, which says&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We discourage the use of RDF reification as the semantics of reification are unclear and as reified statements are rather cumbersome to query with the SPARQL query language. Metadata can be attached to the information resource instead, as explained in Section 5.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Jumping to Section 5, I find&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Metadata:&lt;/strong&gt; The representation should contain any metadata you want to attach to your published data, such as a URI identifying the author and licensing information. These should be recorded as RDF descriptions of the information resource that describes a non-information resource; that is, the subject of the RDF triples should be the URI of the information resource. Attaching meta-information to that information resource, rather than attaching it to the described resource itself or to specific RDF statements about the resource (as with RDF reification) plays nicely together with using Named Graphs and the SPARQL query language in Linked Data client applications&amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are some examples of what this looks like within the tutorial. The first is an &amp;#8220;&lt;strong&gt;authoritative description&lt;/strong&gt;&amp;#8221; found at &lt;code&gt;http://dbpedia.org/data/Alec_Empire&lt;/code&gt; after a 303 redirection from &lt;code&gt;http://dbpedia.org/resource/Alec_Empire&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Metadata and Licensing Information
&amp;lt;http://dbpedia.org/data/Alec_Empire&amp;gt;
    rdfs:label &quot;RDF description of Alec Empire&quot; ;
    rdf:type foaf:Document ;
    dc:publisher &amp;lt;http://dbpedia.org/resource/DBpedia&amp;gt; ;
    dc:date &quot;2007-07-13&quot;^^xsd:date ;
    dc:rights &amp;lt;http://en.wikipedia.org/wiki/WP:GFDL&amp;gt; .

# The description
&amp;lt;http://dbpedia.org/resource/Alec_Empire&amp;gt; 
    foaf:name &quot;Empire, Alec&quot; ;
    rdf:type foaf:Person ;
    rdf:type &amp;lt;http://dbpedia.org/class/yago/musician&amp;gt; ;
    rdfs:comment
        &quot;Alec Empire (born May 2, 1972) is a German musician who is ...&quot;@en ;
    rdfs:comment
        &quot;Alec Empire (eigentlich Alexander Wilke) ist ein deutscher Musiker. ...&quot;@de ;
    dbpedia:genre &amp;lt;http://dbpedia.org/resource/Techno&amp;gt; ;
    dbpedia:associatedActs 
      &amp;lt;http://dbpedia.org/resource/Atari_Teenage_Riot&amp;gt; ;
    foaf:page &amp;lt;http://en.wikipedia.org/wiki/Alec_Empire&amp;gt; ;
    foaf:page &amp;lt;http://dbpedia.org/page/Alec_Empire&amp;gt; ; 
    rdfs:isDefinedBy &amp;lt;http://dbpedia.org/data/Alec_Empire&amp;gt; ;
    owl:sameAs &amp;lt;http://zitgist.com/music/artist/d71ba53b-23b0-4870-a429-cce6f345763b&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second is a &lt;strong&gt;non-authoritative description&lt;/strong&gt; found at &lt;code&gt;http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkedDataTutorial/ChrisAboutRichard&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Metadata and Licensing Information
&amp;lt;&amp;gt;
    rdf:type foaf:Document ;
    dc:author &amp;lt;http://www.bizer.de#chris&amp;gt; ;
    dc:date &quot;2007-07-13&quot;^^xsd:date ;
    cc:license &amp;lt;http://web.resource.org/cc/PublicDomain&amp;gt; .

# The description
&amp;lt;http://richard.cyganiak.de/foaf.rdf#cygri&amp;gt; 
    foaf:name &quot;Richard Cyganiak&quot; ;
    foaf:topic_interest &amp;lt;http://dbpedia.org/resource/Category:Databases&amp;gt; ;
    foaf:topic_interest &amp;lt;http://dbpedia.org/resource/MacBook_Pro&amp;gt; ;
    rdfs:isDefinedBy &amp;lt;http://richard.cyganiak.de/foaf.rdf&amp;gt; ;
    rdf:seeAlso &amp;lt;&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that &lt;code&gt;rdfs:isDefinedBy&lt;/code&gt; does not necessarily point to the data you get when you retrieve the resource, but to an (presumably there can be more than one) authoritative description of the resource. It&amp;#8217;s also associated with a particular &lt;em&gt;resource&lt;/em&gt; rather than a particular &lt;em&gt;statement&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To know which metadata applies to a particular statement, an application must know where it got the statement from. In effect, a statement here has &lt;em&gt;four&lt;/em&gt; parts: subject, property, object and location (with the possibility that multiple statements with the same subject, property and object might have different locations and therefore different metadata). This is similar to assigning an ID to a statement, as with &lt;code&gt;rdf:ID&lt;/code&gt;, but restricts the statement&amp;#8217;s identifier to being the location where it was found.&lt;/p&gt;

&lt;p&gt;So what does that mean for the genealogical web app? Well, in the app we&amp;#8217;re going to find any given statement by a particular user quoted on lots of pages. I was intending to RDFa them all but that would mean lots of duplicate statements from different locations, potentially bloating applications that were harvesting the data.&lt;/p&gt;

&lt;p&gt;I can&amp;#8217;t work out whether I like or loathe the Linked Data concept of associating metadata with the document in which you find triples. In some ways it seems very natural &amp;#8212; look for information about a resource at the URI for the resouce &amp;#8212; but the metadata mechanisms restrict where you can place statements on the web (or at least assign semantics to their location which aren&amp;#8217;t necessarily intended), and that seems like a Bad Thing. On the other hand, perhaps I&amp;#8217;m just being overly influenced by the desire to use RDFa, which does lead one to want to mark up data wherever it appears.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;d welcome any advice.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/85#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Fri, 11 Apr 2008 21:59:07 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">85 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>RDF and XML Q&amp;A: Which should I use?</title>
 <link>http://www.jenitennison.com/blog/node/74</link>
 <description>&lt;p&gt;Another question to answer:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I’ve been reading about RDF, and I’m not sure in what situations it is more appropriate to use RDF over straight XML. I usually see RDF expressed as XML, but sometimes I see it written as language-independent functions (or methods).&lt;/p&gt;
  
  &lt;p&gt;Part of me is wondering if RDF is more appropriate for this project. What might the benefits be? And if it is, how difficult it would be to refactor it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Note that the person asking the question is talking about a small data-oriented project.) There&amp;#8217;s a huge amount that could be said about this, so I might well post about some of it again. Here, I&amp;#8217;m going to cut to the chase. This is what I&amp;#8217;d recommend:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model your application in RDF terms&lt;/strong&gt;: Create a description of what classes of resources your application needs to deal with, and which properties link those together. You can call this description a RDF schema or conceptual model or ontology, depending on how impressive you want to sound. This modelling activity is useful in itself, largely because it helps you understand what information you’re dealing with and how it fits together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a markup language that can be mapped to RDF&lt;/strong&gt;: An XML version of your data allows you to make your data more generally available and reusable than locking it away in a triple store. Do one of the following:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Define a subset of &lt;a href=&quot;http://www.w3.org/TR/rdf-syntax-grammar/&quot; title=&quot;W3C Recommendation: RDF/XML Syntax Specification&quot;&gt;RDF/XML&lt;/a&gt; for your application&lt;/strong&gt;: The full flexibility of RDF/XML is complicated to handle for plain XML processors, so subset it to, for example, always used typed elements (such as &lt;code&gt;&amp;lt;my:Course&amp;gt;&lt;/code&gt;) rather than &lt;code&gt;rdf:type&lt;/code&gt; properties, and to use referencing or nesting in a consistent way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design markup languages that use &lt;a href=&quot;http://www.w3.org/TR/xhtml-rdfa-primer/&quot; title=&quot;W3C Working Draft: RDFa Primer&quot;&gt;RDFa&lt;/a&gt; attributes to reflect the semantics of the data&lt;/strong&gt;: This gives you a standard way of mapping your markup language into RDF triples without having to adopt the &amp;#8220;striped&amp;#8221; design of RDF/XML in your markup language. A lot of the attributes can be defaulted to leave the markup language fairly streamlined.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design markup languages exactly as you like, and define &lt;a href=&quot;http://www.w3.org/TR/grddl/&quot; title=&quot;W3C Recommendation: Gleaning Resource Descriptions from Dialects of Languages (GRDDL)&quot;&gt;GRDDL&lt;/a&gt; mappings from them into RDF/XML&lt;/strong&gt;: This gives you the most flexibility in your markup language design (though not complete flexibility &amp;#8212; you still need to be able to identify the statements that you want to make from the XML), at the expense of having to write some XSLT.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The point of doing this is to put you in a position where you &lt;em&gt;can&lt;/em&gt; just use XML if you want, but you also have the flexibility of using RDF either now or in the future.&lt;/p&gt;

&lt;p&gt;The benefits of using RDF are partly to do with the ease with which you can do certain kinds of processing (specifically combining &amp;#8220;facts&amp;#8221; together to draw conclusions) and partly to do with the potential of reuse of your data. In the same way that XML gives people a common &lt;em&gt;syntax&lt;/em&gt; and thus aids interchange of information, RDF allows others to draw &lt;em&gt;some&lt;/em&gt; conclusions (more than they would with a random mess of elements and attributes) about what your data means.&lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t think that using RDF triple stores, &lt;a href=&quot;http://www.w3.org/TR/rdf-sparql-query/&quot; title=&quot;W3C Recommendation: SPARQL Query Language for RDF&quot;&gt;SPARQL&lt;/a&gt; and all that jazz gives you a great return for a small-scale, personal project &amp;#8212; you&amp;#8217;re better off sticking to flat files and some XSLT &amp;#8212; but it doesn&amp;#8217;t hurt to build in some of the formality of RDF anyway.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/74#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/14">xml</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Sun, 17 Feb 2008 20:10:12 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">74 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Web 2.0 project: RDF and uncertainty</title>
 <link>http://www.jenitennison.com/blog/node/67</link>
 <description>&lt;p&gt;I&amp;#8217;ve been thinking a bit recently about how to deal with certainty in our Genealogical Web 2.0 application. We&amp;#8217;ve come round to using an RDF model to represent what the Gentech data model calls &amp;#8220;assertions&amp;#8221;; assertions such as &amp;#8220;Charles Darwin was a passenger on the Beagle Voyage&amp;#8221; are represented as an RDF Statement in which (a resource representing) &amp;#8220;Charles Darwin&amp;#8221; is the subject, (a resource representing) &amp;#8220;Beagle Voyage&amp;#8221; is the object, and &amp;#8220;was a passenger on&amp;#8221; is the predicate/property.&lt;/p&gt;

&lt;p&gt;All the statements in the genealogical application should be based on some source of information, either an external piece of evidence (such as a marriage certificate) or by combining existing statements. Either way, there&amp;#8217;s certain metadata that we want to store about it, such as&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who created the statement&lt;/li&gt;
&lt;li&gt;when it was made&lt;/li&gt;
&lt;li&gt;the date(s) when the statement was true&lt;/li&gt;
&lt;li&gt;the certainty in the statement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The certainty factor is interesting. For statements based directly on evidence, there are three factors that come into play:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the reliability of the evidence itself; for example, a marriage certificate is more reliable than a diary entry for a wedding&lt;/li&gt;
&lt;li&gt;the certainty the user has in drawing their conclusion based on the evidence; for example,  you would be more certain in the statement that the groom named on a marriage certificate is a man than in the statement that the witness named on a marriage certificate is a friend of the groom&lt;/li&gt;
&lt;li&gt;the reliability of the user who has made the statement: an expert in family history is likely to draw more accurate conclusions than someone who has only just started&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So now the question is how to assess these factors. The usual Web 2.0 method is to use ratings. We could get users to rate each other to provide the third score. We could then get users to rate the reliability of particular pieces of evidence, modify that score based on the users&amp;#8217; reliability, and aggregate those scores.&lt;/p&gt;

&lt;p&gt;The final certainty of the statement would be a combination of this score for evidence reliability and ratings from multiple users, again weighted according to the users&amp;#8217; reliability.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/67#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Fri, 21 Dec 2007 22:03:51 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">67 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Converting (people) to RDF</title>
 <link>http://www.jenitennison.com/blog/node/62</link>
 <description>&lt;p&gt;As I&amp;#8217;ve mentioned before, I&amp;#8217;ve been a RDF sceptic for a long time. Perhaps it&amp;#8217;s precisely &lt;em&gt;because&lt;/em&gt; of my knowledge engineering background: in my experience, the field is about equal parts academic optimism, sales-related exaggeration and plain old information management. In other (un-minced) words, unrealistic aims with unproven technologies that are sold as being much cleverer (and more innovative) than they are. It&amp;#8217;s not just RDF, I should say, but the whole Semantic Web pitch (typified for me by the idea of &lt;a href=&quot;http://www.idealliance.org/papers/extreme/proceedings/html/2002/Newcomb01/EML2002Newcomb01.html&quot; title=&quot;Extreme 2002: Forecasting Terrorism: Meeting the Scaling Requirements&quot;&gt;halting global terrorism using the power of Topic Maps&lt;/a&gt;) that seemed ludicrous to me.&lt;/p&gt;

&lt;p&gt;Time moves on, and I might be changing my mind.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;Putting the whole over-selling thing to one side, one underlying reason for my scepticism was that it seemed that the Semantic Web depended on people doing things in one way: using big standard ontologies with RDF/XML representations. That doesn&amp;#8217;t seem to me to fit with the web. The power of the web comes from people (largely) being able to do their own thing, in their own time, with opportunistic linking between sets of information. If you want to use the web, you have to work with the loose coupling.&lt;/p&gt;

&lt;p&gt;But RDF is becoming more web-friendly. &lt;a href=&quot;http://www.w3.org/TR/grddl/&quot; title=&quot;W3C: Gleaning Resource Descriptions from Dialects of Languages (GRDDL): Recommendation&quot;&gt;GRDDL&lt;/a&gt; and &lt;a href=&quot;http://www.w3.org/TR/rdfa-syntax/&quot; title=&quot;W3C: RDFa in XHTML: Syntax and Processing: Working Draft&quot;&gt;RDFa&lt;/a&gt; both provide mechanisms for providing RDF triples whilst retaining your own markup language. GRDDL does it by pointing at some XSLT that will turn your markup into &lt;a href=&quot;http://www.w3.org/TR/rdf-syntax-grammar/&quot; title=&quot;W3C: RDF/XML Syntax Specification (Revised): Recommendation&quot;&gt;RDF/XML&lt;/a&gt;, while RDFa provides a set of conventions that you can use in your markup that allow it to be directly interpreted as RDF by RDFa processors. Either way, it means you don&amp;#8217;t have to adopt the &lt;a href=&quot;http://www.w3.org/2001/10/stripes/&quot; title=&quot;W3C: RDF: Understanding the Striped RDF/XML Syntax&quot;&gt;striped syntax&lt;/a&gt; pattern in your markup, or even use the RDF namespace. The RDF data model always was theoretically distinct from the RDF/XML syntax; these new technologies (plus simple notations such as &lt;a href=&quot;http://www.dajobe.org/2004/01/turtle/&quot; title=&quot;Turtle - Terse RDF Triple Language&quot;&gt;Turtle&lt;/a&gt;) place the emphasis back on the model.&lt;/p&gt;

&lt;p&gt;Also encouraging is that &lt;a href=&quot;http://www.w3.org/TR/owl-features/&quot; title=&quot;W3C:  OWL Web Ontology Language Overview: Recommendation&quot;&gt;OWL&lt;/a&gt; specifically supports linking between ontologies, allowing you to indicate that classes, properties and individuals from different ontologies are equivalent. This means you are free to create your own local ontology, as am I, and either of us (or a third party) can later link the two ontologies together, along with any related triples.&lt;/p&gt;

&lt;p&gt;However, I was chatting to my friend Louise the other day about RDF, and asked her whether she&amp;#8217;d be using it in her next project. Her basic argument against was simply that it wasn&amp;#8217;t worth it. And this is the second underlying reason for my scepticism: does RDF give a big enough win to justify the effort required to use it? The &amp;#8220;market&amp;#8221; seems to say not. RDF has been around for years; if it was going to become an established technology, surely it would have by now. When I look at the web today, it&amp;#8217;s pretty hard to find RDF. Where semantic information is available, it&amp;#8217;s usually provided in a JSON or XML format. Or of course they&amp;#8217;re using microformats in their pages. Why go to the bother of defining an ontology and providing a GRDDL transformation, or adopting the rigour of RDFa, when these technologies get the job done?&lt;/p&gt;

&lt;p&gt;It &lt;em&gt;should&lt;/em&gt; be that mashing up RDF is easier than mashing up random JSON/XML. Just a few &amp;#8220;this is equivalent to that&amp;#8221; assertions and you&amp;#8217;re good to go. So show me the places (outside academia) where RDF-based mash-ups are being made. Show me the interfaces that are allowing people in the real world to use RDF to pull together information from diverse sources, get better overviews, draw more accurate conclusions.&lt;/p&gt;

&lt;p&gt;I want to believe. Show me the uses of RDF that will convert the sceptic in me.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/62#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Thu, 15 Nov 2007 20:04:33 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">62 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>RDFa, sure, but now?</title>
 <link>http://www.jenitennison.com/blog/node/52</link>
 <description>&lt;p&gt;I think &lt;a href=&quot;http://www.w3.org/TR/xhtml-rdfa-primer/&quot; title=&quot;W3C: RDFa Primer&quot;&gt;RDFa&lt;/a&gt; has a lot of things going for it. I&amp;#8217;ve been a big Semantic Web sceptic for a long time, but getting semantic information embedded into web pages is cool, and RDFa is that much more rigorous than &lt;a href=&quot;http://www.microformats.org/&quot; title=&quot;Microformats website&quot;&gt;microformats&lt;/a&gt;. Sure, it&amp;#8217;s a bit more complicated too, but I&amp;#8217;m not afraid of namespaces!&lt;/p&gt;

&lt;p&gt;The problem is that I&amp;#8217;m supposed to be assessing the introduction of RDFa into a biggish, important, real-world website. It&amp;#8217;s a website where every change has to go through a Process. There are project managers, development managers, product managers. There are functional specifications, technical specifications, and rollout documents. There are unit tests, peer reviews and user acceptance tests. The database is huge; the HTML is pre-generated.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;In short, every change takes time and costs money. I&amp;#8217;m just not sure it&amp;#8217;s a good idea to introduce a technology that only exists in a Working Draft of a Primer &lt;em&gt;now&lt;/em&gt;, when tracking that technology could be very costly.&lt;/p&gt;

&lt;p&gt;And if we used RDFa, we wouldn&amp;#8217;t be using XHTML 1.0 any more; we&amp;#8217;d be using XHTML 2.0. If we want to have valid pages, we&amp;#8217;d have to reference a non-existent DTD, or make our own. And tracking XHTML 2.0 is even more of a risk, it seems to me.&lt;/p&gt;

&lt;p&gt;So my current thinking is that in this case, RDFa just isn&amp;#8217;t practical. Better to use &lt;a href=&quot;http://www.w3.org/TR/grddl/&quot; title=&quot;W3C: Gleaning Resource Descriptions from Dialects of Languages&quot;&gt;GRDDL&lt;/a&gt; with something less revolutionary, like &lt;a href=&quot;http://research.talis.com/2005/erdf/wiki/Main/RdfInHtml&quot; title=&quot;Talis: Embedded RDF&quot;&gt;eRDF&lt;/a&gt; or microformats or plain-old custom class names.&lt;/p&gt;

&lt;p&gt;Anyone want to persuade me otherwise?&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/52#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Sun, 19 Aug 2007 21:34:35 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">52 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Things that make me scream: RDF &quot;QNames&quot;</title>
 <link>http://www.jenitennison.com/blog/node/49</link>
 <description>&lt;p&gt;Having avoided &lt;a href=&quot;http://en.wikipedia.org/wiki/Resource_Description_Framework&quot; title=&quot;Wikipedia: Resource Description Framework&quot;&gt;RDF&lt;/a&gt; like the veritable plague for years, I have been forced to look at it properly for my latest &amp;#8220;put &lt;a href=&quot;http://en.wikipedia.org/wiki/RDFa&quot; title=&quot;Wikipedia: RDFa&quot;&gt;RDFa&lt;/a&gt; on our web pages&amp;#8221; project. So the other day I came across this weirdness surrounding &amp;#8220;QNames&amp;#8221; in &lt;a href=&quot;http://www.dajobe.org/2004/01/turtle/&quot; title=&quot;Turtle: notation for RDF&quot;&gt;Turtle&lt;/a&gt;, &lt;a href=&quot;http://www.w3.org/TR/rdf-sparql-query/&quot; title=&quot;W3C: SPARQL: queries over RDF&quot;&gt;SPARQL&lt;/a&gt; and RDFa (and so on)&amp;#8230;&lt;/p&gt;

&lt;p&gt;As we all know, RDF is about making statements about resources, and resources are identified by URI. And the predicates/properties that you use to make statements about resources are &lt;em&gt;also&lt;/em&gt; identified by URI. So I can say things like (in Turtle syntax):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;http://www.lmnl.org/wiki/Creole&amp;gt;
  &amp;lt;http://purl.org/dc/elements/1.1/creator&amp;gt;
    [&amp;lt;http://xmlns.com/foaf/0.1/weblog&amp;gt;
     &amp;lt;http://www.jenitennison.com/blog&amp;gt;] .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and it means that the creator (as defined by &lt;a href=&quot;http://www.dublincore.org/&quot; title=&quot;Dublin Core Metadata Initiative&quot;&gt;Dublin Core&lt;/a&gt;) of the page &lt;code&gt;&amp;lt;http://www.lmnl.org/wiki/Creole&amp;gt;&lt;/code&gt; is someone whose weblog (as defined by &lt;a href=&quot;http://www.foaf-project.org/&quot; title=&quot;Friend of a Friend Project Page&quot;&gt;FOAF&lt;/a&gt;) is &lt;code&gt;&amp;lt;http://www.jenitennison.com/blog/&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;The trouble with URIs is that they&amp;#8217;re so &lt;em&gt;long&lt;/em&gt;. Turtle, SPARQL and RDFa, and all of these technologies want to make it easy to write RDF, so they want to provide a shorthand. The shorthand they provide looks similar to, and is even sometimes called, a &amp;#8220;QName&amp;#8221;.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s how &amp;#8220;QNames&amp;#8221; work in these RDF technologies. You associate a prefix with a URI like so (this from Turtle):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@prefix dc: &amp;lt;http://purl.org/dc/elements/1.1/&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then when you write the prefix followed by a &lt;code&gt;:&lt;/code&gt;, followed by a local part, it&amp;#8217;s equivalent to concatenating the URI with the local part; the result is the URI represented by the &amp;#8220;QName&amp;#8221;. So having defined the &lt;code&gt;dc&lt;/code&gt; prefix as above, I can use &lt;code&gt;dc:creator&lt;/code&gt; in place of the URI &lt;code&gt;&amp;lt;http://purl.org/dc/elements/1.1/creator&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Seems simple enough, right? I mean, I know how QNames work in XML, and these look the same, just with some behind-the-scenes assumptions about how to resolve QNames to get to further information about them.&lt;/p&gt;

&lt;p&gt;My first double-take was when I wanted to add a datatype to a literal. I wanted to indicate that the value was a date, which you can do in Turtle or SPARQL with the syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;2007-08-13&quot;^^xs:date
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I can write the namespace for XML Schema on auto-pilot, so I started writing it &lt;code&gt;&amp;lt;http://www.w3.org/2001/XMLSchema&amp;gt;&lt;/code&gt;, then wondered whether they just used the datatypes URI so went to check. What URI is used in the examples? &lt;code&gt;&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;/code&gt;. Huh? What&amp;#8217;s that &lt;code&gt;#&lt;/code&gt; doing there? Well, it&amp;#8217;s because the full URI is then &lt;code&gt;&amp;lt;http://www.w3.org/2001/XMLSchema#date&amp;gt;&lt;/code&gt;, which looks a whole lot better than &lt;code&gt;&amp;lt;http://www.w3.org/2001/XMLSchemadate&amp;gt;&lt;/code&gt;. It doesn&amp;#8217;t matter that &lt;code&gt;&amp;lt;http://www.w3.org/2001/XMLSchema#date&amp;gt;&lt;/code&gt; doesn&amp;#8217;t resolve to anything (or does it?), so long as we all use the same URI to mean date-as-defined-in-XML-Schema. The small matter that the RDF &amp;#8220;namespace&amp;#8221; for XML Schema is different from the normal XML namespace for XML Schema is by-the-by. Boggle.&lt;/p&gt;

&lt;p&gt;My second double-take was when I wanted to write an example that used numbers as identifiers. My last post was about URL design, and used the URL &lt;code&gt;&amp;lt;http://www.statutelaw.gov.uk/legislation/3032571&amp;gt;&lt;/code&gt; as an illustration. Now say I want to use a QName to represent that URI. I can do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@prefix leg: &amp;lt;http://www.statutelaw.gov.uk/legislation/&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;but if I then do &lt;code&gt;leg:3032571&lt;/code&gt; that&amp;#8217;s not a legal (XML) QName: the local part isn&amp;#8217;t an XML Name because it begins with a number. Turtle doesn&amp;#8217;t allow it, SPARQL kinda does (it&amp;#8217;s an &amp;#8220;at risk feature&amp;#8221;), and who knows what RDFa will do (there&amp;#8217;s not enough of a spec to tell as yet).&lt;/p&gt;

&lt;p&gt;Then there&amp;#8217;s the weirdnesses of &amp;#8220;QNames&amp;#8221; with no prefix, which still have a colon. And QNames with an underscore as the prefix, which of course mean a blank node with a specified ID, but let&amp;#8217;s leave that to one side.&lt;/p&gt;

&lt;p&gt;Really, the whole mess started with &lt;a href=&quot;http://www.w3.org/TR/rdf-syntax-grammar/&quot; title=&quot;W3C: RDF/XML&quot;&gt;RDF/XML&lt;/a&gt; which allows you to give elements the &amp;#8220;QName&amp;#8221; equivalent of the class that you&amp;#8217;re talking about. So &lt;code&gt;&amp;lt;rdf:Description&amp;gt;&lt;/code&gt; can be replaced by &lt;code&gt;&amp;lt;foaf:Person&amp;gt;&lt;/code&gt;. Indeed, properties pretty much &lt;em&gt;have&lt;/em&gt; to be represented by elements whose name is equivalent to the property URI in RDF/XML. That doesn&amp;#8217;t usually matter so much because, unlike instances, which could be pretty much any URI, properties and classes are likely to have sensible names (&lt;code&gt;rdf:_1&lt;/code&gt;, &lt;code&gt;rdf:_2&lt;/code&gt; and so on being notable, but illustrative, exceptions: it really shouldn&amp;#8217;t be necessary to add underscores just to satisfy the QName naming rules which don&amp;#8217;t apply in the abstract RDF model).&lt;/p&gt;

&lt;p&gt;Fundamentally, using &amp;#8220;QNames&amp;#8221; as abbreviations for URIs is a bad idea. QNames have a number of restrictions on them because they are built to be legal XML Names: the kinds of things that you  can call elements and attributes. URIs &lt;em&gt;don&amp;#8217;t&lt;/em&gt; have these restrictions: it&amp;#8217;s perfectly possible for the last part of a URI to consist purely of numbers, or to have a slash at the end, or even to have request parameters. Fair enough that meaningful QNames can be used for &lt;em&gt;some&lt;/em&gt; URIs, but if you can&amp;#8217;t use them properly for &lt;em&gt;all&lt;/em&gt; URIs, then there has to be a better way.&lt;/p&gt;

&lt;p&gt;The way that you usually create short URIs is to use a &lt;em&gt;relative&lt;/em&gt; URI, which is resolved against a &lt;em&gt;base&lt;/em&gt; URI to produce an &lt;em&gt;absolute&lt;/em&gt; URI. And that&amp;#8217;s the mechanism that should be used in RDF. The only difficulty is that in most RDF documents, you&amp;#8217;ll have lots of URIs with completely different base URIs, so having just one base URI (like normal) doesn&amp;#8217;t cut it.&lt;/p&gt;

&lt;p&gt;You need to be able to associate shorthands (I won&amp;#8217;t call them prefixes, because doing so is confusing) with base URIs &amp;#8212; a &lt;code&gt;@base&lt;/code&gt; directive will do &amp;#8212; and have a simple syntax for resolving relative URIs against a given base. You could use a &lt;em&gt;shorthand&lt;/em&gt;:&amp;lt;&lt;em&gt;relativeURI&lt;/em&gt;&gt; syntax, I think, and allow the &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;s to be dropped if the relative URI happens to be a legal Name. So with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@base leg: &amp;lt;http://www.statutelaw.gov.uk/legislation/&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you could use &lt;code&gt;leg:&amp;lt;3032571&amp;gt;&lt;/code&gt; to mean the URI &lt;code&gt;&amp;lt;http://www.statutelaw.gov.uk/legislation/3032571&amp;gt;&lt;/code&gt; or &lt;code&gt;leg:&amp;lt;wine/2007/-/&amp;gt;&lt;/code&gt; to mean the URI &lt;code&gt;&amp;lt;http://www.statutelaw.gov.uk/legislation/wine/2007/-/&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;SPARQL already has a &lt;code&gt;BASE&lt;/code&gt; directive to define a &lt;em&gt;single&lt;/em&gt; base URI that&amp;#8217;s used when resolving relative URIs in URI references; really all I&amp;#8217;m suggesting is allowing several base URIs to operate at the same time (using shorthands to distinguish between them), and dropping &lt;code&gt;PREFIX&lt;/code&gt;. Turtle doesn&amp;#8217;t have a &lt;code&gt;@base&lt;/code&gt; directive, though there&amp;#8217;s a suggestion that one might be added, so there the changes are a little more major.&lt;/p&gt;

&lt;p&gt;In RDFa, &amp;#8220;QNames&amp;#8221; are used in attribute values to indicate class URIs, property URIs, and datatype URIs. And normal namespace declarations are used to make the prefixes, which means training yourself to write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema#&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;when you&amp;#8217;re writing RDFa, while everywhere else (schemas, stylesheets, etc.) you write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;XML namespace declarations really shouldn&amp;#8217;t be used here. Instead, you could extend the &lt;code&gt;&amp;lt;base&amp;gt;&lt;/code&gt; element-as-was to provide bindings&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;base short=&quot;xs&quot; href=&quot;http://www.w3.org/2001/XMLSchema#&quot; /&amp;gt;
&amp;lt;base short=&quot;leg&quot; href=&quot;http://www.statutelaw.gov.uk/legislation/&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and then use &lt;em&gt;those&lt;/em&gt; bindings when interpreting the attribute values (the &lt;em&gt;shorthand&lt;/em&gt;:&amp;lt;&lt;em&gt;relativeURI&lt;/em&gt;&gt; syntax won&amp;#8217;t work here, because of having to escape the &lt;code&gt;&amp;lt;&lt;/code&gt;s in attribute values, but you get the idea).&lt;/p&gt;

&lt;p&gt;Meanwhile, if you have free reign over your URL space and you&amp;#8217;re thinking of using RDF, URLs should be designed such that the last part (be it fragment or path segment) is a legal XML local name. Doing so will make it a lot easier to express statements in Turtle or RDFa and queries in SPARQL. What&amp;#8217;s more, the last part of the URI should be the unique identifier for the resource in question; if your URLs look like &lt;code&gt;&amp;lt;http://www.example.com/collection/5326/view&amp;gt;&lt;/code&gt; then you should consider dropping the &lt;code&gt;/view&lt;/code&gt; part to provide the canonical URI, or swapping the last two parts of the path (oh and adding a prefix to the numeric identifier) to give &lt;code&gt;&amp;lt;http://www.example.com/collection/view/i5326&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And this is &lt;em&gt;particularly&lt;/em&gt; true, indeed fairly essential, for any URLs that you might want to use to represent classes or properties.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/49#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Wed, 15 Aug 2007 22:38:28 +0100</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">49 at http://www.jenitennison.com/blog</guid>
</item>
</channel>
</rss>
