- From: Martin Hepp <martin.hepp@ebusiness-unibw.org>
- Date: Wed, 15 Jun 2011 21:49:00 +0200
- To: public-lod@w3.org, semantic-web@w3.org
I thought this might also be relevant for subscribers of these lists. Begin forwarded message: > From: Martin Hepp <martin.hepp@ebusiness-unibw.org> > Date: June 15, 2011 9:44:49 PM GMT+02:00 > To: goodrelations-list <goodrelations@ebusiness-unibw.org> > Subject: [goodrelations] Google bug: foaf:page and Google Rich Snippets > > Hi all: > > I just found out that the Google Rich Snippets Testing tool rejects all RDFa markup for products if the data contains foaf:page (a link to the HTML page) with a value that is NOT from within the domain name space of the actual file location. > > Example: > > If you have the following markup in the page available from http://www.domain.com/example.html, then > > a) an empty foaf:page value will work > > <div typeof="gr:Offering" about="#offering" > > <div property="gr:name" content="ACME Anvil" xml:lang="en"></div> > <div rel="foaf:page" resource=""></div> > > b) foaf:page with the actual page URI will work > > <div typeof="gr:Offering" about="#offering" > > <div property="gr:name" content="ACME Anvil" xml:lang="en"></div> > <div rel="foaf:page" resource="http://www.domain.com/example.html"></div> > > c) foaf:page with a URI from the same domain name space as the actual page URI will also work: > > <div typeof="gr:Offering" about="#offering" > > <div property="gr:name" content="ACME Anvil" xml:lang="en"></div> > <div rel="foaf:page" resource="http://www.domain.com/canonical/example.html"></div> > > BUT: > > c) foaf:page with a URI from another domain name space than the actual page URI will NOT work: > > <div typeof="gr:Offering" about="#offering" > > <div property="gr:name" content="ACME Anvil" xml:lang="en"></div> > <div rel="foaf:page" resource="http://www.some_other_domain.com/example.html"></div> > > > Unfortunately, the testing tool gives the very uninformative error message > > "Insufficient data to generate the preview. > ... > Warning: In order to generate a preview, either price or review or availability needs to be present." > > It is natural that Google does not like foaf:page pointers to external domain name spaces, but this unexpected behavior costed me almost a day. > > So watch out! > > Option b) is the recommended practice, because it works in any scenario, but it requires that you know the URI of the final publishing destination at markup-time (or the template has access to the deep URI as a variable). > > Option a) is handier, because the URI of the current page will be automatically used as the value for foaf:page, but it > fails, if the document sets the base URI of all product item pages to the main shop page, e.g. via > > <base href="http://shop.com/home/" /> > > because then all offers would point to the same base page and deep links would be lost. > > Best wishes > > Martin Hepp > > > > > _______________________________________________ > goodrelations mailing list > goodrelations@ebusiness-unibw.org > http://ebusiness-unibw.org/cgi-bin/mailman/listinfo/goodrelations
Received on Wednesday, 15 June 2011 19:49:26 UTC