ROR
(Resources of a Resource)
Main
| How to Create a ROR feed
How to Create a ROR feed (RDF
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.
The following explains how to create a ROR feed based on the RDF 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.
In the ROR format, objects are always represented with the <Resource>
tag. Each object can optionally have a <type>
attribute to specify the type of the object (e.g. product, service,
image, review, etc). The ror.xml feed should always
contain one object of type "Main". This is used to identify
the main object of the feed, which generally represents the website
itself.
When using several ROR feeds, the <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, maybe
compressed, ROR feed for your sitemap (e.g. sitemap.gz). Here is how
your ror.xml feed would look like:
<?xml
version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://rorweb.com/0.1/"
>
<!-- ****** General Info ****** -->
<Resource>
<type>Main</type>
<title>Title of Website or Resource</title>
<url>http://www.acme.com</url>
<desc>Description of Website or Resource</desc>
<keywords>keyword1, keyword2, keyword3</keywords>
<image>http://www.acme.com/logo.gif</image>
<updated>2005-11-02</updated>
<updatePeriod>day</updatePeriod>
</Resource>
<!-- ****** Products (in a separate
ROR feed) ****** -->
<Resource>
<type>Product</type>
<seeAlso rdf:resource="http://www.acme.com/products.xml"
/>
</Resource>
<!-- ****** Sitemap (in a separate
feeds) ****** -->
<Resource>
<type>SiteMap</type>
<seeAlso rdf:resource="http://www.acme.com/sitemap.xml"
/>
</Resource>
</rdf:RDF> |
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 <Resource>
tag, and the <type>
attribute specifies the type of each object.
We set the <type>
attribute to "Product", and we include attributes that come
with that type: <price>,
<currency>, <available>.
The other attributes are standard attributes, they can be used with
any object type.
<?xml
version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://rorweb.com/0.1/">
<!-- First Product -->
<Resource>
<type>Product</type>
<title>Name or Title of Product One</title>
<url>http://www.acme.com/product_one.htm</url>
<desc>Description of Product One</desc>
<image>http://www.acme.com/product_one.gif</image>
<price>12.95</price>
<currency>USD</currency>
<available>yes</available>
</Resource>
<!-- Second Product -->
<Resource>
<type>Product</type>
<title>Name or Title of Product Two</title>
<url>http://www.acme.com/product_two.htm</url>
<desc>Description of Product Two</desc>
<image>http://www.acme.com/product_two.gif</image>
<price>19.95</price>
<currency>USD</currency>
<available>yes</available>
</Resource>
</rdf:RDF> |
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/rdf+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 attributes). 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) ****** -->
<Resource>
<type>Foo</type>
<seeAlso rdf:resource="http://www.acme.com/foos.xml"
/>
</Resource> |
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 <RDF> tag:
<?xml
version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rox="http://rorweb.com/x/0.1/"
xmlns="http://rorweb.com/0.1/">
<!-- First Foo -->
<Resource>
<type>Foo</type>
<title>Name or Title of Foo One</title>
<url>http://www.acme.com/foo_one.htm</url>
<image>http://www.acme.com/foo_one.gif</image>
<rox:bar1>bar1-value</rox:bar1>
<rox:bar2>bar2-value</rox:bar2>
</Resource>
<!-- Second Foo -->
<Resource>
<type>Foo</type>
<title>Name or Title of Foo Two</title>
<url>http://www.acme.com/foo_two.htm</url>
<image>http://www.acme.com/foo_two.gif</image>
<rox:bar1>other-bar1-value</rox:bar1>
<rox:bar2>other-bar2-value</rox:bar2>
</Resource>
</rdf:RDF> |
|