Skip to content

Instantly share code, notes, and snippets.

@danbri
Created June 14, 2016 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbri/79625878bfbbc1ad098ddd91520aa573 to your computer and use it in GitHub Desktop.
Save danbri/79625878bfbbc1ad098ddd91520aa573 to your computer and use it in GitHub Desktop.
This file documents differences between v2.2 and v3.0 of schema.org at the level of triples in the schema definitions.
The *vast* majority of differences were from the movement of medical/health terms into an extension. At this point the only
differences that are examined are subtractions: things that are missing in v3 but which were asserted in v2.2.
Misc notes to investigate later:
* Properties 'aspect', 'availableService', 'overview' in health-lifesci could be generalized.
* Grammar fix? in schema:structuralClass a rdf:Property ; rdfs:comment "The name given to how bone physically connects to each other." (bones?)
* The 'subtype' property in health-lifesci extension is confusingly named, consider renaming with a less general name.
Rough notes on non-medical changes, from looking at which triples were dropped from v3 vs v2.2 follow.
Some of these are just comments on changes noted, others (flagged TODO) are bugs in v3 and need fixing asap.
Some obvious changes are not noted e.g. gtin* properties were reworded and therefore show up in the diff. Others are noted
and marked 'ok'.
1.) schema:description rdfs:comment ... "a description" vs "a short description"
This is OK - this is from https://github.com/schemaorg/schemaorg/pull/891/files in v3 https://github.com/schemaorg/schemaorg/issues/880
2.) gender
This OK
Note that we added mention of /Male, /Female and strings.
Optional TODO: mention this in conformance section re expecting unexpected in docs/datamodel.html as similar issues
cropped up with opening hours and Monday-Friday URLs vs strings.
3.) TODO: genre
We lost URL as values,
schema:genre schema:rangeIncludes schema:URL . was removed in v3.
See http://schema.org/docs/releases.html#g346 from v2.1. Should be restored.
4.) ingredients - this was already restored.
Addressed as a quick fix in http://schema.org/docs/releases.html#g1174
schema:ingredients a rdf:Property ;
rdfs:label "ingredients" ;
schema:domainIncludes schema:Recipe ;
schema:rangeIncludes schema:Text ;
schema:supersededBy schema:recipeIngredient ;
rdfs:comment "A single ingredient used in the recipe, e.g. sugar, flour or garlic." .
... has this gone? seems to be in v3 too.
5.) schema:mainEntityOfPage --- whitespace changed <br> - assume this is OK, markdown related.
6.) TODO: check status of manufacturer ... we restored this as a quick fix too, looking at diff of data/schema.org vs data/releases/3.0/schema.rdfa
7.) netWorth - ok
2.2 was
schema:netWorth rdfs:comment "The total financial value of the person as calculated by subtracting assets from liabilities." .
now
schema:netWorth schema:rangeIncludes schema:MonetaryAmount ;
rdfs:comment "The total financial value of the organization or person as calculated by subtracting assets from liabilities." .
This is OK. Change was FIBO motivated.
../scripts/rdfa2nt ./schema.rdfa | grep netWorth
<http://schema.org/netWorth> <http://www.w3.org/2000/01/rdf-schema#comment> "The total financial value of the organization or person as calculated by subtracting assets from liabilities." .
<http://schema.org/netWorth> <http://schema.org/rangeIncludes> <http://schema.org/PriceSpecification> .
<http://schema.org/netWorth> <http://www.w3.org/2000/01/rdf-schema#label> "netWorth" .
<http://schema.org/netWorth> <http://schema.org/domainIncludes> <http://schema.org/Person> .
<http://schema.org/netWorth> <http://schema.org/rangeIncludes> <http://schema.org/MonetaryAmount> .
<http://schema.org/netWorth> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
8.) openingHours text changed: TODO, double-check this. It looks ok as uses language of "general" (vs special) which was introduced for v3.0.
2.2: schema:openingHours rdfs:comment "The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.<br />- Days are specified using the following two-letter combinations: <code>Mo</code>, <code>Tu</code>, <code>We</code>, <code>Th</code>, <code>Fr</code>, <code>Sa</code>, <code>Su</code>.<br />- Times are specified using 24:00 time. For example, 3pm is specified as <code>15:00</code>. <br />- Here is an example: <code>&lt;time itemprop=&quot;openingHours&quot; datetime=&quot;Tu,Th 16:00-20:00&quot;&gt;Tuesdays and Thursdays 4-8pm&lt;/time&gt;</code>. <br />- If a business is open 7 days a week, then it can be specified as <code>&lt;time itemprop=&quot;openingHours&quot; datetime=&quot;Mo-Su&quot;&gt;Monday through Sunday, all day&lt;/time&gt;</code>." .
3.0: schema:openingHours rdfs:comment "The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.<br />- Days are specified using the following two-letter combinations: <code>Mo</code>, <code>Tu</code>, <code>We</code>, <code>Th</code>, <code>Fr</code>, <code>Sa</code>, <code>Su</code>.<br />- Times are specified using 24:00 time. For example, 3pm is specified as <code>15:00</code>. <br />- Here is an example: <code>&lt;span itemprop=&quot;openingHours&quot; content=&quot;Tu,Th 16:00-20:00&quot;&gt;Tuesdays and Thursdays 4-8pm&lt;/span&gt;</code>. <br />- If a business is open 7 days a week, then it can be specified as <code>&lt;span itemprop=&quot;openingHours&quot; content=&quot;Mo-Su&quot;&gt;Monday through Sunday, all day&lt;/span&gt;</code>." .
9.) TODO: affiliation was subpropertyOf memberOf
Established in 2.1 via http://schema.org/docs/releases.html#g596 (Documented that affiliation is a sub-property of memberOf.)
1212 Removed: schema:affiliation rdfs:subPropertyOf schema:memberOf .
TODO: confirm and restore.
10.) prepTime - TODO: link ISO
2.2: schema:prepTime rdfs:comment "The length of time it takes to prepare the recipe, in <a href='http://en.wikipedia.org/wiki/ISO_8601'>ISO 8601 duration format</a>." .
3.0: schema:prepTime rdfs:comment "The length of time it takes to prepare the recipe, in ISO 8601 duration format." .
11.) TODO: restore schema:publisher schema:rangeIncludes schema:Person .
schema:publisher schema:rangeIncludes schema:Person . has gone. - noted in #1198.
12.) recipeCategory - ok
2.2: schema:recipeCategory rdfs:comment "The category of the recipe&#x2014;for example, appetizer, entree, etc." .
3.0: schema:recipeCategory rdfs:comment "The category of the recipe—for example, appetizer, entree, etc." .
13.) schemaVersion - ok
2.2: schema:schemaVersion rdfs:comment "Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using a URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. " .
3.0: schema:schemaVersion rdfs:comment "Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. " .
14.) sponsor domainIncludes - ok
2.2: schema:sponsor schema:domainIncludes schema:MedicalStudy ;
rdfs:comment "Sponsor of the study." .
3.0: schema:sponsor schema:domainIncludes schema:Event,
schema:Organization,
schema:Person ;
schema:rangeIncludes schema:Person ;
rdfs:comment "A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event." .
15.) totalTime - TODO link ISO
2.2: schema:totalTime rdfs:comment "The total time it takes to prepare and cook the recipe, in <a href='http://en.wikipedia.org/wiki/ISO_8601'>ISO 8601 duration format</a>." .
3.0: schema:totalTime rdfs:comment "The total time it takes to prepare and cook the recipe, in ISO 8601 duration format." .
16.) translator - ok
2.2: schema:translator rdfs:comment "Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market." .
3.0: schema:translator schema:domainIncludes schema:Event ;
rdfs:comment "Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event." .
17.) urlTemplate - ok
2.2: schema:urlTemplate rdfs:comment "A url template (RFC6570) that will be used to construct the target of the execution of the action." .
3.0: schema:urlTemplate rdfs:comment "An url template (RFC6570) that will be used to construct the target of the execution of the action." .
18.) validThrough - ok
Fibo.
2.2: schema:validThrough rdfs:comment "The end of the validity of offer, price specification, or opening hours data." .
3.0: schema:validThrough schema:domainIncludes schema:JobPosting,
schema:MonetaryAmount ;
rdfs:comment "The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours." .
19.) value - ok
Fibo.
2.2: schema:value rdfs:comment "The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'." .
3.0: schema:value schema:domainIncludes schema:MonetaryAmount ;
rdfs:comment """The value of the quantitative value or property value node.<br/>
For QuantitativeValue and MonetaryValue, the recommended type for values is 'Number'. <br/>
For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.""" .
20.) vehicleSeatedCapacity - ok
We added a '.'.
2.2: schema:vehicleSeatingCapacity rdfs:comment """The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.<br />
Typical unit code(s): C62 for persons """ .
3.0: schema:vehicleSeatingCapacity rdfs:comment """The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.<br />
Typical unit code(s): C62 for persons.""" .
21.) videoFormat TODO: restore #577 http://schema.org/docs/releases.html#g577
In 2.1 we had http://schema.org/docs/releases.html#g577 "Amended videoFormat to indicate that it is expected on BroadcastEvent and ScreeningEvent, rather than TelevisionStation."
TODO: Restore per 2.2.
2.2: schema:videoFormat schema:domainIncludes schema:BroadcastEvent,
schema:BroadcastService .
3.0: schema:videoFormat schema:domainIncludes schema:TelevisionStation .
22.) Language - ok
As intended - http://schema.org/docs/releases.html#g341
2.2: schema:Language rdfs:comment "Natural languages such as Spanish, Tamil, Hindi, English, etc. and programming languages such as Scheme and Lisp." .
3.0: schema:Language rdfs:comment "Natural languages such as Spanish, Tamil, Hindi, English, etc. Formal language code tags expressed in [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) can be used via the [[alternateName]] property. The Language type previously also covered programming languages such as Scheme and Lisp, which are now best represented using [[ComputerLanguage]]." .
23.) GR credits - ok
e.g. in 2.2 we had schema:Product ns1:source <http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsProperties> .
...we now have schema:Product ns1:source <http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms> .
This is as intended, since per-property pages were added, and we moved to a generic piece of acknowledgement text for types and properties.
24.) Recipe - ok
2.2: schema:Recipe rdfs:comment "A recipe." .
3.0: schema:Recipe rdfs:comment """A recipe. For dietary restrictions covered by the recipe,
a few common restrictions are enumerated via <a href="/suitableForDiet">suitableForDiet</a>.
The <a href="/keywords">keywords</a> property can also be used to add more detail.""" .
As intended.
25.) containsPlace inverseOf ... - ok
It was inverseOf itself previously.
2.2: schema:containsPlace schema:inverseOf schema:containsPlace .
3.0: schema:containsPlace schema:inverseOf schema:containedInPlace .
26.) includedDataCatalog - ok
As intended.
2.2: schema:includedDataCatalog rdfs:comment "A data catalog contained in the dataset." .
3.0: schema:includedDataCatalog schema:supersededBy schema:includedInDataCatalog ;
rdfs:comment "A data catalog which contains this dataset (this property was previously 'catalog', preferred name is now 'includedInDataCatalog')." .
We now have
schema:includedInDataCatalog a rdf:Property ;
rdfs:label "includedInDataCatalog" ;
schema:domainIncludes schema:Dataset ;
schema:inverseOf schema:dataset ;
schema:rangeIncludes schema:DataCatalog ;
rdfs:comment "A data catalog which contains this dataset." .
27.) parentOrganization - TODO repair and restore.
To be restored.
Unwanted rollback of http://schema.org/docs/releases.html#g535 ("Broadened domain of parentOrganization to allow any Organization, rather than only LocalBusiness. Noted parentOrganization and subOrganization as inverses.")
2.2: schema:parentOrganization schema:inverseOf schema:subOrganization ;
rdfs:comment "The larger organization that this organization is a branch of, if any." .
3.0: schema:parentOrganization rdfs:comment "The larger organization that this local business is a branch of, if any." .
schema:subOrganization schema:inverseOf schema:parentOrganization . ...was also dropped in v3.0.
28.) Enumeration - html entity - ok
schema:Enumeration rdfs:comment ... removed HTML entity markup in v3. This is ok.
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment