W3C home > Mailing lists > Public > public-html-data-tf@w3.org > October 2011

Re: Microdata to RDF: First Editor's Draft (ACTION-6)

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Tue, 18 Oct 2011 16:31:06 -0400
To: Martin Hepp <martin.hepp@ebusiness-unibw.org>
CC: Gregg Kellogg <gregg@kellogg-assoc.com>, "public-html-data-tf@w3.org" <public-html-data-tf@w3.org>
Message-ID: <3973326E-7E1B-47F4-A652-86270F227102@greggkellogg.net>
On Oct 18, 2011, at 1:08 PM, Martin Hepp wrote:

>> ...
>> P.S., I also note that your RDFa example assumes some datatype inference, doing this through post-processing would satisfy both Microdata and RDFa use cases.
> I must admit I don't get what you want to say with this. There are cases in GR where the rdfs:range of a property is not the actual best xsd:datatype but a supertype, but these cases are rare.

Note in the RDFa below:

   <span property="gr:hasCurrencyValue">99.99</span>

is an parsed as an untyped literal in RDFa. If you intended it to be xsd:float, you'd need to mark it up as follows:

   <span property="gr:hasCurrencyValue" datatype="xsd:float">99.99</span>

Of course, it's common to not do this and have the processor create untyped literals and have the application coerce this based on it's domain knowledge. My point was that Microdata and RDFa are really no different in this matter, unless an @datatype attribute is specified.


>>> a) Microdata
>>> <div itemscope itemtype="http://purl.org/goodrelations/v1#Offering" itemid="#offer">
>>> <div itemprop="name">Hepp Personal SCSI Controller Card</div>
>>> <div itemprop="description">The Hepp Personal SCSI is a 16-bit 
>>> add-on card that allows attaching up to seven SCSI devices to your computer.</div>
>>> <link itemprop="hasBusinessFunction" 
>>>   href="http://purl.org/goodrelations/v1#Sell" />
>>> <div itemscope itemprop="hasPriceSpecification" 
>>>     itemtype="http://purl.org/goodrelations/v1#UnitPriceSpecification">Price: 
>>>  <meta itemprop="hasCurrency" content="USD">$
>>>  <span itemprop="hasCurrencyValue">99.99</span>
>>>  <time itemprop="validThrough" datetime="2012-11-30T23:59:59Z"></time> 
>>> </div>
>>> Condition: <div itemprop="condition">used</div>
>>> EAN/UPC: <span itemprop="hasEAN_UCC-13">1234567890123</span>
>>> MPN: <span itemprop="hasMPN">PSCSI</span>
>>> Article No. <span itemprop="hasStockKeepingUnit">123-456</span>
>>> Availability: <span itemscope itemprop="hasInventoryLevel" 
>>>     itemtype="http://purl.org/goodrelations/v1#QuantitativeValue">
>>>  <meta property="hasMinValueFloat" content="1.0">In-stock
>>> </span>
>>> <img itemprop="http://schema.org/image" src="http://example.com/images/pscsi.jpg" 
>>>     alt="text" />
>>> <link itemprop="http://xmlns.com/foaf/0.1/page" href="http://example.com/products/pscsi" />
>>> </div>
>>> b) RDFa
>>> <div typeof="gr:Offering" about="#offer">
>>> <div property="gr:name">Hepp Personal SCSI Controller Card</div>
>>> <div property="gr:description">The Hepp Personal SCSI is a 16-bit add-on card that allows 
>>> attaching up to seven SCSI devices to your computer.</div>
>>> <div rel="gr:hasBusinessFunction" 
>>>   resource="http://purl.org/goodrelations/v1#Sell"></div>
>>> <div rel="gr:hasPriceSpecification">
>>>  <div typeof="gr:UnitPriceSpecification">Price: 
>>>   <span property="gr:hasCurrency" content="USD">$</span>
>>>   <span property="gr:hasCurrencyValue">99.99</span>
>>>   <div property="gr:validThrough" datatype="xsd:datetime" 
>>>        content="2012-11-30T23:59:59Z"></div> 
>>>  </div>
>>> </div>
>>> Condition: <div property="gr:condition>used</div>
>>> EAN/UPC: <span property="gr:hasEAN_UCC-13 datatype="xsd:string">1234567890123</span>
>>> MPN: <span property="gr:hasMPN datatype="xsd:string">PSCSI</span>
>>> Article No. <span property="gr:hasStockKeepingUnit datatype="xsd:string">123-456</span>
>>> Availability: <div rel="gr:hasInventoryLevel"> 
>>>     <div typeof="gr:QuantitativeValue">
>>>       <div property="gr:hasMinValueFloat" content="1.0" datatype="xsd:float">In-stock</div>
>>>     </div>
>>> </div>
>>> <div rel="schema:image">
>>>  <img src="http://example.com/images/pscsi.jpg" alt="text" />
>>> </div>
>>> <div rel="foaf:page" resource="http://example.com/products/pscsi"></div>
>>> </div>
Received on Tuesday, 18 October 2011 20:32:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:08:25 UTC