Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itemOffered and offers do not match in range vs. domain: CreativeWork#637

Open
mfhepp opened this issue Jul 9, 2015 · 8 comments
Open
Assignees
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).

Comments

@mfhepp
Copy link
Contributor

mfhepp commented Jul 9, 2015

http://schema.org/offers includes CreativeWork as its domain, while http://schema.org/itemOffered does only include Product in its range..

So currently, you have to use Book -> offers -> Offer for books; Offer -> itemOffered -> Book does not work as of now.

Note: It is not clear to me whether we should simply include CreativeWork in the range of itemOffered. Using multi-typed entities properly would be a cleaner approach

Works:

<body>
    <div itemscope itemtype="http://schema.org/Book">
        <img itemprop="image" src="catcher-in-the-rye-book-cover.jpg" alt="cover art: red horse, city in background" />
        <span itemprop="name">The Catcher in the Rye</span> -
        <link itemprop="bookFormat" href="http://schema.org/Paperback">Mass Market Paperback
        by <a itemprop="author" href="/author/jd_salinger.html">J.D. Salinger</a>

        <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
            Price: <span itemprop="price" content="6.99">$6.99</span>
            <meta itemprop="priceCurrency" content="USD" />
            <link itemprop="availability" href="http://schema.org/InStock" />In Stock
        </div>
        Product details
        <span itemprop="numberOfPages">224</span> pages
        Publisher: <span itemprop="publisher">Little, Brown, and Company</span> -
        <meta itemprop="datePublished" content="1991-05-01" />May 1, 1991
        Language: <span itemprop="inLanguage">English</span>
        ISBN-10: <span itemprop="isbn">0316769487</span>
    </div>
...
</body>

Does not work:

<body>
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        Price: <span itemprop="price" content="6.99">$6.99</span>
        <meta itemprop="priceCurrency" content="USD" />
        <link itemprop="availability" href="http://schema.org/InStock" />In Stock
        <div itemprop="itemOffered" itemscope itemtype="http://schema.org/Book">
            <link itemprop="additionalType" href="http://schema.org/Product" />
            <img itemprop="image" src="catcher-in-the-rye-book-cover.jpg" alt="cover art: red horse, city in background" />
            <span itemprop="name">The Catcher in the Rye</span> -
            <link itemprop="bookFormat" href="http://schema.org/Paperback">Mass Market Paperback
            by <a itemprop="author" href="/author/jd_salinger.html">J.D. Salinger</a>
            Product details
            <span itemprop="numberOfPages">224</span> pages
            Publisher: <span itemprop="publisher">Little, Brown, and Company</span> -
            <meta itemprop="datePublished" content="1991-05-01" />May 1, 1991
            Language: <span itemprop="inLanguage">English</span>
            ISBN-10: <span itemprop="isbn">0316769487</span>
        </div>
    </div>
...
</body>
@mfhepp mfhepp self-assigned this Jul 9, 2015
@vholland
Copy link
Contributor

vholland commented Jul 9, 2015

We should encourage the use of multiple types. Otherwise, we will need to expand the domain for many properties related to Product.

@jvandriel
Copy link

+1 for MTEs (note: Google's Search Console reports MTEs successfully, it's only their Structured Data Testing Tool that can't handle them yet)

@Dataliberate
Copy link
Contributor

Another +1 for MTEs

On 9 Jul 2015, at 15:49, jvandriel <notifications@github.commailto:notifications@github.com> wrote:

+1 for MTEs

@jvandriel
Copy link

By the way, why does schema.org/CreativeWork have the offer property, wouldn't it make more sense to remove it from schema.org/CreativeWork?

I feel the proper way to express this would be by using an MTE as well: [Product, Game] > offers > Offer. Being able to express Review > offers > Offer doesn't add any value in my opinion and makes as much sense to me as expressing a Volcano has a faxNumber.

@danbri
Copy link
Contributor

danbri commented Feb 22, 2016

Bumping this, as the general case of 'offers' and 'itemOffered' being near-but-not-quite inverses hasn't gone away.

See also https://plus.google.com/+Evgeniy-Orlov/posts/fYFQEAv4jPL for a recent report.

Are there any reasons to not want to align all the associated types and declare these properties to simply be inverses of each other? They do appear at first reading to just mean the same thing in either direction.

@danbri
Copy link
Contributor

danbri commented Nov 13, 2019

I keep bumping into this. My 2019 proposal is that we copy over the ugly list of types, for backwards compatibility, and declare these formal inverses. The definitions should also mention that while a few kinds of offerable thing are listed, others are possible and can be expressed with multiple typing (i.e. Product and its subtypes).

danbri added a commit that referenced this issue Nov 13, 2019
Both properties now have the same list of commonly offered types, and
both also expect to be used with Demand. Added explicit mention of
businessFunction, to encourage its use. /cc @mfhepp @vtardif
@danbri
Copy link
Contributor

danbri commented Nov 13, 2019

Ok I have made them fully inverse of each other. This meant that 'offers' also needed to acquire mention of being used with Demand.

@github-actions
Copy link

This issue is being tagged as Stale due to inactivity.

@github-actions github-actions bot added the no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).
Projects
None yet
Development

No branches or pull requests

5 participants