An Introduction to ROR (Resources of a Resource)*** What is ROR? ROR (Resources of a Resource) is an XML format for describing content, objects, and structure of websites in a generic fashion so search engines and other web applications can find and understand information more easily.
For example if your website is selling products, ROR enables you to document your product names, descriptions, prices, images, availability, affiliate programs, 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, audio, links, reviews, privacy policy, copyrights, and more.
*** ROR File ROR information can be easily added to your website by adding a ROR File called ror.xml. ROR is actually quite simple. It is built on top of RDF, W3 Resource Description Language (http://www.w3.org/RDF). If you are not familiar with RDF, don't worry, I won't go into any details here.
With ROR, all objects are represented by a <Resource>
tag, and can optionally have a <type>
property to determine type (or class) of object (e.g. Product
, Article
, Event
, etc). The other properties are typically determined by type you choose. Here is a simple example of a product described by ROR:
<Resource> <type>Product</type> <title>My Product</title> <desc>My great new product</desc> <url>http://www.my-web-site.com/my-product.htm</url> <price>19.95</price> <currency>USD</currency> </Resource>
Pretty simple, isn't it? And if you want to describe other objects, ROR provides other types like Contact, Article, Feed, Event, etc. You can find current list of object and their properties in ROR Specification at http://www.rorweb.com/spec.htm. Now let's see how to assemble several objects together in a ROR file. In a ROR file meaning of information is determined by both objects and relationship between them. Depending how an object is linked to another object, it will provide a different meaning. To link two objects together property <resourceOf>
is used. Here is an example:
<Resource rdf:about="object-1"> <title>Object 1</title> ... </Resource>
<Resource> <title>Object 2</title> ... <resourceOf rdf:resource="object-1" /> </Resource>
<Resource> <title>Object 3</title> ... <resourceOf rdf:resource="object-1" /> </Resource>
The first object uses rdf:about
attribute to identify itself so it can be referenced elsewhere. The <resourceOf>
property is then used to attach second and third objects to first. Attaching two objects to first one is a way to say that they contain information that relates to or further describes that object. That's pretty much it! Now that you know essential about ROR, let's create a simple ROR file. Again I won't go into details of RDF, but let's just say this; since ROR is built on top of RDF, it is enclosed in <rdf:RDF>
tag. Notice that first object in this file has a type property set to Main
. This designates it as entry point into data structure of ROR file.
<?xml version="1.0" ?> <rdf:RDF xmlns="http://rorweb.com/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">