GoodRelations Recipe 7

GoodRelations Recipe # 7:

A Round-tripping Example of Deriving GoodRelations Data from A Merchant's XML Catalog File

Martin Hepp,


Input Data and Issues

XML data file with no DTD

Some fields empty

Encoding unclear


Base URI and ID Scheme

Validityof Offerings and Prices

GoodRelations Patterns



Products incl. foaf:page to merchant
Offering, Warranty and Price Specification incl. foaf:page to merchant

Python Conversion Tool



Data Delivery Methods and Publication

Ping the Semantic Web

Indexing Services etc.


Full process:

a) XML

b) Python

c) DataRSS / Publication

Once you have generated GoodRelations-compliant data for your offerings, you should publish the data on the Web. That is fairly simple:

1. Save the file under the filename e.g.

in the root directory of your Web server so that it becomes available as

2. Add a link element pointing to this file to the header of your main Web page (or other pages, too):

<p>Miller Inc. Homepage</p>



3. Notify Semantic Web search engines and crawlers of your data

To do so, simply paste the URI

into the respective fields of the following submission pages:


We are working on additional services for making your data known, including submission to Yahoo SearchMonkey and SWSE.

4. Extended Server Configuration
You can improve Web access to your Semantic Web data by fine-tuning your server configuration. At least, you should configure your Web server so that a http request to

returns either always

or does content-negotiation, i.e., it decides depending on the requested media type and serves for rdf/xml
and or another html-document for html/xhtml or other media types.

You can improve Web access to your Semantic Web data by fine-tuning your server configuration. We will provide more information on the GoodRelations Wiki (

In the meantime, we recommend the following document:

Cool URIs for the Semantic Web, W3C Interest Group Note 03 December 2008