This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Appendix E: Atom XML Representation examples

In this section we present example Atom format representations of the example resources defined in Appendix A.

Resource

Below is an example Atom entry representation of the example blog entry.

<entry>
   <id>http://example.com/blogs/entry/1</id>
   <title>I love trash</title>
   <author><name>Oscar T. Grouch</name></author>
   <content type="application/rdf+xml>

      <rdf:RDF
         xmlns:oslc_blog="http://open-services.net/ns/bogus/blogs#" 
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
         xmlns:dcterms="http://purl.org/dc/terms/">
         <oslc_blog:Entry
         rdf:about="http://example.com/blogs/entry/1">
         <rdf:type 
            rdf:resource="http://open-services.net/ns/bogus/blogs#Entry" />
         <dcterms:title>I love trash</dcterms:title>
         <dcterms:modified>2002-10-10T12:00:00-05:00</dcterms:modified>
         <dcterms:content>
            Anything dirty or dingy or dusty. 
            Anything ragged or rotten or rusty.
         </dcterms:content>
         <dcterms:creator>
            <foaf:Person>
                <foaf:name>Oscar T. Grouch</foaf:name>
            </foaf:Person>
         </dcterms:creator>
      </oslc_blog:Entry>
      </rdf:RDF> 

   </content>
</entry>

Below is an example Atom entry representation of the example blog comment.

<entry>
   <id>http://example.com/comments/1</id>
   <title>Blog Comment</title>
   <author><name>William B. Bird</name></author>
   <content type="application/rdf+xml>

      <rdf:RDF
         xmlns:oslc_blog="http://open-services.net/ns/bogus/blogs#" 
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
         xmlns:dcterms="http://purl.org/dc/terms/" >
      <oslc_blog:Comment 
         rdf:about="http://example.com/comments/1">
         <oslc_blog:entry rdf:resource="http://example.com/blogs/entry/1" />
         <dcterms:content>LOL! Tell us how you really feel, Oscar.</dcterms:content>
         <dcterms:modified>2002-10-10T12:12:23-05:00</dcterms:modified>
         <dcterms:creator>
            <foaf:Person>
               <foaf:name>William B. Bird</foaf:name>
            </foaf:Person>
         </dcterms:creator>
      </oslc_blog:Comment>
      </rdf:RDF>

   </content>
</entry>

Query Resource

Below is an example Atom feed representation of the example blog query result.

<feed 
     xmlns:blog="http://open-services.net/ns/bogus#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
     xmlns:oslc="http://open-services.net/ns/core#>

<id>http://example.com/query?page=2&oslc.from [...] 1&gt;</id>
<title>Blog Query Results for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>

<link rel="self" 
   href="http://example.com/query?oslc.from [...] entry/1>"> 
<link rel="next" 
   href="http://example.com/query?page=2&amp;oslc.from [...] entry/1>">

<entry> 
   <title>Blog Query Result for term [remote]<title>
   <updated>2009-10-10T12:00:00-05:00</updated>
   <content type="application/rdf+xml"> 
      <rdf:RDF>
      <oslc_blog:BlogComment rdf:about="http://example.com/query">
         <oslc_blog:comment rdf:resource="http://example.com/blogs/comment/1" />
      </oslc_blog:BlogComment>
      </rdf:RDF>
   </content>
</entry>

<entry> 
   <title>Blog Query Result for term [remote]<title>
   <updated>2009-10-10T12:00:00-05:00</updated>
   <content type="application/rdf+xml"> 
      <rdf:RDF>
      <oslc_blog:BlogComment rdf:about="http://example.com/query">
         <oslc_blog:comment rdf:resource="http://example.com/blogs/comment/5" />
      </oslc_blog:BlogComment>
      </rdf:RDF>
   </content>
</entry>

<entry> 
   <title>Blog Query Result for term [remote]<title>
   <updated>2009-10-10T12:00:00-05:00</updated>
   <content type="application/rdf+xml"> 
      <rdf:RDF>
      <oslc_blog:BlogComment rdf:about="http://example.com/query">
         <oslc_blog:comment rdf:resource="http://example.com/blogs/comment/4" />
      </oslc_blog:BlogComment>
      </rdf:RDF>
   </content>
</entry>

<entry> 
   <title>Blog Query Result for term [remote]<title>
   <updated>2009-10-10T12:00:00-05:00</updated>
   <content type="application/rdf+xml"> 
      <rdf:RDF>
      <oslc_blog:BlogComment rdf:about="http://example.com/query">
         <oslc_blog:comment rdf:resource="http://example.com/blogs/comment/3" />
      </oslc_blog:BlogComment>
      </rdf:RDF>
   </content>
</entry>

<entry> 
   <title>Blog Query Result for term [remote]<title>
   <updated>2009-10-10T12:00:00-05:00</updated>
   <content type="application/rdf+xml"> 
      <rdf:RDF>
      <oslc_blog:BlogComment rdf:about="http://example.com/query">
         <oslc_blog:comment rdf:resource="http://example.com/blogs/comment/2" />
      </oslc_blog:BlogComment>
      </rdf:RDF>
   </content> 
</entry>

</feed>
Edit | Attach | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 14 Jul 2010 - 16:25:48 - ScottBosworth
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback