ROR (Resources of a Resource)

Main  |  How to Create a ROR feed



How to Create a ROR feed (RSS format)


What is ROR?

ROR (Resources of a Resource) is an XML format for describing the content, objects, and structure of websites in a generic fashion so any search engine can better find and understand your site information.

For example if your website is selling products, ROR enables you to document your product names, descriptions, prices, images, availability, etc. Or if your site or blog provides information on a given topic, it allows you to describe how this information is organized (sitemap, topics, categories, new information, archive, blogroll, etc). ROR also provides terms for documenting objects such as contacts, articles, newsletters, feeds, images, reviews, services and more.

Since the ROR vocabulary can be combined with other vocabulary, it can be used in a RSS feed. The following explains how to create a ROR feed based on the RSS 2.0 format for describing the content of your website to search engines.


Step 1: Create the Main ROR feed (ror.xml)

The main ROR feed (called ror.xml) is the entry point to your ROR information. This is how search engines will find your ROR information. They will look for your main ROR feed using this scheme:

http://www.your-domain-name.com/ror.xml

If your website is small, you can simply put all your ROR information into that feed. If you have a larger website or have a lot of content, you might want to split the information into several ROR feeds. Putting the information in different feeds will make it easier to maintain them.

When combined with RSS, ROR objects are represented with the <item> tag. Each object can optionally have a <ror:type> attribute to specify the type of the object (e.g. product, service, image, review, etc). Note, all ROR attributes must be prefixed with the letters ror and a column character. The RSS attributes (e.g. title, link, description) stay the same.

When using several ROR feeds, the <ror:seeAlso> attribute can be used in the ror.xml feed to indicate the location of the other feeds. For example, you can use one ROR feed for describing your products (e.g. products.xml) and one ROR feed for your sitemap (e.g. sitemap.xml). Here is how your ror.xml feed would look like:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:ror="http://rorweb.com/0.1/">
<channel>
   <title>Title of Website or Resource</title>  
   <link>http://www.acme.com</link>

   <!-- **************** General Info **************** -->
   <item>
      <title>Title of Website or Resource</title>  
      <link>http://www.acme.com</link>
      <description>Description of Site or Resource</description>
      <ror:type>Main</ror:type>
      <ror:keywords>keyword1, keyword2, keyword3</ror:keywords>
      <ror:image>http://www.acme.com/logo.gif</ror:image>
      <ror:updated>2005-11-02</ror:updated>
      <ror:updatePeriod>day</ror:updatePeriod>
   </item>

   
<!-- ****** Products (in a separate ROR feed) ****** -->

   <item>
      <title>Products</title>
      <ror:type>Product</ror:type>
      <ror:seeAlso>http://www.acme.com/products.xml</ror:seeAlso>
   </item>

   <!-- ****** Sitemap (in a separate feeds) ****** -->
   <item>
      <title>Sitemap</title>
      <ror:type>SiteMap</ror:type>
      <ror:seeAlso>http://www.acme.com/sitemap.xml</ror:seeAlso>
   </item>

</channel>
</rss>

Pretty simple, isn't it? Now let's see how to create these other ROR feeds


Step 2: Create Additional ROR feeds (optional)
If you have a larger website, you can now create your other ROR feeds. Here is an example of a product ROR feed. Here too, all objects are represented with a <item> tag, and the <ror:type> attribute specifies the type of each object.

We set the <ror:type> attribute to "Product", and we include attributes that come with that type: <ror:price>, <ror:currency>, <ror:available>. The other attributes (like <ror:image>) are standard attributes, they can be used with any object type.

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:ror="http://rorweb.com/0.1/">
<channel>
   <title>Products</title>
   <link>http://www.acme.com/products.htm</link>

   <!-- First Product -->
   <item>
      <title>Name or Title of Product One</title>
      <link>http://www.acme.com/product_one.htm</link>
      <description>Description of Product One</description>
      <ror:image>http://www.acme.com/product_one.gif</ror:image>
      <ror:type>Product</ror:type>
      
<ror:price>12.95</ror:price>
      <ror:currency>USD</ror:currency>
      <ror:available>yes</ror:available>
   </item>
   
   <!-- Second Product -->
   <item>
      <title>Name or Title of Product Two</title>
      <link>http://www.acme.com/product_two.htm</link>
      <description>Description of Product Two</description>
      <ror:image>http://www.acme.com/product_two.gif</ror:image>
      <ror:type>Product</ror:type>

      
<ror:price>19.95</ror:price>
      <ror:currency>USD</ror:currency>
      <ror:available>yes</ror:available>
   </item>

</channel>
</rss>


That's it! If you want to describe other objects, ROR provides other types like service, article, feed, event, review, person, etc. You can find the current list of object and their attributes in the ROR Specification at http://www.rorweb.com/spec.htm.


Step 3: Upload
When your are done creating your ROR feed (or ROR feeds). All you need to do is add them to your website. To do that, upload them with your favorite FTP software, just like you upload web pages. The main ROR feed (ror.xml) should be uploaded into you top (or main) folder or directory. Ask your administrator if you are not sure.

If you want to add your main ROR feed somewhere else, you can do that by adding a link tag in the <head> tag of your main page:

<link rel="alternate" type="application/rss+xml"
 title="ROR" href="http://www.acme.com/folder/feed.xml" />


Extra: Extending ROR
(advanced - optional)
To make it easy to use, ROR provides a set of pre-defined object types, as mentioned before (e.g. Product, Services, Articles, Feeds, Events, Reviews, etc). But ROR is designed with simplicity and flexibility in mind, you can add your own types.

Let's say you are a collector of Foos (Foo is a made-up type). And let's say that Foos typically have the following attributes: bar1, and bar2 (two made-up attribuates). So, to describe your Foo collection, you can create a file, for example foos.xml, add these lines in your main ROR feed ror.xml:

<!-- ****** Foos (in a separate ROR feed) ****** -->
<item>
   <ror:type>Foo</ror:type>
   <ror:seeAlso>http://www.acme.com/foos.xml</ror:seeAlso>
</item>

Then you can create your foos.xml ROR feed. Note the lines in bold; your new attributes need to be prefixed with the letters rox (for ror extension) and a column character; you will also need to add a line in the <rss> tag:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
     xmlns:rox="http://rorweb.com/x/0.1/"      xmlns:ror="http://rorweb.com/0.1/">
<channel>
   <title>Foo Collection</title>
   <link>http://www.acme.com/foos</link>

   <!-- First Foo -->
   <item>
      <title>Name or Title of Foo One</title>
      <link>http://www.acme.com/foo_one.htm</link>
      <ror:image>http://www.acme.com/foo_one.gif</ror:image>
      <ror:type>Foo</ror:type>
      <rox:bar1>bar1-value</rox:bar1>
      <rox:bar2>bar2-value</rox:bar2>
   </item>

   <!-- Second Foo -->
   <item>
      <title>Name or Title of Foo Two</title>
      <link>http://www.acme.com/foo_two.htm</link>
      <ror:image>http://www.acme.com/foo_two.gif</ror:image>
      <ror:type>Foo</ror:type>
      <rox:bar1>other-bar1-value</rox:bar1>
      <rox:bar2>other-bar2-value</rox:bar2>
   </item>

</channel>
</rss>




Copyright © 2004-2005 Rorweb.com