[xsd-users] Using XSD with RDF

Boris Kolpackov boris at codesynthesis.com
Tue Jan 31 10:50:17 EST 2006


Jose,

Jose <jmalv04 at gmail.com> writes:

> Before considering the RDF schema I would like to know whether XSD can
> tackle parsing the RDF file as XML.

You probably mean if XSD (the tool) can generate the code to parse
RDF as an XML.

> That by itself would make XSD very useful to me.  I imagine it's
> possible but I am not sure
>
> Here is a sample for RSS RDF

It is definitely possible if you can come up with an XML Schema
definition for your RSS RDF. Looking at the instance below it looks
very similar to an RSS instance with RDF extensions. There is an
XML Schema for RSS 2.0 available:

http://www.thearchitect.co.uk/schemas/

hth,
-boris

> <?xml version="1.0" encoding="utf-8"?>
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>  xmlns:dc="http://purl.org/dc/elements/1.1/"
>  xmlns:rss="http://purl.org/rss/1.0/"
>  xmlns="http://purl.org/rss/1.0/">
> <channel rdf:about="http://dig.csail.mit.edu/breadcrumbs/blog/4">
>  <title>timbl's blog</title>
>  <link>http://dig.csail.mit.edu/breadcrumbs/blog/4</link>
>  <description></description>
>  <items>
>   <rdf:Seq>
>   <rdf:li rdf:resource="http://dig.csail.mit.edu/breadcrumbs/node/72"/>
>
>   <rdf:li rdf:resource="http://dig.csail.mit.edu/breadcrumbs/node/71"/>
>   <rdf:li rdf:resource="http://dig.csail.mit.edu/breadcrumbs/node/62"/>
>   <rdf:li rdf:resource="http://dig.csail.mit.edu/breadcrumbs/node/54"/>
>   <rdf:li rdf:resource="http://dig.csail.mit.edu/breadcrumbs/node/38"/>
>   </rdf:Seq>
>  </items>
> </channel>
> <item rdf:about="http://dig.csail.mit.edu/breadcrumbs/node/72">
>  <title>Backward and Forward links in RDF just as important</title>
>
>  <link>http://dig.csail.mit.edu/breadcrumbs/node/72</link>
>  <description>&lt;p&gt;&lt;em&gt;&lt;a
> href="http://www.ctaz.com/~dmn1/hein.htm"&gt;Piet Hein&lt;/a&gt;, I
> think, &lt;a href="http://chat.carleton.ca/~tcstewar/grooks/grooks.html"&gt;Grooked&lt;/a&gt;
> that,&lt;/p&gt;
>
> &lt;p&gt;"Two types that had far better leave to their betters&lt;br /&gt;
> the civilized art of exchanging letters&lt;br /&gt;
> are those who disdain to make any response,&lt;br /&gt;
> and those who infallibly answer at once!"&lt;/p&gt;
> &lt;p&gt;The regularity of this blog fails on both counts.&lt;/em&gt;&lt;/p&gt;
>
> &lt;p&gt;One meme of RDF ethos is that the direction one choses for a
> given property is arbitrary: it doesn't matter whether one defines
> "parent" or "child"; "employee" or "employer". This philosophy (from
> the Enquire design of 1980) is that one should not favor one way over
> another.  One day, you may be interested in following the link one
> way, another day, or somene else, the other way. &lt;/p&gt;
> &lt;p&gt;On the other hand, also one should not encourage people
> having to declare both a property and its inverse, which would simply
> double the number of definitions out there, and give one more axis of
> arbitrary variation in the way information is expressed. Therefore,
> the design of the tabulator was is to make the system treat forward
> and backward links equivalently.&lt;/p&gt;
> &lt;p&gt;The design of &lt;a
> href="http://www.w3.org/DesignIssues/Notation3"&gt;N3&lt;/a&gt; also
> was influenced by this.  The ability to write&lt;/p&gt;
>
> &lt;p&gt;:Joe is f:parent of :Fred.&lt;/p&gt;
> &lt;p&gt;makes it easier to write (or generate) N3 without having to
> use f:child.  This in turn reduces the pressure to define
> both.&lt;/p&gt;
> &lt;p&gt;The only loss in not having both is that there is no label
> for the reverse link. (In same cases I have defined an unnamed
> predicate which is delcared as the inverse and has a label.)&lt;/p&gt;
> </description>
>  <dc:date>2006-01-25T16:21:17Z</dc:date>
> </item>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060131/4868bef3/attachment.pgp


More information about the xsd-users mailing list