GoodRelations4ShopSoftware

From Wiki of the E-Business and Web Science Research Group
Jump to: navigation, search
gr_banner_small.png
GoodRelations is a standardized vocabulary for product, price, and company data that can be embedded into existing static and dynamic Web pages.

Project Main Page
Vocabulary
Documentation
Developer's Wiki
GoodRelations Cookbook

This page is  stub; it will contain a recipe for adding GoodRelations rich meta-data to your shop software.

Recipe

Company Page

HTML/RDFa Template for Snippet

<xml>

 
   
   
   
     
       
       
       
       
     
   
   
   
   

{% if duns %}

   

{% endif %} {% if gln %}

   

{% endif %} {% if isic %}

   

{% endif %} {% if naics %}

   

{% endif %}

  

</xml>

RDFa Example for Snippet

<xml>

 
   
   
   
     
       
       
       
       
     
   
   
   
   
   
   
   
   
  

</xml>

Product Item Page: Minimal

HTML/RDFa Template for Snippet

<xml>

 
   
   

{% if ean %} {% endif %}

   
   
   
   
     
       
       

     
   
   
   

{% for delivery_option in delivery_options %} {% endfor %} {% for payment_method in payment_methods %} {% endfor %}

   
 

</xml>

RDFa Example for Snippet

<xml>

 
   
   
   
   
   
   
   
     
       
       

     
   
   
   
   
       
   
 

</xml>


Product Item Page: Full

HTML/RDFa Template for Snippet

<xml>

 
   
   
   
   
   
   
     
       
       

     
   

{% for delivery_option in delivery_options %}

   
     
       
       
   	
   	

     
   

{% endfor %}

   
   

{% for delivery_option in delivery_options %}

   

{% endfor %} {% for payment_method in payment_methods %}

   

{% endfor %}

   
 
 
   
   
   
   

{% if ean %}

   

{% endif %} {% if gtin14 %}

   

{% endif %} {% if sku %}

   

{% endif %} {% if manufacturer_uri %} {% endif %} {% for consumable_uri in consumable_uris %}

   

{% endfor %} {% for accessory_uri in accessory_uris %}

   

{% endfor %}

   
   
     
       
       
     
   
 

</xml>

RDFa Example for Snippet

<xml>

 
   
   
   
   
   
   
     
       
       

     
   
   
     
       
       
   	
   	

     
   
   
   
   
   
   
   
 
 
   
   
   
   
   
   
   
   
   
   
   
   
     
       
       
     
   
 

</xml>


Brands Page

HTML/RDFa Template for Snippet

<xml>

{% for brand in brands %}

 
   
   
   
   
   
  

{% endfor %}

</xml>

RDFa Example for Snippet

<xml>

 
   
   
   
   
   
  
 
   
   
   
   
   
  

</xml>


RDF/XML Data Dump

Template

<xml> <?xml version="1.0" encoding="utf-8"?> <rdf:RDF

 xmlns:foaf="http://xmlns.com/foaf/0.1/"
 xmlns:gr="http://purl.org/goodrelations/v1#"
 xmlns:media="http://search.yahoo.com/searchmonkey/media/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
 xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#"
 xmlns:xml="http://www.w3.org/XML/1998/namespace"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
 xmlns:product="http://search.yahoo.com/searchmonkey/product/"

>

 <gr:BusinessEntity rdf:about="Template:Company page#company">
   <gr:legalName>Template:Company data.company name</gr:legalName>
   <vcard:fn>Template:Company data.company name</vcard:fn>
   <foaf:page rdf:resource="Template:Company page"/>
   <vcard:url rdf:resource="Template:Company page"/>
   <foaf:page rdf:resource="Template:Company page"/>
   <vcard:adr>
     <vcard:Address>
       <vcard:locality xml:lang="Template:Company data.language">Template:Company data.city</vcard:locality>
       <vcard:postal-code>Template:Company data.zip</vcard:postal-code>
       <vcard:country-name xml:lang="Template:Company data.language">Template:Company data.country</vcard:country-name>
       <vcard:street-address>Template:Company data.street</vcard:street-address>
     </vcard:Address>
   </vcard:adr>
   <vcard:tel>Template:Company data.phone</vcard:tel>
   <foaf:depiction rdf:resource="Template:Company data.logo uri"/>
   <media:image rdf:resource="Template:Company data.logo uri"/>

{% if company_data.duns %}

   <gr:hasDUNS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Company data.duns</gr:hasDUNS>

{% endif %} {% if company_data.isic %}

   <gr:hasISICv4 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Company data.isic</gr:hasISICv4>

{% endif %} {% if company_data.naics %}

   <gr:hasNAICS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Company data.naics</gr:hasNAICS>

{% endif %} {% if company_data.gln %}

   <gr:hasGlobalLocationNumber rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Company data.gln</gr:hasGlobalLocationNumber>

{% endif %}

 </gr:BusinessEntity>


{% for product in product_data %} <rdf:Description rdf:about="Template:Company page#company"> <gr:offers rdf:resource="Template:Product.product uri#offering"/> </rdf:Description>

     <gr:Offering rdf:about="Template:Product.product uri#offering">
       <rdfs:label xml:lang="en">Template:Product.product short</rdfs:label>
       <rdfs:comment xml:lang="Template:Product.language">Template:Product.product long</rdfs:comment>
       <gr:hasBusinessFunction rdf:resource="Template:Product.business function"/>
       <gr:validFrom rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">Template:Product.valid from</gr:validFrom>
       <gr:validThrough rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">Template:Product.valid through</gr:validThrough>

<foaf:page rdf:resource="Template:Product.product uri"/>

<gr:hasPriceSpecification>

         <gr:UnitPriceSpecification>
           <gr:hasCurrency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Product.currency</gr:hasCurrency>
           <gr:valueAddedTaxIncluded rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">Template:Product.vat</gr:valueAddedTaxIncluded>
           <gr:hasCurrencyValue rdf:datatype="http://www.w3.org/2001/XMLSchema#float">Template:Product.price</gr:hasCurrencyValue>
         </gr:UnitPriceSpecification>
       </gr:hasPriceSpecification>

{% for delivery_option in product.delivery_options %}

       <gr:availableDeliveryMethods rdf:resource="Template:Delivery option.method uri"/>
       <gr:hasPriceSpecification>
         <gr:DeliveryChargeSpecification>
           <gr:eligibleRegions rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Delivery option.region</gr:eligibleRegions>
           <gr:hasCurrency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Delivery option.currency</gr:hasCurrency>
           <gr:valueAddedTaxIncluded rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">Template:Delivery option.vat</gr:valueAddedTaxIncluded>
           <gr:hasCurrencyValue rdf:datatype="http://www.w3.org/2001/XMLSchema#float">Template:Delivery option.charge</gr:hasCurrencyValue>
           <gr:appliesToDeliveryMethod rdf:resource="Template:Delivery option.method uri"/>
         </gr:DeliveryChargeSpecification>
       </gr:hasPriceSpecification>

{% endfor %} {% for payment_method in product.payment_methods %}

       <gr:acceptedPaymentMethods rdf:resource="Template:Payment method"/>

{% endfor %}

       <gr:includes>
         <gr:ProductOrServicesSomeInstancesPlaceholder rdf:about="Template:Product.product uri#product">

<foaf:page rdf:resource="Template:Product.product uri"/> <rdf:type rdf:resource="http://search.yahoo.com/searchmonkey/product/Product"/> <rdfs:label xml:lang="en">Template:Product.product short</rdfs:label>

           <rdfs:comment xml:lang="en">Template:Product.product long</rdfs:comment>

<foaf:depiction rdf:resource="Template:Product.product image uri"/>

           <media:image rdf:resource="Template:Product.product image uri"/>
           <rdfs:seeAlso rdf:resource="Template:Product.product image uri"/>
           <foaf:thumbnail rdf:resource="Template:Product.product thumbnail uri"/>
       	<gr:hasEAN_UCC-13>Template:Product.ean</gr:hasEAN_UCC-13>
           <gr:hasStockKeepingUnit>Template:Product.sku</gr:hasStockKeepingUnit>
           <gr:hasGTIN-14>Template:Product.gtin14</gr:hasGTIN-14>
           <gr:hasManufacturer rdf:resource="Template:Product.manufacturer uri"/>
           <gr:hasInventoryLevel>
             <gr:QuantitativeValueFloat>
               <gr:hasUnitOfMeasurement rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Template:Product.stock unit</gr:hasUnitOfMeasurement>
               <gr:hasMinValueFloat rdf:datatype="http://www.w3.org/2001/XMLSchema#float">Template:Product.stock level</gr:hasMinValueFloat>
             </gr:QuantitativeValueFloat>
           </gr:hasInventoryLevel>
         </gr:ProductOrServicesSomeInstancesPlaceholder>
       </gr:includes>
     </gr:Offering>

{% for consumable_uri in product.consumable_uris %}

 	<rdf:Description rdf:about="Template:Consumable uri">
   	<gr:isConsumableFor rdf:resource="Template:Product.product uri#product"/>
 	</rdf:Description>

{% endfor %} {% for accessory_uri in product.accessory_uris %}

 	<rdf:Description rdf:about="Template:Accessory uri">
   	<gr:isAccessoryOrSparePartFor rdf:resource="Template:Product.product uri#product"/>
 	</rdf:Description>

{% endfor %} {% endfor %}

{% for brand in brand_data.brands %}

 <gr:BusinessEntity rdf:about="Template:Brands page#Template:Brand.name">
   <foaf:page rdf:resource="Template:Brand.uri"/>
   <media:image rdf:resource="Template:Brand.logo uri"/>
   <foaf:page rdf:resource="Template:Brand.uri"/>
   <foaf:page rdf:resource="Template:Brands page"/>
   <foaf:depiction rdf:resource="Template:Brand.logo uri"/>
   <gr:legalName>Template:Brand.company name</gr:legalName>
   <vcard:url rdf:resource="http://www.ibm.com/"/>
   <vcard:fn>Template:Brand.company name</vcard:fn>
 </gr:BusinessEntity>

{% endfor %}

</rdf:RDF>

</xml>

Example

<xml> <?xml version="1.0" encoding="utf-8"?> <rdf:RDF

 xmlns:foaf="http://xmlns.com/foaf/0.1/"
 xmlns:gr="http://purl.org/goodrelations/v1#"
 xmlns:media="http://search.yahoo.com/searchmonkey/media/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
 xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#"
 xmlns:xml="http://www.w3.org/XML/1998/namespace"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
 xmlns:product="http://search.yahoo.com/searchmonkey/product/"

>

 <gr:BusinessEntity rdf:about="http:/www.heppnetz.de/gr4shops/index.html#company">
   <gr:legalName>Best Purchase Electronics Shop Ltd.</gr:legalName>
   <vcard:fn>Best Purchase Electronics Shop Ltd.</vcard:fn>
   <foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/index.html"/>
   <vcard:url rdf:resource="http:/www.heppnetz.de/gr4shops/index.html"/>
   <foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/index.html"/>
   <vcard:adr>
     <vcard:Address>
       <vcard:locality xml:lang="en">Munich</vcard:locality>
       <vcard:postal-code>12345</vcard:postal-code>
       <vcard:country-name xml:lang="en">Germany</vcard:country-name>
       <vcard:street-address>Example Street 123</vcard:street-address>
     </vcard:Address>
   </vcard:adr>
   <vcard:tel>+49-89-6004-4217</vcard:tel>
   <foaf:depiction rdf:resource="http:/www.heppnetz.de/gr4shops/logo.jpg"/>
   <media:image rdf:resource="http:/www.heppnetz.de/gr4shops/logo.jpg"/>
   <gr:hasDUNS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">012345678</gr:hasDUNS>


   <gr:hasISICv4 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">5610</gr:hasISICv4>


   <gr:hasNAICS rdf:datatype="http://www.w3.org/2001/XMLSchema#string">722110</gr:hasNAICS>


   <gr:hasGlobalLocationNumber rdf:datatype="http://www.w3.org/2001/XMLSchema#string">1234567890123</gr:hasGlobalLocationNumber>
 </gr:BusinessEntity>


<rdf:Description rdf:about="http:/www.heppnetz.de/gr4shops/index.html#company"> <gr:offers rdf:resource="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html#offering"/> </rdf:Description>

     <gr:Offering rdf:about="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html#offering">
       <rdfs:label xml:lang="en">Canon Rebel T2i (EOS 550D)</rdfs:label>
       <rdfs:comment xml:lang="en">The Rebel T2i EOS 550D is Canon's top-of-the-line consumer digital SLR camera.

It can shoot up to 18 megapixel resolution photos and features an ISO range of 100-6400.</rdfs:comment>

       <gr:hasBusinessFunction rdf:resource="http://purl.org/goodrelations/v1#Sell"/>
       <gr:validFrom rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2010-05-01T00:00:00Z</gr:validFrom>
       <gr:validThrough rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2010-05-07T23:59:59Z</gr:validThrough>

<foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html"/>

<gr:hasPriceSpecification>

         <gr:UnitPriceSpecification>
           <gr:hasCurrency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">EUR</gr:hasCurrency>
           <gr:valueAddedTaxIncluded rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</gr:valueAddedTaxIncluded>
           <gr:hasCurrencyValue rdf:datatype="http://www.w3.org/2001/XMLSchema#float">899.00</gr:hasCurrencyValue>
         </gr:UnitPriceSpecification>
       </gr:hasPriceSpecification>
       <gr:availableDeliveryMethods rdf:resource="http://purl.org/goodrelations/v1#FederalExpress"/>
       <gr:hasPriceSpecification>
         <gr:DeliveryChargeSpecification>
           <gr:eligibleRegions rdf:datatype="http://www.w3.org/2001/XMLSchema#string">de</gr:eligibleRegions>
           <gr:hasCurrency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">EUR</gr:hasCurrency>
           <gr:valueAddedTaxIncluded rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</gr:valueAddedTaxIncluded>
           <gr:hasCurrencyValue rdf:datatype="http://www.w3.org/2001/XMLSchema#float">10.00</gr:hasCurrencyValue>
           <gr:appliesToDeliveryMethod rdf:resource="http://purl.org/goodrelations/v1#FederalExpress"/>
         </gr:DeliveryChargeSpecification>
       </gr:hasPriceSpecification>


       <gr:acceptedPaymentMethods rdf:resource="http://purl.org/goodrelations/v1#PayPal"/>
       <gr:acceptedPaymentMethods rdf:resource="http://purl.org/goodrelations/v1#MasterCard"/>
       <gr:includes>
         <gr:ProductOrServicesSomeInstancesPlaceholder rdf:about="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html#product">

<foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html"/> <rdf:type rdf:resource="http://search.yahoo.com/searchmonkey/product/Product"/> <rdfs:label xml:lang="en">Canon Rebel T2i (EOS 550D)</rdfs:label>

           <rdfs:comment xml:lang="en">The Rebel T2i EOS 550D is Canon's top-of-the-line consumer digital SLR camera.

It can shoot up to 18 megapixel resolution photos and features an ISO range of 100-6400.</rdfs:comment> <foaf:depiction rdf:resource="http:/www.heppnetz.de/gr4shops/eos550d.jpg"/>

           <media:image rdf:resource="http:/www.heppnetz.de/gr4shops/eos550d.jpg"/>
           <rdfs:seeAlso rdf:resource="http:/www.heppnetz.de/gr4shops/eos550d.jpg"/>
           <foaf:thumbnail rdf:resource="http:/www.heppnetz.de/gr4shops/eos550d_small.jpg"/>
       	<gr:hasEAN_UCC-13>013803123784</gr:hasEAN_UCC-13>
           <gr:hasStockKeepingUnit>CANON_EOS550D-KIT</gr:hasStockKeepingUnit>
           <gr:hasGTIN-14>0013803123784</gr:hasGTIN-14>
           <gr:hasManufacturer rdf:resource="http:/www.heppnetz.de/gr4shops/brands.html#canon"/>
           <gr:hasInventoryLevel>
             <gr:QuantitativeValueFloat>
               <gr:hasUnitOfMeasurement rdf:datatype="http://www.w3.org/2001/XMLSchema#string">C62</gr:hasUnitOfMeasurement>
               <gr:hasMinValueFloat rdf:datatype="http://www.w3.org/2001/XMLSchema#float">9</gr:hasMinValueFloat>
             </gr:QuantitativeValueFloat>
           </gr:hasInventoryLevel>
         </gr:ProductOrServicesSomeInstancesPlaceholder>
       </gr:includes>
     </gr:Offering>
 	<rdf:Description rdf:about="http:/www.heppnetz.de/gr4shops/product_canon_battery.html#product">
   	<gr:isConsumableFor rdf:resource="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html#product"/>
 	</rdf:Description>
 	<rdf:Description rdf:about="http:/www.heppnetz.de/gr4shops/product_canon_bag.html#product">
   	<gr:isAccessoryOrSparePartFor rdf:resource="http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html#product"/>
 	</rdf:Description>


 <gr:BusinessEntity rdf:about="http:/www.heppnetz.de/gr4shops/brands.html#canon">
   <foaf:page rdf:resource="http://www.canon.com/"/>
   <media:image rdf:resource="http:/www.heppnetz.de/gr4shops/canon.jpg"/>
   <foaf:page rdf:resource="http://www.canon.com/"/>
   <foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/brands.html"/>
   <foaf:depiction rdf:resource="http:/www.heppnetz.de/gr4shops/canon.jpg"/>
   <gr:legalName>Canon Europe Ltd.</gr:legalName>
   <vcard:url rdf:resource="http://www.ibm.com/"/>
   <vcard:fn>Canon Europe Ltd.</vcard:fn>
 </gr:BusinessEntity>
 <gr:BusinessEntity rdf:about="http:/www.heppnetz.de/gr4shops/brands.html#ibm">
   <foaf:page rdf:resource="http://www.ibm.com/"/>
   <media:image rdf:resource="http:/www.heppnetz.de/gr4shops/ibm.jpg"/>
   <foaf:page rdf:resource="http://www.ibm.com/"/>
   <foaf:page rdf:resource="http:/www.heppnetz.de/gr4shops/brands.html"/>
   <foaf:depiction rdf:resource="http:/www.heppnetz.de/gr4shops/ibm.jpg"/>
   <gr:legalName>International Business Machines Inc.</gr:legalName>
   <vcard:url rdf:resource="http://www.ibm.com/"/>
   <vcard:fn>International Business Machines Inc.</vcard:fn>
 </gr:BusinessEntity>


</rdf:RDF>

</xml>

Sitemap with Semantic Sitemap Extension

Sitemap Template

<xml> <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" mlns:sc="http://sw.deri.org/2007/07/sitemapextension/scschema.xsd"> {% for uri in uris %}

  <url>
     <loc>Template:Uri</loc>
     <lastmod>Template:Lastmod</lastmod>
     <changefreq>Template:Changefreq</changefreq>
     <priority>0.8</priority>
  </url>

{% endfor %}

<sc:dataset>
   <sc:datasetLabel>Template:Label</sc:datasetLabel>
   <sc:datasetURI>Template:Rdf uri#dump</sc:datasetURI>
   <sc:sampleURI>Template:Rdf example product</sc:sampleURI>
   <sc:sampleURI>Template:Rdf example company</sc:sampleURI>
   <sc:sampleURI>Template:Rdf example brand</sc:sampleURI>
   <sc:dataDumpLocation>Template:Rdf uri</sc:dataDumpLocation>
   <changefreq>Template:Rdf changefreq</changefreq>
 </sc:dataset>

</urlset> </xml>

Sitemap Example

<xml> <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" mlns:sc="http://sw.deri.org/2007/07/sitemapextension/scschema.xsd">

  <url>
     <loc>http:/www.heppnetz.de/gr4shops/index.html</loc>
     <lastmod>2010-05-28</lastmod>
     <changefreq>daily</changefreq>
     <priority>0.8</priority>
  </url>
  <url>
     <loc>http:/www.heppnetz.de/gr4shops/brands.html</loc>
     <lastmod>2010-05-28</lastmod>
     <changefreq>daily</changefreq>
     <priority>0.8</priority>
  </url>
  <url>
     <loc>http:/www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html</loc>
     <lastmod>2010-05-28</lastmod>
     <changefreq>daily</changefreq>
     <priority>0.8</priority>
  </url>
<sc:dataset>
   <sc:datasetLabel>GoodRelations RDF Data Dump for http://www.heppnetz.de/gr4shops/</sc:datasetLabel>
   <sc:datasetURI>http://www.heppnetz.de/gr4shops/goodrelations.rdf#dump</sc:datasetURI>
   <sc:sampleURI>http://www.heppnetz.de/gr4shops/product_product-canon_eos550D-kit.html</sc:sampleURI>
   <sc:sampleURI>http://www.heppnetz.de/gr4shops/index.html</sc:sampleURI>
   <sc:sampleURI>http://www.heppnetz.de/gr4shops/brands.html</sc:sampleURI>
   <sc:dataDumpLocation>http://www.heppnetz.de/gr4shops/goodrelations.rdf</sc:dataDumpLocation>
   <changefreq>daily</changefreq>
 </sc:dataset>

</urlset> </xml>

Robots.txt with Sitemap Listing

User-agent: *
Disallow:
Sitemap: http://www.heppnetz.de/gr4shops/sitemap.xml

Updating the Page Headers

<xml> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>untitled</title>

   <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>

<link rel="meta" type="application/rdf+xml" title="RDF/XML data for ***your company name***" href="http://www.example.org/semanticweb.rdf" /> </head> <body>


</body> </html> </xml>

Old materials, to be reviewed / incorporated up

Background

(but you may already know the "why it is important") - 15 min Web cast
http://www.slideshare.net/mhepp/a-short-introduction-to-semantic-webbased-ecommerce-the-goodrelations-vocabulary-presentation

How-to



a) Overview from an RDFa perspective:

See

http://www.ebusiness-unibw.org/wiki/GoodRelations_and_Yahoo_SearchMonkey
and
http://www.ebusiness-unibw.org/wiki/Rdfa4google

You can also experiment with the GoodRelations Annotator at

http://www.ebusiness-unibw.org/tools/goodrelations-annotator/

It will return an RDFa snippet for simple-copy-and-paste.


Main resource for developers: http://www.ebusiness-unibw.org/wiki/GoodRelations
*
III. Proposed Approach
*
We should have two types of support in your software:

a) Minimal template/form-based style for basic company information including opening hours etc. This would basically mean defining a template based on the Yahoo or Google patterns from above.

That should be available in the default shop app package, because every shop owner in the world will benefit from it - the small hairdresser shop same as every restaurant.

Ideally, we would bundle a variant of the GoodRelations Annotator with Drupal. The Annotator is open-source, written in Python, but should be easily portable.

b) Comprehensive data export for individual products and prices for Ubercart

The best approach is basically as follows:

1. Make sure you have all master data about the business / store / shop - if not, create additional fields in a config file or similar.

That should hold all the data about the business itself - contact details, legal name, etc.

2. Add additional GoodRelations RDFa markup to the template for the "about" or main page in the shop. This will define the business entity etc. The markup does not have to be tightly coupled with the existing markup; you can simply add it before the closing body element. See our RDF2RDFa paper, attached.

3. Add additional markup for each individual product / item and its prices and features to the template for the "product" page.
That markup should be basically the same as

http://www.ebusiness-unibw.org/wiki/GoodRelations_and_Yahoo_SearchMonkey#Describing_Each_Product

Again, you can also move that to the end of the template and decouple it from the human-readable content. That is usually better for managing the code.

I attach the basic code you have to insert.

Important: You have to link back from each gr:Offering node to the URI of the gr:BusinessEntity using the "rev" (not rel!) attribute. When in doubt, ask.

With that, you are already almost set.

You should have clean/cool URIs - if that is the case, the RDF created this way will be nice and complete

4. A very good extension would be to also generate one large RDF/XML data dump that basically contains ALL products and the business entity definition, e.g. in the form

http://mysite.com/goodrelations.rdf

That is best created by a cron job or similar every 24 hours.

Example:

    http://www.saveonvideo.com/Bosch-BDS10-8DS_p_10036.html#UnitPrice

instead of

    http://www.saveonvideo.com/semanticweb.rdf#UnitPrice or

one exemption: the gr:BusinessEntity should be defined here

    http://www.saveonvideo.com/semanticweb.rdf#BusinessEntity

or

    http://www.saveonvideo.com/#BusinessEntity

otherwise, it would be defined 9000 times with 9000 different identifiers.




 i cannot assess whether using the tool or a dedicated script is less effort in your case. basically, it would be sufficient if you  define a string template from the RFD/XML extracted from each page and rund a script that replaces the data values in each element with the database content. i guess that would be less than 20 lines of python code, following this pseudocode pattern:


template = "... RDF/XML template for each product" (you can get that by extracting the RDF/XML from one product page via pyrdfa)

o = "goodrelations.rdf"

file = open (o)

for item in database:
    get price, label, URI, ....
    replace placeholders in template
    add result to file
close (o)



Important: The URIs for all elements in that dump file should be the ones defined in the individual RDFa in the pages.

If you do that, you have the best of both worlds:
- a data dump that can be cheaply harvested by search engines
- rdfa that will be read by yahoo and maybe google
- the URIs from the data dump directly point to the Web pages and are thus resolvable

Then, you should also add a link element pointing to the dump file to the header of all pages page in the system:

<html lang="en">
<head>
 <title></title>
 <link rel="meta" type="application/rdf+xml" title="RDF/XML data for ***your company name***" href="
http://mysite.com/goodrelations.rdf" />
</head>
...

See also here

http://www.ebusiness-unibw.org/wiki/GoodRelations_Recipe_8

That's it!

PS: You may also want to look at how it is done in Joomla/Virtuemart,
http://code.google.com/p/goodrelations-for-joomla/

Code Examples

<xml>

</xml>


Notifying Web of Linked Data Repositories

Now, notify the key Web of Linked Data crawlers to load and use your data. To do so, simply paste the URI of the page that contains the snippet (likely http://example.org/) into the respective fields of the following submission pages:

   * a) Sindice: http://sindice.com/main/submit
   * b) Yahoo SearchMonkey: http://siteexplorer.search.yahoo.com/submit (this requires free registration with Yahoo)
   * c) URIBurner: http://linkeddata.uriburner.com/

Also, you should tell the URIBurner service of your new data. To do so, simply enter the following URI into your browser once you have published your updated page:

   * http://linkeddata.uriburner.com/about/html/<your page>

Example: If your augmented Web page is at http://www.mmmeeja.com/, then invoke the following URI:

   * http://linkeddata.uriburner.com/about/html/http://www.mmmeeja.com/

If you have checked the respective button on the previous page, we will also try to notify additional search engines of your new description. Step 4 (Optional): Publish a pure data file

You can increase the reach of your self-description even further as follows: 1. the description as a RDF/XML rich meta-data file.

2. Save and publish the file on your Web server under the filename http://example.org/goodrelations.rdf; for details see here.

3. Notify additional search engines for the Web of Linked Data. To do so, simply paste the URI of that file (e.g. http://example.org/goodrelations.rdf) into the respective fields of the following submission pages:

   * a) PingTheSemanticWeb: http://pingthesemanticweb.com/
   * b) Swoogle: http://swoogle.umbc.edu/index.php?option=com_swoogle_service&service=submit

Note: You must upload your file to the target location before you notify the search engines. They will not come back if your page is not available when they try for the first time. Congratulations! You will be found on the Web of Linked Data!

The rich description of your products and services will soon appear in various search engines and matchmaking services. This will direct additional customers to your business.

If you want to go further and expose detailed product and price information on a per-item level, please see the GoodRelations CookBook for instructions or install respective extensions for your shop software.

For more information on the GoodRelations vocabulary for e-commerce, see http://www.ebusiness-unibw.org/wiki/GoodRelations.