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.

OSLC Core Specification:
Atom XML Representation examples

In this section we provide Atom format representations of the resources defined in the RDF/XML examples. These example representations following the Atom format representation guidance offered in OSLC Core Specification Appendix B.

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: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_blog="http://open-services.net/ns/bogus/blogs#">

   <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: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_blog="http://open-services.net/ns/bogus/blogs#">

         <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.

Click HERE to see Atom Syndication Format validation.

<feed 
     xmlns="http://www.w3.org/2005/Atom"
     xmlns:oslc_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://xmlns.com/foaf/0.1/"
     xmlns:oslc="http://open-services.net/ns/core#">

<id>http://example.com/query?page=2&amp;oslc...</id>
<title>Blog Query Results for term [remote]</title>
<updated>2009-10-10T12:00:00-05:00</updated>
<author><name>OSLC Example Query Implementation</name></author>

<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> 
   <id>http://example.com/blogs/comment/1</id>
   <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> 
   <id>http://example.com/blogs/comment/5</id>
   <title>Blog Query Result for term [remote]</title>
   <updated>2009-10-10T12:00:00-04:45</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> 
   <id>http://example.com/blogs/comment/4</id>
   <title>Blog Query Result for term [remote]</title>
   <updated>2009-10-10T12:00:00-04:30</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> 
   <id>http://example.com/blogs/comment/3</id>
   <title>Blog Query Result for term [remote]</title>
   <updated>2009-10-10T12:00:00-04:15</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> 
   <id>http://example.com/blogs/comment/2</id>
   <title>Blog Query Result for term [remote]</title>
   <updated>2009-10-10T12:00:00-04:05</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>
Topic attachments
I Attachment Action Size DateSorted ascending Who Comment
xmlxml atom-core-example.xml manage 2.8 K 22 Nov 2010 - 21:11 DaveJohnson  
Topic revision: r5 - 22 Nov 2010 - 21:32:34 - DaveJohnson
Main.OSLCCoreSpecAtomExamples moved from Main.OSLCCoreSpecAppendixE on 22 Oct 2010 - 18:35 by DaveJohnson - put it back
 
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