0

I am using SPARQL queries to query the data that is marked up using the Schema.org vocabulary. I see that some sites are still using Data-Vocabulary.org for their mark up.

Can I just replace the schema.org with data-vocabulary.org in my SPARQL queries to make the queries work?

Is it only a namespace difference between Schema.org and Data-Vocabulary.org?

unor
  • 92,415
  • 26
  • 211
  • 360
user1965449
  • 2,849
  • 6
  • 34
  • 51

1 Answers1

2

It depends on your queries. If you want to see all triples, it’s sufficient to replace the namespace. But if you query for certain types/properties, it might not be sufficient.

Data-Vocabulary.org and Schema.org are similar vocabularies which often use the same names for types/properties, but not always.

Examples:

unor
  • 92,415
  • 26
  • 211
  • 360
  • often , but not always :) – user1965449 Jan 28 '15 at 14:32
  • is there a way in SPARQL to use the same alias for different namespaces ,i.e. an s for schema.org as well as data-vocabulary.org ? my probelm is that the page is being marked up with properties from both the vocabularies. – user1965449 Jan 28 '15 at 15:10
  • @user1965449: Sounds like a separate question you could ask here on Stack Overflow. Keep in mind that the meaning of the types/properties doesn’t have to be the same just because they have the same name (i.e., a Schema.org property "foo" could mean something totally different than a Data-Vocabulary.org property of the same name; I don’t know any example, but then again I don’t know Data-Vocabulary.org very well). – unor Jan 28 '15 at 15:13
  • 1
    @user1965449 You can't do exactly what you're asking, but you could do, e.g.: `prefix s1: <...> prefix s2: <...> select * where { values ?foo { s1:foo s2:foo } ?subject ?foo ?object }`. – Joshua Taylor Jan 28 '15 at 15:40
  • great idea ! so the values ?foo {s1:foo s2:foo} acts like s1 or s2? Thanks. – user1965449 Jan 28 '15 at 18:00