structured-data linter update

I'm happy to announce an update to the structured-data linter [1]. Manu Sporny, Stéphan Corlosquet and I originally released this a couple of years ago, when there was some confusion over RDFa Lite and microdata when using schema.org and data-vocabulary. Since then, it's been updated with targetted vocabulary entailment, allowing better matching for snippet generation, and much better linter messages. For the most part, examples come from schema.rdfs.org [2], which I believe are based on the original schema.org examples.

The linter builds in vocabulary definitions for schema.org, good-relations, dublin core metadata terms, SIOC, FOAF, data-vocabulary and a number of others. Linting is performed by entailing all rdf:type triples, and checking property usage to ensure appropriate domain and range using either rdfs:domain/rdfs:range or schema:domainIncludes/schema:rangeIncludes. Owl union subclasses are turned into either domainIncludes or rangeIncludes. If a subject has no rdf:type definition, it is inferred, where possible, from domain/range, or domainIncludes/rangeIncludes in the case that there is only one such definition.

The tool supports most RDF serialization formats, but the examples are typically for RDFa, microdata and JSON-LD. Linting and snippet generation are performed by turning the datasource into an RDF graph, and matching patterns based on closest rdf:type found.

It's interesting to note that quite a number of the schema.org examples have lint errors; for example <http://linter.structured-data.org/examples/schema.org/CreativeWork-Advanced.rdfa.html> generates the following linter messages:

* property schema:mainContentOfPage: Object must have some type defined as range (schema:WebPageElement)
* property schema:numPages: No property definition found
* property schema:publisher: Object must have some type defined as range (schema:Organization)
* property schema:publishDate: No property definition found
* property schema:reviewRating: Object must have some type defined as range (schema:Rating)
* property schema:author: Object must have some type defined as range (schema:Organization,schema:Person)

These all seem to be legitimate problems with the example, according to the RDFa definition of the schema.org vocabulary [3].

Gregg Kellogg
gregg@greggkellogg.net

[1] http://linter.structured-data.org
[2] https://github.com/mhausenblas/schema-org-rdf/tree/master/examples
[3] http://schema.org/docs/schema_org_rdfa.html

Received on Monday, 6 January 2014 18:40:31 UTC