schemaorg / schemaorg

Schema.org - schemas and supporting software
https://schema.org/
Apache License 2.0
5.3k stars 813 forks source link

Consider replacing GS1 examples on the extensions page #1278

Open Aaranged opened 7 years ago

Aaranged commented 7 years ago

The page describing the extension mechanism... http://schema.org/docs/extension.html ... was published prior to the release of the GS1 Vocabulary.

Now that the GS1 Vocabulary is live, might it not be a good thing to replace the provisional data that was used for the GS1 example with one that uses the actual GS1 Vocabulary URI (http://www.gs1.org/voc/), and actual classes and properties from the Vocabulary?

danbri commented 7 years ago

Yes, it needs an update.

ekgs1 commented 7 years ago

I can provide an updated example.

danbri commented 7 years ago

That'd be great. As discussed previously with Mark at least, there are really two equal deployment scenarios. One in which schema.org is viewed like an extension to your schemas, and the other vice-versa. From a schema.org point of view it would be good if the bulk of a description could be understood by a generic schema.org consumer that doesn't know about GS1. And we'd layer the GS1 JSON-LD context on top for extras like cheeseFirmness. However in a more GS1-centric environment it would be natural to reverse this, and use a more GS1-centric representation.

Actually JSON-LD both complicates and enriches this picture here, as the indirection provided by context files make a few more possibilities available than e.g. RDFa has. Microdata is probably the least expressive environment. It would be good to share new examples here first in rough form first, before worrying too much about the specific docs/extension.html content.

ekgs1 commented 7 years ago

MixedVocabExample.txt I expect the majority of cases would be where the GS1 Vocabulary is an extension of schema.org. I am attaching an updated JSON-LD example.

radusi commented 7 years ago

MixedVocabExample.txt is great, but because gs1:FoodBeverageTobaccoProduct is still too general to describe a red wine ( for example ), an example how to use wikidata along with schema.org and gs1 would be highly appreciated ( I tryied for a Red wine, but did not arrived anywhere ). Many thanks in advance.

mgh128 commented 7 years ago

Hi @radusi, gs1:FoodBeverageTobaccoProduct has the following subclasses: gs1:Beverage gs1:FruitsVegetables gs1:Seafood gs1:MeatPoultry gs1:MilkButterCreamYogurtCheeseEggsSubstitutes

Additional properties are defined having these subclasses as their rdfs:domain For example, gs1:percentageOfAlcoholByVolume and gs1:vinter and gs1:beverageVintage

Our GS1 SmartSearch tool for preparing JSON-LD markup should go live on the gs1.org website by next week at the latest. We have considered very useful feedback from @danbri and @lanthaler on an earlier version. The release version of the tool can produce markup either using only the GS1 SmartSearch web vocabulary in isolation - or using schema.org classes and properties where possible, only resorting to using GS1 classes and properties for details that cannot currently be specified in schema.org alone. We have done a complete overhaul of the way the markup tool works, to now keep our JSON-LD context header very small and scalable; our JSON-LD markup now uses inline datatype coercion for values of types such as xsd:float, xsd:integer and inline language tagging for all values that are of type rdf:langString

Our JSON-LD markup tool has demo buttons available for each product category, to populate the form fields with some plausible example values, so that example markup can quickly be generated without lots of typing. This JSON-LD markup tool complements the online browsable documentation for the GS1 SmartSearch web vocabulary, which is already available at [ http://gs1.org/voc/ ]

I'd add a further point about describing more specific product categories. GS1 maintains the GPC (Global Product Classification) system [ http://www.gs1.org/gpc ] which specifies numeric code values (GPC bricks, e.g. 10000276 for Still Wine ) as well as attribute - value pairs for further details. The GS1 SmartSearch vocabulary includes two properties:

gs1:gpcCategoryCode gs1:gpcCategoryDescription

that relate to the numeric GPC brick code (e.g. 10000276) and the corresponding category description (which supports multilingual values).

GPC brick codes and attribute-value pairs can be found at [ http://www.gs1.org/1/productssolutions/gdsn/gpc/browser/ ] and the forthcoming GS1 SmartSearch JSON-LD markup tool also includes basic support for GPC lookup based on a single keyword search, currently provided that the keyword is in English. e.g. a keyword such as 'cheese' or 'jacket'. Multilingual keyword lookup might be added to the GS1 JSON-LD markup tool in future.

I hope this helps. If anyone has any questions about using the GS1 SmartSearch web vocabulary (also in combination with schema.org), @ekgs1 and I ( @mgh128 ) are happy to help. As soon as the GS1 SmartSearch JSON-LD markup tool is live, we'll post the link here. The tool is now ready to go - just waiting for our web team to host it.

radusi commented 7 years ago

@mgh128 & @ekgs1 . Many thanks for details. I'll go ahead with it, however, I'd have some proposals for Beverage, if you're open to it, based on my former and actual collaborations with Vivino.com and winearomawheel.com of Dr. Ann C. Noble. What would be the contact address ?

radusi commented 7 years ago

@ekgs1 @mgh128

Shouldn't

"alcoholicBeverageSubregion": [ { "@value": "IT-TV", // allow multiple ISO 3166:2 regions like [ "IT-TV", "IT-VE", "IT-VI", "IT-PD", "IT-BL", "IT-GO", "IT-PN", "IT-TN", "IT-UD" ], "@language": "en" } ],

"@value": allow multiple ISO 3166:2 regions like [ "IT-TV", "IT-VE", "IT-VI", "IT-PD", "IT-BL", "IT-GO", "IT-PN", "IT-TN", "IT-UD" ], ?

I got error when validating it

Reason : in beverage, Subregions span over multiple ISO 3166:2 regions.

Ex. http://www.prosecco.wine/prosecco-doc/production-area

Cheers,

ekgs1 commented 7 years ago

alcoholicBeverageSubregion has a range of rdf:langString and should allow for multiple ISO 3166:2 entries providing you include a language. The reason it has a range of langString is that not all sub-regions can be described using the ISO codes. The definition for the property is a bit misleading in regards to using the ISO codes and we will take a note to update it in the future.

By the way where are you getting validation errors and what are the errors you are receiving?

Regarding your proposals for beverages you can forward them to eric.kauz@gs1.org. I would be happy to review them.

Best Regards

Eric

github-actions[bot] commented 3 years ago

This issue is being tagged as Stale due to inactivity.