Using Multiple Types

From Schema Bib Extend Community Group

What is meant by multiple Types

Individual Schema.org Types are designed with properties to describe the attributes of a specific type of thing. In the bibliographic, and the rest of the, world a real resource you are trying to describe may be a combination of types.

For example, an item for sale on a retail web site may well be best described as a Product, with properties such as manufacturer, itemCondition, and sku. However, that item may be a book, and therefore also be well described as a Book with properties such as author, publisher, and bookFormat. Fortunately Schema.org lets you describe something with more than one Type. With the example below for instance, the item on the retail web site could be described as both a Book and a Product.

Defining Multiple Types

Defining multiple types is a feature of the RDF & Microdata formats and serialisations that underpin Schema.org. Hence the way you define them in your markup will vary dependant on the method you choose. Here are extracts from some examples describing something which is both a Book and a Product:

Turtle
@prefix schema: <http://schema.org/> .
<http://example.com/shop/item/1234>
	a schema:Book, schema:Product;
	schema:name "Dune";
	schema:author <http://viaf.org/viaf/59083797>;
        schema:itemCondition "Used" .
RDFa
<div resource="http://example.com/shop/item/1234"
     vocab="http://schema.org/" 
     typeOf="Book Product">
<p><span property="name">Dune</span></p>
Author: <a property ="author" href="http://viaf.org/viaf/59083797">Frank Herbert</a><br/>
Condition: <link property="itemCondition"/>Used<br/>
</div>
Microdata

Note: The ability within Microdata to specify multiple values for itemtype is limited. For this reason the additionalType property was introduced into Schema.org to facilitate the definition of additional types.

<div itemid="http://example.com/shop/item/1234"
     itemscope itemtype="http://schema.org/Book">
<link itemprop="additionalType" href="http://schema.org/Product"/>
<p><span itemprop="name">Dune</span></p>
Author: <a itemprop="author" href="http://viaf.org/viaf/59083797">Frank Herbert</a><br/>
Format: <link itemprop="itemCondition"/>Used<br/>
</div>