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

Ah! Thanks! That is a bug in my RDFa example. In all GoodRelations examples, we use datatyping, except for xsd:string, because while this is theoretically needed, too, the distinction between plain literals and typed RDF literals with xsd:string as their type is hard to explain to practitioners.

But again: We should find a solution so that clients can consume GoodRelations data from RDFa and Microdata markup with the same SPARQL queries. So we need a mechanism for fixing at least the datatype problem.


On Oct 18, 2011, at 10:31 PM, Gregg Kellogg wrote:

> 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.
> Gregg
>>>> a) Microdata
>>>> <div itemscope itemtype="" 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="" />
>>>> <div itemscope itemprop="hasPriceSpecification" 
>>>>    itemtype="">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="">
>>>> <meta property="hasMinValueFloat" content="1.0">In-stock
>>>> </span>
>>>> <img itemprop="" src="" 
>>>>    alt="text" />
>>>> <link itemprop="" href="" />
>>>> </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=""></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="" alt="text" />
>>>> </div>
>>>> <div rel="foaf:page" resource=""></div>
>>>> </div>

Received on Tuesday, 18 October 2011 20:50:41 UTC