Schema.org Microdata markup to distinguish between photos and art - schema.org

Like many sites, we deliver a lot of imagery on our web site.
Use case: set up labels/refinements in Google Custom Search that aggregate and filter two different classes of image objects. Using Schema.org Microdata markup is very easy and works great, but we want the user to select either
1) PHOTOS: a "photo" is taken by with an instrument -- some kind of camera/lens "machine" that comprises something from "real life"
OR
2) ART: all other images that are creative works by an illustrator/artist: vector art, scans of drawings, scans of paintings, water colors etc.
I can easily determine which is which as our web CMS gets metadata from the database, and drives the content through the pipe and fork dynamic insertion of metadata. Something like
<section class="page-content" role="main" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="image" content="Red Roses" /> #art
and toggle to this if it were a photo
"itemprop="photo" content="Daffodils" # photo
But this is really not doing the job. I would expect to have some property like "imageType" that I could then apply like this
itemprop="imageType" content="photo"
itemprop="imageType" content="art"
But I don't see anything that meets this requirement in Schema.org (my eyes are bleeding from reviewing the hierarchy and still can't find what I need). There is nothing to designate "art" as such.
Any ideas?

I don’t know which features Google Custom Search supports,
but you have the following options with Schema.org and Microdata.
Unless you have to implement it right now, I recommend option b).
a) Propose new Schema.org types/properties
See my answer to another question for links.
b) Wait for an appropriate Schema.org type/property
The next Schema.org release will contain the type VisualArtwork (draft):
A work of art that is primarily visual in character.
It has an artform property (draft) that takes text or an URL as value:
e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc.
Caution notice: these are drafts, subject to change!
Update: VisualArtwork and artform got released.
<div itemscope itemtype="http://schema.org/VisualArtwork">
<meta itemprop="artform" content="Painting">
</div>
<div itemscope itemtype="http://schema.org/VisualArtwork">
<meta itemprop="artform" content="Photo">
</div>
c) Use Schema.org’s extension mechanism
The "slash-based" extension mechanism is "outdated", but valid.
<div itemscope itemtype="http://schema.org/ImageObject/Photo"></div>
<div itemscope itemtype="http://schema.org/ImageObject/Art"></div>
I would only use this as a last resort.
d) Use an additional Schema.org type
This does not work for most cases, but it’s possible in your case: Both of your images are ImageObject, and only the photos are Photograph in addition.
The itemtype attribute can have several values as long as they are from the same vocabulary. But note that you could only use properties that are defined for all of the used types.
<div itemscope itemtype="http://schema.org/ImageObject">
<!-- art -->
</div>
<div itemscope itemtype="http://schema.org/ImageObject http://schema.org/Photograph">
<!-- photo -->
</div>
e) Use a type/property from a different vocabulary
If you know/find a vocabulary about your subject/model, you can use the corresponding types as value for Schema.org’s additionalType property:
<section itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="additionalType" href="http://example.com/vocabulary/photo">
</section>
<section itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="additionalType" href="http://example.com/vocabulary/art">
</section>
If you find a suitable property, you may use its URL as value for itemprop:
<section itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="http://example.com/vocabulary/imageType" content="photo">
</section>
<section itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="http://example.com/vocabulary/imageType" content="art">
</section>
f) Use your own proprietary property
If you don’t find a suitable vocabulary, you can use your own URL as property:
[…] a proprietary item property name (i.e. one used by the author for private purposes, not defined in a public specification)
(Example like the second one in b).)

#unor
My developer told me (talking to him after I posted this) we can use (to avoid adding another meta line to the document):
<section itemscope itemtype="http://schema.org/ImageObject"> # for art
<section itemscope itemtype="http://schema.org/Photo"> # for photography
From tests I see that Google will actually parse this: its structured data previewer show it is being extracted. (though it's structured data preview may throw an error). As such I could use it in a custom search refinement/label.
But, it seems wrong to me from the schema.org standard -- since both classes of
images:(photos),(paintings,drawings,vector)
are all "ImageObjects"

Related

How do I indicate a newer version of a "Dataset"?

I would like to include newer versions for a Dataset that has been superseded.
For example, Some dataset V1 has been replaced by Some dataset V2. The landing page for V1 no longer has data, but instead points to the landing page for V2.
How do I indicate a newer version of a Dataset in Schema.org markup?
Schema.org properties replacer and supersededBy are not recognized for an object of type Dataset.
Schema.org doesn’t provide a property to link a Dataset to an updated Dataset.
An unspecified relation might be conveyed by referencing them from the same DataCatalog. In some contexts it might also make sense to use isBasedOn to link the new one from the old one.
You can provide data about the datasets that could convey which one is the newest:
You can specify the version number of a dataset with the version property.
You can specify the creation/modification/publication dates of a dataset with the dateCreated, dateModified, and datePublished properties. (And if it makes sense in your context, maybe also expires.)
Example:
<article typeof="schema:Dataset" resource="/dataset/v1#this">
<link property="schema:url" href="/dataset/v1">
<link property="schema:includedInDataCatalog" typeof="schema:DataCatalog" href="/dataset#this">
<h2>
<span property="schema:name">Some dataset</span>
V<span property="schema:version">1</span>
</h2>
<time property="schema:datePublished">2017-05-30</time>
</article>
<article typeof="schema:Dataset" resource="/dataset/v2#this">
<link property="schema:url" href="/dataset/v2">
<link property="schema:includedInDataCatalog" typeof="schema:DataCatalog" href="/dataset#this">
<h2>
<span property="schema:name">Some dataset</span>
V<span property="schema:version">2</span>
</h2>
<time property="schema:datePublished">2018-01-22</time>
</article>
In case you don’t offer, nor need to say something about, nor need to reference older datasets, you could of course decide to have only one Dataset and update its dateModified property.

what is the current opinion on using <meta> tags to hide individual instances of a recurring itemtype="http://schema.org/Event"

This event is a local farm market where the client will be making weekly appearances at a venue which shifts bi-annually. Because the recurrence of the event is irregular (some weeks the start time may be different and the number of days between events varies between 7 and 5), there is plenty of justification to list them individually. However, a human reader will not like the aesthetics of 20+ listings all having the same description.
You don’t have to duplicate the description, you can use the itemref attribute:
<p itemprop="description" id="farm-market">…<!-- description for all events --></p>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<time itemprop="startDate">2015-01-20</time>
</div>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<time itemprop="startDate">2015-02-04</time>
</div>
If you don’t want to show any content from the single events (i.e., not even the date), then yes, you should use meta elements in Microdata:
<p itemprop="description" id="farm-market">…<!-- description for all events --></p>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<meta itemprop="startDate" content="2015-01-20">
</div>
<div itemscope itemtype="http://schema.org/Event" itemref="farm-market">
<meta itemprop="startDate" content="2015-02-04">
</div>
There’s nothing wrong about using meta.
It’s what gets used in some examples from the Microdata (W3C Working Group Note) specification, and for this purpose Microdata defines that it’s valid to use meta elements in the body.

How to use DSM & Schema.org?

Does anyone know what I would set as the value for the "content" attribute if I'm utilizing the Diagnostic and Statistical Manual of Mental Disorders (DSM)?
<span itemprop="code" itemscope itemtype="http://schema.org/MedicalCode">
<meta itemprop="code" content="305.90"/>
<meta itemprop="codingSystem" content="_______"/>
</span>
Might the codingSystem content value be "DSM-IV", "DSM-4", "DSM4" or "DSM-4"?
Schema.org doesn’t restrict how the value for the codingSystem property should be specified (apart from the recommendation that the value should be Text).
You should use the name/abbreviation that is most widely known. Wikipedia lists it as "DSM-IV", so unless you know better, go with this.
I don’t know anything about this domain, but I think codeValue (which expects Text) is more appropriate than code (which expects another MedicalCode item):
<span itemprop="code" itemscope itemtype="http://schema.org/MedicalCode">
<meta itemprop="codeValue" content="305.90" />
<meta itemprop="codingSystem" content="DSM-4" />
</span>

How do I use the 'about' Schema.org property?

I'm trying to markup an article and confused as to how to use the about property (from CreativeWork).
http://schema.org/about
My guess is that it can be used like this...
<p itemprop="about">Short text about the article...</p>
But on schema.org it says that the expected type is Thing so I'm not sure what I should be inserting inside the itemprop="about" tag; I can't find any examples of the about property in use.
Can anyone help and provide an example?
When using Microdata, the syntax would look like:
<p itemprop="about" itemscope itemtype="http://schema.org/Thing">
…
</p>
(Instead of Thing, you could use a more specific type.)
Now you can use properties for this Thing, for example giving it a name, sameAs to link to the corresponding Wikipedia page, and description for a short description:
<p itemprop="about" itemscope itemtype="http://schema.org/Thing">
<span itemprop="description">A <span itemprop="name">Bee</span> is a flying insect.</span>
<link itemprop="sameAs" href="http://en.wikipedia.org/wiki/Bee" />
</p>

How should I handle schema.org markup for a product with multiple sizes/prices

While implementing schema.org markup for one of my cusomters online-shops I noticed a little difficulty. I think it's a missing option in the markup. Neighter offer nor aggregateOffer can handle this case correctly - although I think it is quite common.
One page for one product (let's say it's a body-lotion)
The body-lotion comes in 3 sizes, 100, 200 and 250ml
It basically has an internal productId (BL100, BL200 and BL250) for each size as well as a EAN (http://en.wikipedia.org/wiki/International_Article_Number_(EAN)) for each size.
How to buy: Go on the product page, chose your size, the price changes via javascript, click add to chart
Q: How can I markup ONE product with MULTIPLE sizes and MULTIPLE prices correctly?
Problems:
http://schema.org/Product suggests only ONE productID which is wrong for me. If I add three offers (http://schema.org/Offer), search engines might think, the pricing is totally weird because the same product has three different offers.
http://schema.org/AggregateOffer doesn't seem right to me eighter.
Thanks for your help.
I think the correct way to mark up this particular scenario is by nesting several Offers inside of a single Product. To add additional information to each Offer, use an IndividualProduct. I'm not 100% sure, but this seems to work well in the Google Structured Data Testing Tool.
It looks like schema.org is still being updated with new ways to markup your products. The schema.org project pulled in a lot of structure from the Good Relations e-commerce product vocabulary. See E-commerce SEO Using Schema.org Just Got A Lot More Granular for more information about the new vocabulary items.
Say we want to list information about Sumatra coffee beans for sale on a website. We want to sell two different sizes (12 oz. and 16 oz.) with different prices for each. However, both product sizes should have the same images ('tis just a coffee bean) and name. The structure will look something like:
Product (name, description, and image)
aggregateRating
Offer (price and priceCurrency)
IndividualProduct (sku and weight)
Offer (price and priceCurrency)
IndividualProduct (sku and weight)
Copy and paste the following into Google's Structured Data Testing Tool to see how Google will interpret the HTML.
jsFiddle display
<article class="product" itemscope itemtype="http://schema.org/Product">
<div class="images">
<a href="images/product.jpg">
<img alt="Sumatra Coffee Beans" itemprop="image" src="images/product.jpg">
</a>
</div>
<div class="content">
<header>
<h1 itemprop="name">Sumatra Coffee Beans</h1>
</header>
<div class="code">
<span class="label">Item Number:</span>
<span itemprop="productID">sumatra-coffee</span>
</div>
<div itemprop="description">
<p>Error 418</p>
</div>
<div class="reviews" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<div class="details">
Rated <span itemprop="ratingValue">4.5</span>/5
</div>
<div class="count">
(<span itemprop="reviewCount">9</span> reviews)
</div>
</div>
<div class="offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/IndividualProduct">
<span class="sku" itemprop="sku">scb-ov1</span>
– (<span itemprop="weight">12 oz.</span>)
</div>
<div class="price">$<span itemprop="price">14.99<span></div>
<meta content="USD" itemprop="priceCurrency">
</div>
<div class="offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/IndividualProduct">
<span class="sku" itemprop="sku">scb-ov2</span>
– (<span itemprop="weight">16 oz.</span>)
</div>
<div class="price">$<span itemprop="price">20.99</span></div>
<meta content="USD" itemprop="priceCurrency">
</div>
</div>
</article>
I think I would have one Product that contains multiple Offers, one per size. The limitation, of course, is that it doesn't offer a formal means for specifying multiple product IDs, but perhaps you could informally put those in the Offer's Description or URL property. That's not an exact fit, but maybe it's close enough.
Another option is to join the Public Vocabs email list (lists.w3.org/Archives/Public/public-vocabs), which asserts that it is "the place to propose extensions, new types, or feedback from deployment experience with the existing vocabulary" (lists.w3.org/Archives/Public/public-vocabs/2011Oct/0162.html), and propose a solution to your problem.
I think ProductGroup is the key. See https://schema.org/ProductGroup
I have a similar quest and I find it hard to match google suggestions for xml product feeds with schema.org specs. Thing is, that feed should include each sku as single feed item (each shoe size separately), yet wa sell them as one product with different sizes. Our developer uses AggregateOffer to link all the sizes together, but specs does not allow each offer item to differ or even include an sku field. Product seems to suit the case better. Both sku and +size* are valid, properties of Product. Different sizes should be linked by productGroup.
In your case I would look into ProductModel for grouping multiple Product options, as it allows PropertyValue fields. See https://schema.org/ProductModel
I would recommend a slightly different way of thinking about this particular web page. Instead of thinking about this specific webpage as a 'Product' page, think about it as a 'WebPage' type. This 'WebPage' then actually contains three different 'Products', each with their own 'Offer' and their own 'productID'. When you're saying that each size has it's own EAN, that's a big indicator to me that each size's price/size/id should be contained inside if it's own 'Product' div.
This is what Google says to do: Use itemOffered The item being sold. Typically, this includes a nested Product, but it can also contain other item types or free text.
All the different variations should be represented as separate Products with separate Offers. Use Product's isSimilarTo and isRelatedTo properties to link them together.
reference: http://schema.org/Product
Consider using "AggregateOffer" for the product, than within each offer specify each size as a different "itemOffered"
https://schema.org/itemOffered
While several common expected types are listed explicitly in this definition, others can be used. Using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.