2
\$\begingroup\$

In HTML, structured data is typically added with the syntaxes JSON-LD, Microdata or RDFa. The review of the syntax use is clearly on-topic, just like the use of plain HTML is.

But what about the review of the use of vocabularies/ontologies? The most popular one would be Schema.org. Others are Dublin Core, Open Graph Protocol, FOAF, and many more.

A simple example to clarify

<div typeof="schema:person">
  <p property="schema:name">Alice</p>
  <meta property="schema:parent" content="Bob" />
</div>

HTML: div, p, meta
Structured data syntax (RDFa, extending HTML): typeof, property
Vocabulary/ontology (Schema.org): schema:Person, schema:name, schema:parent

Now, a review of the use of Schema.org could suggest that the type must start with an uppercase P, that the property givenName could be added in addition to the name property, that the Person item would ideally get a URI that uniquely identifies this person, and that the parent property expects a Person item instead of a string value:

<div typeof="schema:Person" resource="#i">
  <p property="schema:name schema:givenName">Alice</p>

  <div property="schema:parent" typeof="schema:Person">
    <meta property="schema:name" content="Bob" />
  </div>

</div>

Example questions

We have a few questions that are (partly) about the use of Schema.org:

Questions about this topic on other Stack Exchange sites

  • If users don’t know how to express something with Schema.org, or if they get warnings/errors in validating tools (like Google’s Structured Data Testing Tool), they can ask on Stack Overflow (tag: schema.org). The same is the case for other vocabularies/ontologies (e.g., foaf, dublin-core, open-graph-protocol etc.).

  • If users have problems with getting a search result feature based on Schema.org (like Google’s rich results), they can ask on Webmasters SE (tag: schema.org). The same is the case for other vocabularies/ontologies and other features (e.g., open-graph-protocol for features in Facebook).

  • If users don’t know which vocabulary/ontology to use, they can ask on Open Data SE (tag: ontology).

Except for possibly Code Review SE, there is no SE site where it’s on-topic for users to post their whole structured data and ask if best practices are followed and if their use of the vocabulary/ontology conveys what they want to convey.

\$\endgroup\$
  • \$\begingroup\$ Related Do configuration files constitute reviewable code? and Are reviews of protocols in scope here? \$\endgroup\$ – Mast Aug 31 at 8:19
  • \$\begingroup\$ I'll flesh that out into an answer later today. \$\endgroup\$ – Mast Aug 31 at 8:20
  • \$\begingroup\$ I don't see why asking if your schema is following best practice would be off-topic here. The schemas I've seen almost defiantly have good/bad practices that would be good to write about in answers. But I wouldn't be surprised if people think the only thing that can be reviewed is object names and go "no it's off-topic cause it has no code". \$\endgroup\$ – Peilonrayz Aug 31 at 20:23
  • \$\begingroup\$ @Peilonrayz Well, this is Code Review and we have meta'd data review already. Data isn't code. SQL is sometimes reviewable, often enough not. So it's not as clear cut as your comment makes it out to be and I'd need more information from OP to give an exact answer. \$\endgroup\$ – Mast Aug 31 at 20:26
  • \$\begingroup\$ @Mast I forget configuration files aren't code. Nope, not even if they're written in Lua, Haskell or anything else. But HTML, CSS and LaTeX are code... These rules look really consistent in being inconsistent. \$\endgroup\$ – Peilonrayz Sep 1 at 0:56
  • \$\begingroup\$ @Peilonrayz Rules can be changed by consensus. Feel free to take it to meta. When done constructively, I could just see a shift in policy coming up. \$\endgroup\$ – Mast Sep 1 at 9:05
  • \$\begingroup\$ @Mast I did and got -2 or something. So no. \$\endgroup\$ – Peilonrayz Sep 1 at 14:48
  • \$\begingroup\$ @Peilonrayz Did you remove it by chance? You realize meta questions don't cost you any points? If you're referring to this, that's not what I had in mind. \$\endgroup\$ – Mast Sep 1 at 17:09
  • \$\begingroup\$ @Mast No - I didn't remove it. Yes that's what I'm on about. Yes I know they cost me no points. There's almost no point in challenging old rules, no-one seems to want anything to change. \$\endgroup\$ – Peilonrayz Sep 2 at 1:04
  • \$\begingroup\$ If the current answer doesn't answer your question, please elaborate. I may be able to expand it further to suit your question. \$\endgroup\$ – Mast Sep 10 at 7:01
2
\$\begingroup\$

But what about the review of the use of vocabularies/ontologies?

The review of vocabularies itself is going to be a very grey area if it's going to be a request for data review instead of code review. First rule of Code Review: there must be code to review. No code, no review. Data is (usually) not code.

We're already quite lenient with that. HTML is on-topic. SQL can be reviewed under certain circumstances as well.

Configurations and protocols however, are not reviewable unless there's some higher action involved (like regular expressions, which are deemed reviewable). Pure interfaces are often not reviewable, unless they provide implementations as well.

Is your code getting something done? Is your code not just a design without implementation? If so, it's likely reviewable. But if it's a simple configuration file, or a data-dump like a JSON or XML, not so much.

Code handling data that's in Schema is of-course quite reviewable. It's code. What kind of data it handles matters not.

Related:

General information with rules and guidelines:

Your specific example doesn't clearly illustrate to me what kind of question you have in mind. If there's anything still unclear, please leave a comment.

\$\endgroup\$
  • \$\begingroup\$ "what kind of question you have in mind." -- The 7 linked questions (neither of which is closed as off-topic) would be examples. Basically, it could be every question about (semantic) HTML markup. "Review my blog post listing page" -- if it has no structured data, an answerer could recommend to use the article element instead of the div element; if it has structured data, the answerer could recommend the same + to use schema:BlogPosting instead of schema:Article. -- In some sense, Schema.org terms could be understood as very specific HTML elements. \$\endgroup\$ – unor Sep 2 at 21:19
  • \$\begingroup\$ @unor So, why don't you post it as HTML question? HTML isn't outlawed and your code containing data (Schema) isn't problematic. As long as there's more than just data (and yes, HTML is a bit of an odd case here). Just don't dump a lot of data that's not being handled by anything. You wouldn't dump a JSON/XML file without code either. \$\endgroup\$ – Mast Sep 3 at 5:35
  • \$\begingroup\$ So, to check if I understand you correctly: 1) You would say the 7 existing questions are on-topic, correct? 2) And answers could suggest improvements to the use of Schema.org terms (e.g., givenName in addition to name), correct? \$\endgroup\$ – unor Sep 10 at 11:30
  • \$\begingroup\$ @unor 1) I'm not saying anything about on-topicness of old questions. That's a minefield. Personally, I think some of them should have more context and are too much focussed on very specific parts of the Schema, but I tend to be somewhat overzealous in that regard. 2) Answers could suggest just about anything, as long as it's about the code provided. So, absolutely. \$\endgroup\$ – Mast Sep 10 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .