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

AW: schema.org+Microdata: additional namespaces?

From: Cord Wiljes <cwiljes@cit-ec.uni-bielefeld.de>
Date: Sat, 8 Sep 2012 03:44:27 +0200
To: <public-vocabs@w3.org>
Message-ID: <004c01cd8d63$7bb8f4d0$732ade70$@cit-ec.uni-bielefeld.de>
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
<http://purl.org/dc/elements/1.1/title%22%3eAvatar%3c/h1> ">Avatar</h1>

 

Cord

 

Von: Stéphane Corlosquet [mailto:scorlosquet@gmail.com] 
Gesendet: Samstag, 8. September 2012 00:03
An: Cord Wiljes
Cc: public-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> 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 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 tools may have
only weaker understanding of extra types, in particular those defined
externally." - you can see it on all schema.org type pages, e.g.
http://schema.org/Person

 

Steph.

 

 

Cord 

 

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

 

Dear all,


is it possible to use properties from another namespace (like Dublin Core)
together with schema.org in Microdata? Using the Avatar example on the
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 01:44:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 8 September 2012 01:44:46 GMT