<?xml version="1.0" encoding="iso-8859-1"?> 
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:dcterms="http://purl.org/dc/terms/" 
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:thr="http://purl.org/rss/1.0/modules/threading/"
	xmlns:pb="http://www.ideaspace.net/users/wkearney/schema/postback/" 
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" 
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:mt="http://movabletype.org/"
	xmlns:foaf="http://xmlns.com/foaf/0.1/" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:html="http://www.w3.org/TR/REC-html40/"
	xmlns="http://purl.org/rss/1.0/"
> 

<rdf:Description rdf:about="http://www.ideaspace.net/users/wkearney/archives/entries/000404.html"> 
	<title>Some RDF examples</title>
	<link>http://www.ideaspace.net/users/wkearney/archives/entries/000404.html</link>
	<description>I&apos;ve posted some examples of using RDF and directed graphs.</description> 

	<dc:creator>wkearney</dc:creator> 
	<dc:date>2003-07-25T16:38:07-05:00</dc:date> 
	<dc:identifier>http://www.ideaspace.net/users/wkearney/archives/entries/000404.html</dc:identifier>
	<dc:language>en-us</dc:language>

	 
	<dc:subject>RDF</dc:subject>

	<trackback:ping rdf:resource="http://www.ideaspace.net/mt/tb.cgi/399" />
	<pb:trackbacksFrom> 
		<rdf:Seq> 
			<rdf:li rdf:resource="http://dannyayers.com/archives/001625.html" />
		</rdf:Seq>
	</pb:trackbacksFrom>

	<slash:comments>1</slash:comments> 
	<thr:children>
		<rdf:Seq> 
			<rdf:li rdf:resource="http://www.ideaspace.net/users/wkearney/archives/entries/000404.html#c174" /> 
		</rdf:Seq>
	</thr:children>

	
	
	
	<dcterms:abstract>I&apos;ve posted some examples of using RDF and directed graphs.</dcterms:abstract> 
	<dcterms:created>2003-07-25T16:38:07-05:00</dcterms:created> 
	<dcterms:isPartOf rdf:resource="http://www.ideaspace.net/users/wkearney/" /> 

	<mt:body>Dan Brickley posted about structuring data using RDF.  He also posted a link to the RDF validator.  This sparked an idea.  One of the cool things about RDF is it&apos;s ability to use Directed Graphs.  Now, I don&apos;t have a perfect pitch on explaining why that&apos;s such a cool thing.  As they say, a picture&apos;s worth a thousand words.  So here&apos;s some real exampes.</mt:body>
	<mt:excerpt>I&apos;ve posted some examples of using RDF and directed graphs.</mt:excerpt> 
	<mt:more><![CDATA[<p>Take this snippet of RDF and paste it into the <a href="http://www.w3.org/RDF/Validator/">RDF validator</a>.  Note you'll probably want to make sure you pull down the "Graph Only" option.</p><pre>
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:eg="http://example.org/foovocab#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"&gt;
	&lt;foaf:Person rdf:nodeID="p1"&gt;
	    &lt;foaf:name&gt;Alice&lt;/foaf:name&gt;
	    &lt;foaf:knows&gt;
		&lt;foaf:Person rdf:nodeID="p2"&gt;
		    &lt;foaf:name&gt;Bob&lt;/foaf:name&gt;
		    &lt;eg:secretlyStalking rdf:nodeID="p1"/&gt;
		&lt;/foaf:Person&gt;
	    &lt;/foaf:knows&gt;
	    &lt;eg:acquaintance rdf:nodeID="p2"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="p2"/&gt;
	&lt;/foaf:Person&gt;
&lt;/rdf:RDF&gt;
</pre>
<p>Now take this snippet, open a new window to the RDF validator and check it.</p><pre>
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:eg="http://example.org/foovocab#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"&gt;
	&lt;foaf:Person rdf:nodeID="p1"&gt;
	    &lt;foaf:name&gt;Alice&lt;/foaf:name&gt;
	    &lt;foaf:knows rdf:nodeID="p2"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="p2"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="p2"/&gt;
	&lt;/foaf:Person&gt;
	&lt;foaf:Person rdf:nodeID="p2"&gt;
	    &lt;foaf:name&gt;Bob&lt;/foaf:name&gt;
	    &lt;eg:secretlyStalking rdf:nodeID="p1"/&gt;
	&lt;/foaf:Person&gt;
&lt;/rdf:RDF&gt;
</pre>
<p>Notice the pictures?  They're THE SAME.   How is this possible?  The <a href="http://www.ideaspace.net/users/wkearney/images/rdf/servlet_33999.png">second</a> one doesn't use the same ordering of the data as the <a href="http://www.ideaspace.net/users/wkearney/images/rdf/servlet_33990.png">first</a>.  And yet the graphs are exactly alike.  This is important.  Using RDF allows you to provide data that's got meaning independent of the restrictions imposed by the hierachical nature of XML.</p>
<p>It get's more interesting when you start to have a LOT of people with varying degrees of interconnectedness.  Cut-and-paste this snippet into the validator:</p>
<pre>
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:eg="http://example.org/foovocab#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"&gt;
	&lt;foaf:Person rdf:nodeID="alice"&gt;
	    &lt;foaf:name&gt;Alice&lt;/foaf:name&gt;
	    &lt;foaf:knows rdf:nodeID="bob"/&gt;
	    &lt;foaf:knows rdf:nodeID="ted"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="bob"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="ted"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="bob"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="ted"/&gt;
	&lt;/foaf:Person&gt;
	&lt;foaf:Person rdf:nodeID="bob"&gt;
	    &lt;foaf:knows rdf:nodeID="alice"/&gt;
	    &lt;foaf:knows rdf:nodeID="ted"/&gt;
	    &lt;foaf:name&gt;Bob&lt;/foaf:name&gt;
	    &lt;eg:secretlyStalking rdf:nodeID="alice"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="alice"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="ted"/&gt;
	&lt;/foaf:Person&gt;
	&lt;foaf:Person rdf:nodeID="carol"&gt;
	    &lt;foaf:name&gt;Carol&lt;/foaf:name&gt;
	    &lt;foaf:knows rdf:nodeID="alice"/&gt;
	    &lt;foaf:knows rdf:nodeID="ted"/&gt;
	    &lt;eg:secretlyStalking rdf:nodeID="bob"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="alice"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="ted"/&gt;
	&lt;/foaf:Person&gt;
	&lt;foaf:Person rdf:nodeID="ted"&gt;
	    &lt;foaf:name&gt;Ted&lt;/foaf:name&gt;
	    &lt;eg:acquaintance rdf:nodeID="carol"/&gt;
	    &lt;eg:acquaintance rdf:nodeID="alice"/&gt;
	    &lt;eg:archNemesis rdf:nodeID="bob"/&gt;
	&lt;/foaf:Person&gt;
&lt;/rdf:RDF&gt;
</pre>
<p>Here you have a <a href="http://www.ideaspace.net/users/wkearney/images/rdf/servlet_34059.png">graph</a> showing very complex set of relationships.  Yet the RDF/XML file is <strong>very compact</strong> and <strong>not verbose</strong> at all.  The amazing thing about RDF is I could then query the triples for just the http://xmlns.com/foaf/0.1/knows URI and <em>immediately</em> extract who knows who.  No DOM or SAX navigating needed at all.</p>

<p>So when you hear some developers carping about how the supposed verboseness of RDF, think about what it would take to fix the half-baked alternatives they're espousing.  Especially when things start to get very interconnected.  Using plain old XML would certainly be possible but why?  There's already a growing body of tools that support using RDF.</p>
<p>There's more to the story folks, don't believe the crap the <a href="http://www.scripting.com">simpletons</a> keep spouting.  It's just not true.</p>]]></mt:more>
	<mt:keywords></mt:keywords> 
	<mt:entryID>404</mt:entryID>

	<mt:entryPrev>403</mt:entryPrev>
	<mt:entryNext>402</mt:entryNext>

	<html:link rel="prev" type="application/xml" href="http://www.ideaspace.net/users/wkearney/archives/entries/000403.html.xml" title="Windows CMD autorun" />
	<html:link rel="next" type="application/xml" href="http://www.ideaspace.net/users/wkearney/archives/entries/000402.html.xml" title="Talking past each other?" />
	
	<mt:author>wkearney</mt:author> 
	<mt:authorNickname>Bill Kearney</mt:authorNickname> 
	<mt:authorEmail>wkearney@ideaspace.net</mt:authorEmail>
	<mt:authorURL rdf:resource="http://www.ideaspace.net/users/wkearney" /> 
	
	<foaf:name>wkearney</foaf:name> 
	<foaf:mbox rdf:resource="mailto:wkearney@ideaspace.net" /> 
	<foaf:nick>Bill Kearney</foaf:nick> 
	<foaf:homepage rdf:resource="http://www.ideaspace.net/users/wkearney" />
	
	<rdfs:seeAlso rdf:resource="http://www.ideaspace.net/users/wkearney/xml/index.rdf" />
	<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.64" /> 
</rdf:Description>
</rdf:RDF>