Richard Cyganiak — DERI Friday Talk, 26 July 2013

WHAT'S NEW IN RDF 1.1?
World Wide Web Consortium (W3C)
• Standards body responsible for the Web
• DERI is a member
• What W3C can do for you:
Member submissions
– Community Groups
– Work with experts, network, see how the sausage
is made
Today
• RDF — A quick overview
• What's new in RDF 1.1?
– JSON-LD

• The controversies and stuff that didn't make it
RDF — A quick intro
Why RDF?
•
•
•
•

A data model for the Web
Can represent data from other data models
Easy to integrate data from multiple sources
Graphs, not tables or trees
How it works
How it works
How it works
How it works
How it works
Foundation for a family of standards
•
•
•
•
•
•
•
•

SPARQL: Querying RDF data
RDF Schema: Documenting the meaning of RDF data
OWL: Formalizing the meaning of RDF data
RDF/XML: Writing RDF data in XML
RDFa: Embed RDF data in HTML
R2RML: Mapping relational data to RDF
GRDDL: Mapping XML data to RDF
DC, Org, FOAF, SIOC, DCAT, VoID, …:
Describe particular domains as RDF data
What's new in RDF 1.1?
RDF 1.1
• First update since 2004
• RDF-WG started in 2011, expected to end
2013
• Chartered to do:
– Maintenance
– Fixing some well-known issues
– "Paving the cowpaths"

• Nothing new in RDF Schema and RDF/XML
RDF datasets
A.k.a Named Graphs, Quads
http://svn.foaf-project.org/foaftown/2009/layers/visuals/layercake2.jpg
RDF Datasets
• Adopted from SPARQL — "Named Graphs"
• Two data structures:
– RDF graph
– RDF dataset

• Multiple RDF graphs, each named with a URI
• A.k.a “quads”
• Unnamed “default graph”
– can be used for metadata

• Applications:
integration, provenance, versioning, …
Datatypes
• xsd:duration, xsd:dayTimeDuration, xsd:yearMonthDuration
• xsd:dateTimeStamp
– Unlike xsd:dateTime, the time zone is not optional

• rdf:langString
– "Hello"@en now has a datatype

• rdf:HTML
– "E=mc<sup>2</sup>"^^rdf:HTML
– Problem: No language tag!

• rdf:XMLLiteral
– No longer needs to be canonical XML

• xsd:string
– "xxx" and "xxx"^^xsd:string are now 100% the same thing
Syntaxes
• Turtle
– Now SPARQL compatible

• TriG
– Turtle with named graphs

• N-Triples
– WG Note

• N-Quads
– WG Note

• JSON-LD
JSON-LD
{
"id": "markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"
}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage": "http://schema.org/url"
},
"id": "markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"
}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage": "http://schema.org/url"
},
"@id": "/people/markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"
}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage": "http://schema.org/url"
},
"@id": "/people/markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"
}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage": "http://schema.org/url"
},
"@id": "/people/markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": { "@id": "http://www.markus-lanthaler.com/" }
}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage":
{"@id": "http://schema.org/url", "@type": "@id" },
},
"@id": "/people/markus",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"

}
{
"@context": {
"firstname": "http://schema.org/givenName",
"lastname": "http://schema.org/familyName",
"homepage":
{"@id": "http://schema.org/url", "@type": "@id" }
},
"@id": "/people/markus",
"@type": "http://schema.org/Person",
"firstname": "Markus",
"lastname": "Lanthaler",
"homepage": "http://www.markus-lanthaler.com/"
}
Example from Markus Lanthaler,
http://www.slideshare.net/lanthaler/building-next-generation-web-ap-is-with-jsonld-and-hydra
The controversies
and stuff that didn't make it
Deprecating some of the bad stuff
•
•
•
•
•

Reification
rdf:Alt, rdf:Bag, rdf:Seq
RDF/XML 
rdf:value
For every bad feature, there is a vocal user
who can't live without it
Literals as subjects
• 1 math:lessThan 2
• "2013"^^xsd:gYear time:isBefore "2014"^^xsd:gYear
• "Galway" ex:isTitleOf<http://dbpedia.org/resource/Galway>

• Most specs and implementations could be
easily adapted to allow this
• Not worth it
Semantics of RDF datasets
• What logical statements does an RDF dataset
make?
– How can we reason over them?

• In a named graph, what is the relationship
between the graph name URI and the RDF graph?
– Same as? Is described by? Contains?

• No solution fits all use cases. It's left unspecified.
– No standard way to reason over RDF datasets
Nested and anonymous graphs
• What about: "Bob said that Alice said XXX"?
• Should we allow graphs as a new type of node
in RDF triples?
– URIs, literals, blank nodes, RDF graphs

• Little implementation experience (but N3!)
• Requires new DBs, different query language

What's New in RDF 1.1?

  • 1.
    Richard Cyganiak —DERI Friday Talk, 26 July 2013 WHAT'S NEW IN RDF 1.1?
  • 2.
    World Wide WebConsortium (W3C) • Standards body responsible for the Web • DERI is a member • What W3C can do for you: Member submissions – Community Groups – Work with experts, network, see how the sausage is made
  • 3.
    Today • RDF —A quick overview • What's new in RDF 1.1? – JSON-LD • The controversies and stuff that didn't make it
  • 4.
    RDF — Aquick intro
  • 5.
    Why RDF? • • • • A datamodel for the Web Can represent data from other data models Easy to integrate data from multiple sources Graphs, not tables or trees
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
    Foundation for afamily of standards • • • • • • • • SPARQL: Querying RDF data RDF Schema: Documenting the meaning of RDF data OWL: Formalizing the meaning of RDF data RDF/XML: Writing RDF data in XML RDFa: Embed RDF data in HTML R2RML: Mapping relational data to RDF GRDDL: Mapping XML data to RDF DC, Org, FOAF, SIOC, DCAT, VoID, …: Describe particular domains as RDF data
  • 12.
    What's new inRDF 1.1?
  • 13.
    RDF 1.1 • Firstupdate since 2004 • RDF-WG started in 2011, expected to end 2013 • Chartered to do: – Maintenance – Fixing some well-known issues – "Paving the cowpaths" • Nothing new in RDF Schema and RDF/XML
  • 14.
  • 15.
  • 16.
    RDF Datasets • Adoptedfrom SPARQL — "Named Graphs" • Two data structures: – RDF graph – RDF dataset • Multiple RDF graphs, each named with a URI • A.k.a “quads” • Unnamed “default graph” – can be used for metadata • Applications: integration, provenance, versioning, …
  • 17.
    Datatypes • xsd:duration, xsd:dayTimeDuration,xsd:yearMonthDuration • xsd:dateTimeStamp – Unlike xsd:dateTime, the time zone is not optional • rdf:langString – "Hello"@en now has a datatype • rdf:HTML – "E=mc<sup>2</sup>"^^rdf:HTML – Problem: No language tag! • rdf:XMLLiteral – No longer needs to be canonical XML • xsd:string – "xxx" and "xxx"^^xsd:string are now 100% the same thing
  • 18.
    Syntaxes • Turtle – NowSPARQL compatible • TriG – Turtle with named graphs • N-Triples – WG Note • N-Quads – WG Note • JSON-LD
  • 19.
  • 20.
    { "id": "markus", "firstname": "Markus", "lastname":"Lanthaler", "homepage": "http://www.markus-lanthaler.com/" }
  • 21.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": "http://schema.org/url" }, "id": "markus", "firstname": "Markus", "lastname": "Lanthaler", "homepage": "http://www.markus-lanthaler.com/" }
  • 22.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": "http://schema.org/url" }, "@id": "/people/markus", "firstname": "Markus", "lastname": "Lanthaler", "homepage": "http://www.markus-lanthaler.com/" }
  • 23.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": "http://schema.org/url" }, "@id": "/people/markus", "firstname": "Markus", "lastname": "Lanthaler", "homepage": "http://www.markus-lanthaler.com/" }
  • 24.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": "http://schema.org/url" }, "@id": "/people/markus", "firstname": "Markus", "lastname": "Lanthaler", "homepage": { "@id": "http://www.markus-lanthaler.com/" } }
  • 25.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": {"@id": "http://schema.org/url", "@type": "@id" }, }, "@id": "/people/markus", "firstname": "Markus", "lastname": "Lanthaler", "homepage": "http://www.markus-lanthaler.com/" }
  • 26.
    { "@context": { "firstname": "http://schema.org/givenName", "lastname":"http://schema.org/familyName", "homepage": {"@id": "http://schema.org/url", "@type": "@id" } }, "@id": "/people/markus", "@type": "http://schema.org/Person", "firstname": "Markus", "lastname": "Lanthaler", "homepage": "http://www.markus-lanthaler.com/" } Example from Markus Lanthaler, http://www.slideshare.net/lanthaler/building-next-generation-web-ap-is-with-jsonld-and-hydra
  • 27.
    The controversies and stuffthat didn't make it
  • 28.
    Deprecating some ofthe bad stuff • • • • • Reification rdf:Alt, rdf:Bag, rdf:Seq RDF/XML  rdf:value For every bad feature, there is a vocal user who can't live without it
  • 29.
    Literals as subjects •1 math:lessThan 2 • "2013"^^xsd:gYear time:isBefore "2014"^^xsd:gYear • "Galway" ex:isTitleOf<http://dbpedia.org/resource/Galway> • Most specs and implementations could be easily adapted to allow this • Not worth it
  • 30.
    Semantics of RDFdatasets • What logical statements does an RDF dataset make? – How can we reason over them? • In a named graph, what is the relationship between the graph name URI and the RDF graph? – Same as? Is described by? Contains? • No solution fits all use cases. It's left unspecified. – No standard way to reason over RDF datasets
  • 31.
    Nested and anonymousgraphs • What about: "Bob said that Alice said XXX"? • Should we allow graphs as a new type of node in RDF triples? – URIs, literals, blank nodes, RDF graphs • Little implementation experience (but N3!) • Requires new DBs, different query language