Warning: This tool or project is no longer maintained and kept available only for archival purposes. Since GoodRelations and schema.org have evolved significantly in the past years, the current status available on this page is unlikely to function as expected. We take no responsibility for any damage caused by the use of this outdated work, to the extent legally possible.

Due to a lack of resources, we are unable to provide support for this project outside of consulting projects or sponsored research. Please contact us if you can contribute resources to update and enhance these resources.

GoodRelations - The Web Vocabulary for E-Commerce

This is the archive of the goodrelations dicussion list

GoodRelations is a standardized vocabulary for product, price, and company data that can (1) be embedded into existing static and dynamic Web pages and that (2) can be processed by other computers. This increases the visibility of your products and services in the latest generation of search engines, recommender systems, and other novel applications.

[goodrelations] <base> and relative URIs

Martin Hepp martin.hepp at ebusiness-unibw.org
Thu Jun 23 15:40:37 CEST 2011

Dear all:

I just found out that some sites use the <base> element in shop pages for defining the base URI for relative references (e.g. "#offer").

Be careful when using <base> in combination with RDFa, because you may spoil the identifiers of your data objects:

For instance, 

   <base href="http://www.myshop.com/info" />

means that 

<a href="/payment/">Payment Options</a>

will link to 


This is often the intended effect.

Unfortunately, it will also mean that an RDFa element with a relative identifier, e.g.

<div typeof="gr:Offering" about="#offer">

will get the global URI


Now, since you usually have many different offers they will all get the same URI, which renders your data useless.

So if you want to use <base> with RDFa, then you must choose one of the following approaches:

1. Take the true ("canonical") URI of the individual page as the base URI, e.g.

    <base href="http://www.myshop.com/products/camera1234" />


2. Use full URIs for all "about" properties, e.g.

    <div typeof="gr:Offering" about="http://www.myshop.com/products/camera1234#offer">

If you send the "deep" URI of the actual page to the template engine as a parameter anyway, you could also write

    <div typeof="gr:Offering" about="{{pageURI}}#offer">

or similar. The exact syntax will depend on your templating engine, of course.

Best wishes

Martin Hepp

More information about the goodrelations mailing list