RDFa with schema.org Blog schema - schema.org

I'm having trouble figuring out if I've done things right with RDFa and the schema.org Blog type. My blog used to have a list of posts that looked like this:
<h2>Why ORM Divides Us</h2>
<h2>A Heretical Calculus</h2>
In trying to augment it with RDFa information, specifically the Blog and BlogPosting types, I have come up with this:
<div vocab="http://schema.org/" typeof="Blog">
<h2 property="blogPosting" typeof="BlogPosting" resource="essays/why-orm-divides-us.html">
<a property="url" href="essays/why-orm-divides-us.html">
<span property="name">Why ORM Divides Us</span>
</a>
</h2>
<h2 property="blogPosting" typeof="BlogPosting" resource="essays/heretic-calculus.html">
<a property="url" href="essays/heretic-calculus.html">
<span property="name">A Heretical Calculus</span>
</a>
</h2>
...
As far as I can tell with Google Rich Snippets Testing Tool, this looks like it parses right, but I can't really tell. I have two other tries:
<div vocab="http://schema.org/" typeof="Blog">
<h2 property="blogPosting" typeof="BlogPosting" resource="essays/why-orm-divides-us.html">
Why ORM Divides Us
</h2>
<h2 property="blogPosting" typeof="BlogPosting" resource="essays/heretic-calculus.html">
A Heretical Calculus
</h2>
...
<div vocab="http://schema.org/" typeof="Blog" rel="blogPosting">
<h2 typeof="BlogPosting" resource="essays/why-orm-divides-us.html">
<a property="url" href="essays/why-orm-divides-us.html">
<span property="name">Why ORM Divides Us</span>
</a>
</h2>
<h2 typeof="BlogPosting" resource="essays/heretic-calculus.html">
<a property="url" href="essays/heretic-calculus.html">
<span property="name">A Heretical Calculus</span>
</a>
</h2>
...
So I'm asking for several pieces of information:
How do you tell if you've achieved conformance with one of these schemas?
Which one of my alternatives is right, and why?
Why do I seem to need to specify the resource directly when I'm on a link?
Why does the <a> tag parse so differently in the RDFa demo tool and the Google Rich Snippets Testing Tool?

Your first snippet is correct and I'd recommend to use it. The second one is incorrect, as the property="name" will target the href value, so don't use that one. The third one is also correct, and uses a more advanced feature of RDFa called chaining (via the rel attribute). It's perfectly valid to use that one if you prefer, Google understands it too.
I'm not aware of any official schema.org validator, but Google Rich Snippet will sometimes tell you if something is wrong (not always though). You can also validate your HTML + RDFa markup with http://validator.w3.org/nu/ and http://www.w3.org/2012/pyRdfa/Validator.html.
your first and third are correct, the second one is wrong (see above). I'd recommend the first one.
well, the url of the link is used for two purposes, first it is used to identify you object on the web, and it's also explicitly used for the 'url' property that schema.org requires. Although the second is a schema.org specific property.
That's something that Google adds on top of the RDFa syntax itself, a pure RDFa parser would not return the value and href grouped like that. I guess Google does that for convenience, but I agree it can possibly be confusing.

Related

What framework is this website for?

I have some files which are supposed to be the "code" for a website but I don't know which Framework it is for.
I have a "*.txt" file with nothing but JavaScript-like lines with double "$", like:
$setglobalvars(xpto,0)$
$setvars(xpto2,lookuptable(!MasterData,xpto3,xpto4,lookup(xpto5),LAST_NAME))$
And a few other "*.txt" HTML-template-like files (appears to be "Mustache" templates), like:
<script id="header_tag_tmpl" type="text/x-jsrender">
<div class="tmplHidden">
<div class="pass_elem first">
<div class="fieldName">name</div>
<div class="field">{{:user.firstname}} {{:user.surname}}</div>
</div>
<div class="pass_elem second" >
<div class="fieldName">level</div>
<div class="field">{{:user.level.currentName}}</div>
</div><!--
--><div class="pass_elem third">
<div class="fieldName">LEVEL EXPIRY</div>
{{if ((user.level.currentName) == 'Entry')}}
<div class="field">N/A</div>
{{else}}
<div class="field">{{:user.level.levelExpiry}}</div>
{{/if}}
</div>
</div>
</script>
And also containing JavaScript-like lines completely outside SCRIPT tags or any other HTML tags:
$setvars(xpto,lookuptable(!MasterData,xpto2,xpto3,lookup(xpto4),xpto5))$
-
I am dealing with a 3rd party Software Provider, which created a website for my company (the source is supposed to be ours). They're being unpleasant to the point where we're considering seriously ditching them and now I need to take ownership over this website. However, I don't even know for sure which Framework the website is supposed to be.
Does anyone know what Framework this website is likely coded for?
I suspect this is being hosted by a proprietary web Framework (combined with JsRender).
The {{ tags are exactly the same as the ones for JsRender but those $something$ I just can't find out what they are and it's appearing me they're being processed by a proprietary framework.
This is not exactly a proper answer but I don't believe I'm going to get anything better than this.
(and it appears we might have become vendor-locked in to them, which is why they're being so much at ease to treat us with commercial disrespect - lovely)

Offers in Products (schema.org / rich snippets)

I try to optimize the microdata/ schema.org/ rich snippet markup for product pages within some templates we use.
While doing so placed itemprop="offers" itemscope itemtype="http://schema.org/Offer" within a itemscope itemtype="http://data-vocabulary.org/Product"
Which should work according to
https://schema.org/offers
as well as
https://developers.google.com/structured-data/rich-snippets/products
but fails to validate on Google's Structured Data testing tool
Can someone give me some insight on which of the information I should focus?
The 'Offer' delivers some interesting properties I really would like to use within products.
Same goes for isRelatedTo which is mentioned on schema.org but fails to validate.
You are using the Product type and the offers¹ property from the vocabulary Data-Vocabulary.org, and the Offer type from the vocabulary Schema.org. (¹ I don’t know if Data-Vocabulary.org really defined an offers property; most of their site seems to be deleted.)
If you want Google Search to consume your data, you’ll want to use the vocabulary Schema.org.
Schema.org also has a type representing products (Product) and a property for referencing an Offer from a Product (offers).
In Microdata, this could look like:
<article itemscope itemtype="http://schema.org/Product">
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
</div>
</article>

Blog Posts Optimized by Schema

I am quite new to these approach in optimizing my HTML with Rich Snippets. I am not sure what is the differences of each of the list items below:
http://schema.org/Article
http://schema.org/BlogPosting
http://schema.org/Blog
I got this code below example below, and I want to know what are the missing items or codes that could optimized a simple blog post that search engines can understand. I'd like to know all the rich snippets available for a blogpost.
<div id="blog_post" itemscope="" itemtype="http://schema.org/BlogPosting">
<h2 itemprop="name headline">Post Title</h2>
<div class="byline">
Written by
<span itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="name">
Author
</span>
</span>
on
<time datetime="2011-05-17T22:00" itemprop="datePublished">Tuesday May 17th 2013</time>
</div>
<div class="content" itemprop="articleBody">Content...</div>
</div>
http://schema.org/Blog can be used on the front page, where you typically find a list of several blog posts (and maybe also for blog-wide things on every page, like the blog name).
http://schema.org/BlogPosting represents a single blog post.
http://schema.org/Article is just more general than http://schema.org/BlogPosting (every BlogPosting is a Article, but not every Article is a BlogPosting). If you have a typical blog, you want to use http://schema.org/BlogPosting.

how to use schema.org metadata on a review for multiple ratings?

I need to markup the review metadata for a product, but the review will have multiple ratings like service, satisfaction, quality, lifetime etc in the original schema.org documentation for review (http://schema.org/Review) there is only property/field: reviewRating using this i can only use it for one field but i need to provide metadata for all the fields, is there a solution for that?
Thanks.
Actually one property isn't an issue here since it can be used multiple times. There were a lot of discussions around cardinality of schema.org properties. You can dive into details here (issue at open tracker) and here (W3C Wiki page).
I personally follow the rule stated by Guha:
Right now, it is always allowed to have multiple values.
Another part of your question is how to describe different ratings. You can use mechanism of "multiple inheritance" like in "serious" programming language. That is one entity may have several types. In your case one type will be http://schema.org/Rating and another (quality, service, etc) you can get from any external to schema.org vocabulary. E.g., productontology is a good candidate (you can use http://www.productontology.org/id/Quality_philosophy, http://www.productontology.org/id/Customer_service accordingly). With RDFA you can just go with it - language itself provides all the necessary mechanisms to say that. But for microdata (and I bet you're using this one) you need to do "dirty hack" and use additionalType property.
So simple example of what you need is smth like this:
<div itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Not a happy camper</span> -
by <span itemprop="author">Ellie</span>,
<meta itemprop="datePublished" content="2011-04-01">April 1, 2011
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="additionalType" content="http://www.productontology.org/id/Quality_philosophy">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">1</span>/
<span itemprop="bestRating">5</span>stars
</div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="additionalType" content="http://www.productontology.org/id/Customer_service">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">5</span>/
<span itemprop="bestRating">5</span>stars
</div>
<span itemprop="description">The lamp burned out and now I have to replace
it. </span>
</div>
And Google validator sees all the data.

Google SDTT error: "The review has no reviewed item specified."

I checked my website's Rich Snippets in the Google Rich Snippets Tool, and it had an error:
The review has no reviewed item specified.
How do I fix it?
The code is:
<div itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
</div>
The error message is pretty self explanatory with one of the problems that you have, but that's not the only problem with the code you presented. The other problem is that you've used itemprop without an item that this is the property of.
AggregateRating requires an item that is being rated. You can't have an AggregateRating without specifying what it applies to. There's two ways to do this (do not do both):
Use a containing item and specify the AggregateRating as a property. You (kind of) suggested this is what you are trying by using itemprop without a containing item. If you wish to use this, you need to wrap your itemprop in a suitable item. Suitable items are: Product, Brand, Offer, Event, Organization, Place, Service, CreativeWork. These items specify an aggregateRating property which can contain an AggregateRating.
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
</div>
<!-- other Product properties -->
</div>
Use the itemReviewed property of AggregateRating, specifying the Thing that the rating is regarding. Don't forget to remove the itemprop from the code in your question if you use this.
<div itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">5</span> stars - based on <span itemprop="reviewCount">21</span> reviews
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
<!-- Product properties -->
</div>
</div>
You have to use LocalBusiness schema for correct this one error.
I got the same error message for my page. Then I've put LocalBusiness Schema code after putting everything working fine.
For code sample, you can go on Schema page: http://schema.org/LocalBusiness
Or you can check my website which I have the correct one.
Didi Designer Studio