Re: Itemref on parent entities within the same scope should not inherit itemprop value of the target

If you want to reference an entity without 'copying' the property that's
chaining it to a parent entity, @itemref is the wrong attribute to use. For
this to work you need to <link> element which's @href value points to an
@itemid value instead.

Important detail here is that you add a '#' prefix to the @itemid value
because you want it to be fragment identifier. Without the '#' you'd get a
full url like: http://www.example.com/your-pageAcmeCorp, as opposed to
http://www.example.com/your-page#AcmeCorp.

<body itemscope itemtype="http://schema.org/WebPage">
    <div *itemid="AcmeCorp"* itemprop="publisher" itemscope itemtype="
http://schema.org/Organization">
        <span itemprop="name">Acme Corporation</span>
    </div>
    <div itemprop="mainEntity" itemscope itemtype="http://schema.org/Person
">
        <span itemprop="name">Wylie Coyote</span>
       * <link itemprop="affiliation" href="#AcmeCorp">*
    </div>
</body>



2015-05-28 1:27 GMT+02:00 Alexandros Zepidis <alexandros@modelisto.com>:

> Hello fellow professionals,
>
>
> I’d like to present something sort of a problem and a possible suggestion
> concerning the usage of itemref.
>
>
>
> It seems as itemref is intended to be used primarily for referencing
> entities that are not descendants of the parent scope. There is also the
> common case where a property is needed to reference an entity higher in
> it’s own dom hierarchy but still be inside the same parent item scope.
>
>
> When doing so, the property using itemref will use the target entity but
> is restricted to use any itemprop that was designated on its itemscope
> level as well - which would not always be right for its case.
>
>
> I believe that the property (itemref caller) should be able to call just
> the itemref target without inheriting the itemprops designated on that
> itemscope.
>
>
> Yours,
>
>
>
> Alexandros Zepidis
>
> http://modelisto.com
>

Received on Thursday, 28 May 2015 22:12:57 UTC