AtomJobExample

From W3C Wiki

Here is an example of an extended RSS feed, originally by DanBri and Libby in ~2000 w.r.t. querying extended RSS1 data.

This is an experiment in extended Atom/Echo syntax, based on DanBri and MaxF's SpotOfDrama work to use an RDF syntax based on the SOAP Encoding and its Data Model.

When this is done, the following link should return RDF/XML successfully. It probably doesn't right now...

First we show it in RSS1:

<?xml version="1.0" encoding="ISO-8859-2"?>
<rdf:RDF 
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:wn="http://xmlns.com/wordnet/1.6/"
	 xmlns:job="http://ilrt.org/discovery/2000/11/rss-query/jobvocab.rdf#">

          <channel rdf:about="http://ilrt.org/discovery/2000/11/rss-query/jobs-rss.rdf">
            <title>A hypothetical job listings channel</title>
            <link>http://ilrt.org/discovery/2000/11/rss-query/</link>
            <description>
		This example shows RSS used as a lightweight data transport mechanism
            </description>
            <image rdf:resource="http://ilrt.org/discovery/2000/11/rss-query/joblogo.gif"/>
            <items>
              <rdf:Seq>
                <rdf:li resource="http://example.com/job1.html" />
                <rdf:li resource="http://example.com/job2.html" />
              </rdf:Seq>
            </items>

          </channel>
          
          <image rdf:about="http://ilrt.org/discovery/2000/11/rss-query/joblogo.gif">
            <title>RSS Job listing demo</title>
            <link>http://ilrt.org/discovery/2000/11/rss-query/</link>
            <url>http://ilrt.org/discovery/2000/11/rss-query/joblogo.gif</url>
          </image>
          
          <item rdf:about="http://example.com/job1.html">
            <title>The title of job1 goes here</title>
            <link>http://example.com/job1.html</link>
            <description>
		(Job1-Job1-Job1...) A simple textual description of the
		job (ie. abstract of the job advert we reference) goes here.
            </description>
          
            <job:advertises>         
                 <wn:Job job:title="Job title for job1 goes here"
			 job:salary="100000"
			 job:currency="USD"
			 >
			<job:orgHomepage rdf:resource="http://www.ukoln.ac.uk/"/>
                  </wn:Job>
             </job:advertises>

          </item>

          <item rdf:about="http://example.com/job2.html">
            <title>The title of job1 goes here</title>
            <link>http://example.com/job2.html</link>
            <description>
		(Job2-Job2-Job2...) A simple textual description of the
		job (ie. abstract of the job advert we reference) goes here.
            </description>

            <job:advertises>         
                 <wn:Job job:title="Job title for job2 goes here"
			 job:salary="150000"
			 job:currency="UKP"
			 >
			<job:orgHomepage rdf:resource="http://ilrt.org/"/>
                  </wn:Job>
             </job:advertises>
          </item>
</rdf:RDF>


Now let's try that again in an Atom-meets-RSS1-esque form using SOAP markup. This un-stripes the data:

Basically we start w/ the RSS1 and tidy it up a bit.

(note that we lose the rdf:Seq; we'll come back to the representation of ordering and arrays later)

soap-job-eg.xml (copy below may need updating; wip)

<?xml version="1.0"?> 
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" 
	xmlns:r1="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:wn="http://xmlns.com/wordnet/1.6/"
	 xmlns:job="http://ilrt.org/discovery/2000/11/rss-query/jobvocab.rdf#"> 
  <env:Body> 
    <feed  xsi:type="r1:Channel" xmlns="http://purl.org/atom/ns#" env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
        <title>A hypothetical job listings channel</title>
        <link xsi:type="xsd:anyURI">http://ilrt.org/discovery/2000/11/rss-query/</link>
         <description>This example shows RSS used as a lightweight data transport mechanism</description>
         <image>
            <title>RSS Job listing demo</title>
            <link xsi:type="xsd:anyURI">http://ilrt.org/discovery/2000/11/rss-query/</link>
            <url xsi:type="xsd:anyURI">http://ilrt.org/discovery/2000/11/rss-query/joblogo.gif</url>
         </image>
    </feed>
    <items> <!-- hmm how does soapenc do an array? --
       <item>
         <link xsi:type="xsd:anyURI">http://example.com/job1.html</link>
         <title>The title of the page about job1 goes here</title>
         <description>Some text describing a page about job1 here.</description>
         <job:advertises xsi:type="wn:Job">         
           <job:title>Job title for job1 goes here</job:title>
           <job:salary>100000</job:salary>
           <job:currency>USD</job:currency> 
           <job:orgHomepage xsi:type="xsd:anyURI">http://www.ukoln.ac.uk/</job:orgHomepage>
          </job:advertises>
        </item>
        <item>
          <link xsi:type="xsd:anyURI">http://example.com/job2.html</link>
          <title>Permanent Secretary for Job2ish Stuff</title>
          <description>All you never wanted to know about job2.</description>
          <job:advertises xsi:type="wn:Job">         
            <job:title>Job title for job 2 here</job:title>
	    <job:salary>150000</job:salary>
	    <job:currency>UKP</job:currency>
	    <job:orgHomepage xsi:type="xsd:anyURI">http://ilrt.org/</job:orgHomepage>
          </job:advertises>
        </item>
      </items> 
    </feed>
  </env:Body>
</env:Envelope>


This is pretty rough, probably won't parse yet. --danbri

See also: AtomRdf