W3C home > Mailing lists > Public > public-vocabs@w3.org > September 2012

Re: AW: schema.org+Microdata: additional namespaces?

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Fri, 7 Sep 2012 22:56:22 -0400
To: Cord Wiljes <cwiljes@cit-ec.uni-bielefeld.de>
CC: "public-vocabs@w3.org" <public-vocabs@w3.org>
Message-ID: <00FDAAC8-519A-4169-8C78-933871BED529@kellogg-assoc.com>
On Sep 7, 2012, at 6:45 PM, "Cord Wiljes" <cwiljes@cit-ec.uni-bielefeld.de<mailto:cwiljes@cit-ec.uni-bielefeld.de>> wrote:

Hi Steph,

thank you for the clarification. The itemprop attribute can indeed have several values (separated by spaces). Nevertheless I fear these can only come from the namespace inherited from the itemtype. And since there is only one itemtype allowed there is also only one namespace. So this one would be O.K.:
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name keywords">Avatar</h1>
But this one probably would not be O.K.:

<h1 itemprop="name http://purl.org/dc/elements/1.1/title">Avatar</h1<http://purl.org/dc/elements/1.1/title%22%3eAvatar%3c/h1>>

Cord


No, it's perfectly acceptably for the @itemprop terms to come from different namespaces, which is why it's appropriate to use absolute URLs in addition to terms relative to @itemtype.

Gregg

Von: St├ęphane Corlosquet [mailto:scorlosquet@gmail.com]
Gesendet: Samstag, 8. September 2012 00:03
An: Cord Wiljes
Cc: public-vocabs@w3.org<mailto:vocabs@w3.org>
Betreff: Re: schema.org+Microdata: additional namespaces?

Hi Cord,


On Fri, Sep 7, 2012 at 5:40 PM, Cord Wiljes <cwiljes@cit-ec.uni-bielefeld.de<mailto:cwiljes@cit-ec.uni-bielefeld.de>> wrote:
I just saw at http://www.w3.org/TR/microdata/#attr-itemtype:


The itemtype attribute, if specified, must have a value that is an unordered set of unique space-separated tokens that are case-sensitive, each of which is a valid URL that is an absolute URL, and all of which are defined to use the same vocabulary.

So my example

<h1 itemprop="name http://purl.org/dc/elements/1.1/title">Avatar</h1>

would not be allowed, because it mixes two namespaces (schema: and dc:).

Your first example was perfectly fine, itemprop does allow multiple properties from multiple namespaces, http://www.w3.org/TR/microdata/#names:-the-itemprop-attribute.


The definition you have pasted above with the restriction on the single vocabulary is for the itemtype attribute. Schema.org<http://Schema.org> offers a work around for that via the additionalType property: "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org<http://Schema.org> tools may have only weaker understanding of extra types, in particular those defined externally." - you can see it on all schema.org<http://schema.org> type pages, e.g. http://schema.org/Person


Steph.


Cord

Von: Cord Wiljes [mailto:cwiljes@cit-ec.uni-bielefeld.de<mailto:cwiljes@cit-ec.uni-bielefeld.de>]
Gesendet: Donnerstag, 6. September 2012 17:29
An: public-vocabs@w3.org<mailto:public-vocabs@w3.org>
Betreff: schema.org<http://schema.org>+Microdata: additional namespaces?

Dear all,

is it possible to use properties from another namespace (like Dublin Core) together with schema.org<http://schema.org> in Microdata? Using the Avatar example on the schema.org<http://schema.org> website (http://www.schema.org/docs/gs.html) would the following example work?
<div itemscope itemtype ="http://schema.org/Movie"<http://schema.org/Movie> itemid="http://dbpedia.org/resource/Avatar_(2009_film)"<http://dbpedia.org/resource/Avatar_(2009_film)>>
   <h1 itemprop="name http://purl.org/dc/elements/1.1/title">Avatar</h1>
</div>
Or translated into turtle:
<http://dbpedia.org/resource/Avatar_(2009_film)><http://dbpedia.org/resource/Avatar_(2009_film)>  a  schema:Movie ;
                                                                                schema:name  "Avatar" ;
                                                                                dc:title "Avatar" .



Received on Saturday, 8 September 2012 02:57:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 8 September 2012 02:57:03 GMT