Re: Does order of itemscope and itemprop matter?

Hi,

I've remembered an issue for rich snippet testing tool.
I was confused on those days about wrong(!) placement of itemscope.

I've tried again:

When itemscope is at the end:
<div id="rat" itemtype="http://schema.org/Product" itemscope>
 <div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope>
 .
 .
 </div>
</div>
Rich snippet testing tool parse and and generate snippet properly.
Attached screenshot: s1.png (http://www.freeimagehosting.net/4ngob)


when the code is:
<div id="rat" itemscope itemtype="http://schema.org/Product">
 <div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
 .
 .
 </div>
</div>
Rich snippet testing tool parses and generates snippet properly.
Attached sceenshot: s2.png (http://www.freeimagehosting.net/gtbod)

Ozer Kavak





(from local playground results)


Original message
On 5 January 2012 12:43, Mehershad Dahmubed <mehershad@gmail.com
<mehershad@gmail.com?Subject=Re%3A%20Does%20order%20of%20itemscope%20and%20itemprop%20matter%3F&In-Reply-To=%253CCAFNgM%2BbHo187dSC61ttwhqUhRxryVGtv-U8%3DrHNApCb9E6EoSA%40mail.gmail.com%253E&References=%253CCAFNgM%2BbHo187dSC61ttwhqUhRxryVGtv-U8%3DrHNApCb9E6EoSA%40mail.gmail.com%253E>>
wrote:

> Forgive me if this question sounds silly but there is a reason why I have to ask this.

It's a perfectly fine question to ask!

> I understand the syntax that is advertise is:
> <div itemscope itemprop="<value>">
>
> Due to the HamlPy library in current use on my system, even after my own fixes added, the library outputs:
> <div itemprop="<value>" itemscope>
>
> due to the way ast.literal_eval evaluates the dictionary key/value pairs. I don't why it swaps the order but that's where it stands.
>
> So I was curious if the order really mattered or where I stand right now is fine too?

It shouldn't matter. As I type this I see Jeni also replied :)

In general, if people have 'simple' questions like this, don't feel
bad about asking them since others are likely thinking the same thing.
It also helps standards folk understand how to improve the
documentation...

Dan

Received on Tuesday, 10 January 2012 17:04:18 UTC