title | author |
---|---|
Specification of the Knowledge Representation Markup Language |
Edward Anderson |
- Specification of the Knowledge Representation Markup Language
This document specifies the Knowledge Representation Markup Language (KRML). It includes go-testmark integration test fixtures, with input scenarios each accompanied by an expected Turtle graph shape and an expected JSON-LD serialisation.
A KRML document is a plain-text Markdown document that complies with the following conventions for structure, format and syntax.
Graphs of triples are composed of nests of either unordered or ordered lists of resources.
- John
- knows
- Paul
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:knows [ rdfs:label "Paul" ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"knows": [
{
"_label": "Paul"
}
]
}
]
}
Objects may be listed in sequence.
- John
- spouse
1. Cynthia
2. Yoko
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:spouse (
[ rdfs:label "Cynthia" ]
[ rdfs:label "Yoko" ]
) .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"spouse": {
"@list": [
{
"_label": "Cynthia"
},
{
"_label": "Yoko"
}
]
}
}
]
}
Comments not intended to be represented in data may be given in HTML.
<!-- Content inside HTML comment tags is ignored. -->
- John
<!-- Consider using foaf:knows -->
- knows
- Paul
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:knows [ rdfs:label "Paul" ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"knows": [
{
"_label": "Paul"
}
]
}
]
}
Definition lists may be use to identify plain text resources in the graph.
- John
- date of birth
- > 1940-10-09 `date`
- born in
- Liverpool
- Paul
- born in
- Liverpool
John
: <http://www.wikidata.org/entity/Q1203>
date of birth
: <https://schema.org/birthDate>
date
: <http://www.w3.org/2001/XMLSchema#date>
born in
: <https://schema.org/birthPlace>
Liverpool
: <http://www.wikidata.org/entity/Q24826>
text/turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.wikidata.org/entity/Q1203> rdfs:label "John" ;
schema:birthPlace <http://www.wikidata.org/entity/Q24826> ;
schema:birthDate "1940-10-09"^^xsd:date .
[] rdfs:label "Paul" ;
schema:birthPlace <http://www.wikidata.org/entity/Q24826> .
<http://www.wikidata.org/entity/Q24826> rdfs:label "Liverpool" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"date%20of%20birth": {
"@id": "https://schema.org/birthDate",
"@container": "@set"
},
"date": {
"@id": "http://www.w3.org/2001/XMLSchema#date",
"@type": "@id"
},
"born%20in": {
"@id": "https://schema.org/birthPlace",
"@container": "@set"
}
}
],
"@graph": [
{
"@id": "http://www.wikidata.org/entity/Q1203",
"_label": "John",
"date%20of%20birth": [
{
"@type": "date",
"@value": "1940-10-09"
}
],
"born%20in": [
{
"@id": "http://www.wikidata.org/entity/Q24826",
"_label": "Liverpool"
}
]
},
{
"_label": "Paul",
"born%20in": [
{
"@id": "http://www.wikidata.org/entity/Q24826",
"_label": "Liverpool"
}
]
}
]
}
Resources may be hyperlinks, plain-text, blockquotes or images.
Hyperlinks are composed of an IRI and, optionally, a label and/or a class. If no label is provided, the resource is labelled with the last segment of the path.
IRIs may be absolute or relative. Resources are resolved relative to the base, which can be set in the document frontmatter.
- [John](http://example.org/john)
- <http://example.org/paul>
- [](http://example.org/george)
- [Ringo][1]
[1]: http://example.org/ringo
text/turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://example.org/john> rdfs:label "John" .
<http://example.org/paul> rdfs:label "paul" .
<http://example.org/george> rdfs:label "george" .
<http://example.org/ringo> rdfs:label "Ringo" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "http://example.org/john",
"_label": "John"
},
{
"@id": "http://example.org/paul",
"_label": "paul"
},
{
"@id": "http://example.org/george",
"_label": "george"
},
{
"@id": "http://example.org/ringo",
"_label": "Ringo"
}
]
}
The language of the label may be specified. Trailing spaces are not preserved. To preserve the trailing space use a whitespace character.
- [John `en`](http://example.org/john)
text/turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://example.org/john> rdfs:label "John"@en .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "http://example.org/john",
"_label": {
"@language": "en",
"@value": "John"
}
}
]
}
The label may be styled.
- [**John**](http://example.org/john)
text/turtle
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://example.org/john> rdfs:label "<p><strong>John</strong></p>"^^rdf:HTML .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "http://example.org/john",
"_label": {
"@type": "_HTML",
"@value": "<p><strong>John</strong></p>"
}
}
]
}
The predicate keyword a
can be provided to specify the rdf:type
of a resource.
- John
- a
- Person
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
a :Person .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"@type": [
"Person"
]
}
]
}
The tokens â
or ^a
may be used to inverse the direction of the class assignment.
- Person
- â
- John
- Paul
- George
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
a :Person .
[] rdfs:label "Paul" ;
a :Person .
[] rdfs:label "George" ;
a :Person .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"@type": [
"Person"
]
},
{
"_label": "Paul",
"@type": [
"Person"
]
},
{
"_label": "George",
"@type": [
"Person"
]
}
]
}
Hyperlinks may include a class by overloading the hyperlink's title
attribute with an IRI or a defined term.
- [John](http://example.org/john "http://example.org/terms/Person")
- [knows](http://xmlns.com/foaf/0.1/knows "http://www.w3.org/2002/07/owl#SymmetricProperty")
- [Paul](http://example.org/paul "Person")
Person
: <https://schema.org/Person>
text/turtle
@prefix : <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://example.org/john> rdfs:label "John" ;
a <http://example.org/terms/Person> ;
foaf:knows <http://example.org/paul> .
<http://example.org/paul> rdfs:label "Paul" ;
a <https://schema.org/Person> .
foaf:knows a owl:SymmetricProperty ;
rdfs:label "knows" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"Person": {
"@id": "https://schema.org/Person",
"@container": "@set"
}
}
],
"@graph": [
{
"@id": "http://example.org/john",
"@type": [
"http://example.org/terms/Person"
],
"_label": "John",
"http://xmlns.com/foaf/0.1/knows": [
{
"@id": "http://example.org/paul",
"@type": [
"Person"
],
"_label": "Paul"
}
]
},
{
"@id": "http://xmlns.com/foaf/0.1/knows",
"@type": [
"http://www.w3.org/2002/07/owl#SymmetricProperty"
],
"_label": "knows"
}
]
}
Subject and object resources in plain text are labelled anonymous (blank node) resources. They can be referred to by their label within the document.
- John
- knows
- Paul
- knows
- John
- Paul
- birth place
- Liverpool
text/turtle
@prefix : <http://example.org/> .
@prefix exterms: <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
_:John rdfs:label "John" ;
exterms:knows _:Paul .
_:Paul rdfs:label "Paul" ;
exterms:knows _:John ;
exterms:birth%20place [ rdfs:label "Liverpool" ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "_:John",
"_label": "John",
"knows": [
{
"@id": "_:Paul",
"_label": "Paul",
"knows": [
{
"@id": "_:John",
"_label": "John"
}
]
}
]
},
{
"@id": "_:Paul",
"_label": "Paul",
"birth%20place": [
{
"_label": "Liverpool"
}
]
}
]
}
Resources that share labels but are unique from each other can be disambiguated by wrapping the label in double quotation marks.
- John
- mother
- "Julia"
- half sister
- "Julia"
- wrote
- Julia
- a
- Song
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:mother [ rdfs:label "Julia" ] ;
:half%20sister [ rdfs:label "Julia" ] ;
:wrote [
rdfs:label "Julia" ;
a :Song
] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"mother": [
{
"_label": "Julia"
}
],
"half%20sister": [
{
"_label": "Julia"
}
],
"wrote": [
{
"_label": "Julia",
"@type": [
"Song"
]
}
]
}
]
}
Plain text resources may be identified with definition lists.
- John
- knows
- Paul
John
: <http://www.wikidata.org/entity/Q1203>
knows
: <http://xmlns.com/foaf/0.1/knows>
text/turtle
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://www.wikidata.org/entity/Q1203> rdfs:label "John" ;
foaf:knows [ rdfs:label "Paul" ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"knows": {
"@id": "http://xmlns.com/foaf/0.1/knows",
"@container": "@set"
}
}
],
"@graph": [
{
"@id": "http://www.wikidata.org/entity/Q1203",
"_label": "John",
"knows": [
{
"_label": "Paul"
}
]
}
]
}
Resources with multiple definitions have the same identity.
- John
John
: <http://www.wikidata.org/entity/Q1203>
: <https://vocab.getty.edu/ulan/500106615>
text/turtle
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://www.wikidata.org/entity/Q1203> rdfs:label "John" ;
owl:sameAs <https://vocab.getty.edu/ulan/500106615> .
<https://vocab.getty.edu/ulan/500106615> rdfs:label "John" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "http://www.wikidata.org/entity/Q1203",
"_label": "John"
},
{
"@id": "http://www.wikidata.org/entity/Q1203",
"_sameAs": [
{
"@id": "https://vocab.getty.edu/ulan/500106615",
"_label": "John"
}
]
}
]
}
Blockquotes contain literal text.
- John
- name
- > John Winston Lennon
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:name "John Winston Lennon" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"name": [
{
"@value": "John Winston Lennon"
}
]
}
]
}
Consecutive paragraphs are concatenated with newline characters.
- John
- description
- > John Winston Ono Lennon was an English singer-songwriter.
>
> Born in Liverpool, Lennon became involved in the skiffle craze.
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:description "John Winston Ono Lennon was an English singer-songwriter.\nBorn in Liverpool, Lennon became involved in the skiffle craze." .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"description": [
{
"@value": "John Winston Ono Lennon was an English singer-songwriter.\nBorn in Liverpool, Lennon became involved in the skiffle craze."
}
]
}
]
}
A preceding sibling hyperlink identifies the blockquote.
- John
- description
- [biography](http://example.org/biography/1)
> Born in Liverpool, Lennon became involved in the skiffle craze as a teenager.
text/turtle
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix exterms: <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
exterms:description <http://example.org/biography/1> .
<http://example.org/biography/1>
a dcmitype:Text ;
rdfs:label "biography" ;
rdf:value "Born in Liverpool, Lennon became involved in the skiffle craze as a teenager." .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"description": [
{
"@id": "http://example.org/biography/1",
"_label": "biography",
"@type": [
"_Text"
],
"_content": {
"@value": "Born in Liverpool, Lennon became involved in the skiffle craze as a teenager."
}
}
]
}
]
}
A plain-text resource may also identify the blockquote in the local scope.
- John
- name
- name a
> John Winston Lennon
- name b
> John Winston Ono Lennon
text/turtle
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix exterms: <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
exterms:name _:a , _:b .
_:a rdfs:label "name a" ;
a dcmitype:Text ;
rdf:value "John Winston Lennon" .
_:b rdfs:label "name b" ;
a dcmitype:Text ;
rdf:value "John Winston Ono Lennon" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"name": [
{
"@id": "_:name%20a",
"_label": "name a",
"@type": [
"_Text"
],
"_content": {
"@value": "John Winston Lennon"
}
},
{
"@id": "_:name%20b",
"_label": "name b",
"@type": [
"_Text"
],
"_content": {
"@value": "John Winston Ono Lennon"
}
}
]
}
]
}
Making a statement about a blockquote reifies it.
- John
- description
- > He gained worldwide fame as the founder, co-lead vocalist and rhythm guitarist of the Beatles.
- source
- [Wikipedia](http://www.wikidata.org/entity/Q52)
text/turtle
@prefix : <http://example.org/terms/> .
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:description [
a dcmitype:Text ;
rdf:value "He gained worldwide fame as the founder, co-lead vocalist and rhythm guitarist of the Beatles." ;
:source <http://www.wikidata.org/entity/Q52>
] .
<http://www.wikidata.org/entity/Q52> rdfs:label "Wikipedia" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"description": [
{
"@type": [
"_Text"
],
"_content": {
"@value": "He gained worldwide fame as the founder, co-lead vocalist and rhythm guitarist of the Beatles."
},
"source": [
{
"@id": "http://www.wikidata.org/entity/Q52",
"_label": "Wikipedia"
}
]
}
]
}
]
}
A BCP47 language tag may be specified in code fences at the end of the line.
- John
- said
- > You may say I'm a dreamer `en`
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:said "You may say I'm a dreamer"@en .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"said": [
{
"@language": "en",
"@value": "You may say I'm a dreamer"
}
]
}
]
}
Styled text is serialised as HTML.
- John
- note
- > **John Winston Ono Lennon** was an English singer, songwriter and musician.
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:note "<p><strong>John Winston Ono Lennon</strong> was an English singer, songwriter and musician.</p>"^^rdf:HTML .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"note": [
{
"@type": "_HTML",
"@value": "<p><strong>John Winston Ono Lennon</strong> was an English singer, songwriter and musician.</p>"
}
]
}
]
}
Specifying the language of styled text attributes the paragraph p
.
- Paul
- note
- > **Sir James Paul McCartney** CH MBE (born 18 June 1942) is an English singer `en`
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "Paul" ;
:note "<p lang=\"en\"><strong>Sir James Paul McCartney</strong> CH MBE (born 18 June 1942) is an English singer</p>"^^rdf:HTML .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "Paul",
"note": [
{
"@type": "_HTML",
"@value": "<p lang=\"en\"><strong>Sir James Paul McCartney</strong> CH MBE (born 18 June 1942) is an English singer</p>"
}
]
}
]
}
Hyperlinks and images inside blockquotes are materialised as references.
- John
- description
- > In 1956, he formed the [Quarrymen](https://en.wikipedia.org/wiki/The_Quarrymen)
text/turtle
@prefix : <http://example.org/terms/> .
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:description [
a dcmitype:Text ;
rdf:value "<p>In 1956, he formed the <a href=\"https://en.wikipedia.org/wiki/The_Quarrymen\">Quarrymen</a></p>"^^rdf:HTML ;
rdfs:seeAlso <https://en.wikipedia.org/wiki/The_Quarrymen>
] .
<https://en.wikipedia.org/wiki/The_Quarrymen> rdfs:label "Quarrymen" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"description": [
{
"@type": [
"_Text"
],
"_content": {
"@type": "_HTML",
"@value": "<p>In 1956, he formed the <a href=\"https://en.wikipedia.org/wiki/The_Quarrymen\">Quarrymen</a></p>"
},
"_seeAlso": [
{
"@id": "https://en.wikipedia.org/wiki/The_Quarrymen",
"_label": "Quarrymen"
}
]
}
]
}
]
}
An arbitrary datatype may be given.
- John
- date of birth
- > 1940-10-09 `date`
text/turtle
@prefix exterms: <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
exterms:date%20of%20birth "1940-10-09"^^exterms:date .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"date%20of%20birth": [
{
"@type": "date",
"@value": "1940-10-09"
}
]
}
]
}
A datatype may be given as a code-fenced reference to a defined term.
- John
- date of birth
- > 1940-10-09 `date`
date
: <http://www.w3.org/2001/XMLSchema#date>
text/turtle
@prefix exterms: <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdfs:label "John" ;
exterms:date%20of%20birth "1940-10-09"^^xsd:date .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"date": {
"@id": "http://www.w3.org/2001/XMLSchema#date",
"@type": "@id"
}
}
],
"@graph": [
{
"_label": "John",
"date%20of%20birth": [
{
"@type": "date",
"@value": "1940-10-09"
}
]
}
]
}
To escape a code-fenced term from being processed as a language or datatype, add a non-breaking space character  
.
- John
- said
- > It's been too long since we took the `time` 
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:said "<p>It's been too long since we took the <code>time</code></p>"^^rdf:HTML .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"said": [
{
"@type": "_HTML",
"@value": "<p>It's been too long since we took the <code>time</code></p>"
}
]
}
]
}
Booleans may be set using the built-in boolean
datatype token.
- John
- alive
- > false `boolean`
text/turtle
@prefix exterms: <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdfs:label "John" ;
exterms:alive false .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"alive": [
{
"@type": "_boolean",
"@value": "false"
}
]
}
]
}
Numbers are detected automatically.
- John
- children
- > 2
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John" ;
:children 2 .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "John",
"children": [
{
"@value": 2
}
]
}
]
}
- ![John Lennon, 1974 (restored cropped)](https://shorturl.at/SacIh)
text/turtle
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://shorturl.at/SacIh> a dcmitype:Image ;
rdfs:label "John Lennon, 1974 (restored cropped)" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "https://shorturl.at/SacIh",
"_label": "John Lennon, 1974 (restored cropped)",
"@type": [
"_Image"
]
}
]
}
Image classes may be specified in the same way as for hyperlink classes.
- Yesterday
- lyrics
- ```text
There are places I remember
All my life, though some have changed
```
text/turtle
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix exterms: <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "Yesterday" ;
exterms:lyrics [
a dcmitype:Text ;
dcterms:format "text" ;
rdf:value """There are places I remember
All my life, though some have changed
""" ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "Yesterday",
"lyrics": [
{
"@type": [
"_Text"
],
"_format": "text",
"_content": {
"@value":"There are places I remember\nAll my life, though some have changed\n"
}
}
]
}
]
}
Another example.
- ```text
.
· ·
· ✦ *
✵ . · · ⋆
✫ ✵ · ✵ ˚
· ✵ . ·
```
- source
- <https://x.com/tiny_star_field/status/1681381641753640960>
text/turtle
@prefix : <http://example.org/terms/> .
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] a dcmitype:Text ;
dcterms:format "text" ;
rdf:value """.
· ·
· ✦ *
✵ . · · ⋆
✫ ✵ · ✵ ˚
· ✵ . ·
""" ;
:source <https://x.com/tiny_star_field/status/1681381641753640960> .
<https://x.com/tiny_star_field/status/1681381641753640960> rdfs:label "1681381641753640960" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@type": [
"_Text"
],
"_format": "text",
"_content": {
"@value": ". \n · · \n · ✦ * \n ✵ . · · ⋆ \n ✫ ✵ · ✵ ˚ \n· ✵ . ·\n"
},
"source": [
{
"@id": "https://x.com/tiny_star_field/status/1681381641753640960",
"_label": "1681381641753640960"
}
]
}
]
}
Tables are handled as HTML. It may be preferable to represent information semantically instead or as well.
- The Beatles
- albums
- | Title | Year |
|- |- |
| Please Please Me | 1963 |
| With the Beatles | 1963 |
| A Hard Day's Night | 1964 |
text/turtle
@prefix exterms: <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
[] rdfs:label "The Beatles" ;
exterms:albums [
a schema:Table ;
rdf:value "<table><thead><tr><th>Title</th><th>Year</th></tr></thead><tbody><tr><td>Please Please Me</td><td>1963</td></tr><tr><td>With the Beatles</td><td>1963</td></tr><tr><td>A Hard Day's Night</td><td>1964</td></tr></tbody></table>"^^rdf:HTML ] .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"_label": "The Beatles",
"albums": [
{
"@type": [
"_Table"
],
"_content": {
"@type": "_HTML",
"@value": "<table><thead><tr><th>Title</th><th>Year</th></tr></thead><tbody><tr><td>Please Please Me</td><td>1963</td></tr><tr><td>With the Beatles</td><td>1963</td></tr><tr><td>A Hard Day's Night</td><td>1964</td></tr></tbody></table>"
}
}
]
}
]
}
Inserting hyperlinks or images into cells will reify the table as a blank node and generate references.
Resolve relative IRIs against the specified base.
---
base: http://example.org/
---
- [John](people/1 "Person")
- [Paul](people/2 "Person")
text/turtle
@base <http://example.org/> .
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<people/1> rdfs:label "John" ;
a :Person .
<people/2> rdfs:label "Paul" ;
a :Person .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@graph": [
{
"@id": "people/1",
"@type": [
"Person"
],
"_label": "John"
},
{
"@id": "people/2",
"@type": [
"Person"
],
"_label": "Paul"
}
]
}
Set the default vocabulary, which can be overriden by local or imported identity definitions.
---
vocab: https://schema.org/
---
- John
- a
- [Person](http://xmlns.com/foaf/0.1/Person)
- knows
- Paul
text/turtle
@prefix : <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
[] a foaf:Person ;
rdfs:label "John" ;
schema:knows [ rdfs:label "Paul" ] .
foaf:Person rdfs:label "Person" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "https://schema.org/"
}
],
"@graph": [
{
"_label": "John",
"@type": [
"http://xmlns.com/foaf/0.1/Person"
],
"knows": [
{
"_label": "Paul"
}
]
},
{
"@id": "http://xmlns.com/foaf/0.1/Person",
"_label": "Person"
}
]
}
Set the default language for all strings, unless overridden in-line.
---
language: en
---
- John
- said
- > I believe in everything until it's disproved
- Yoko
- name
- > 小野 洋子 `jp`
text/turtle
@prefix : <http://example.org/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "John"@en ;
:said "I believe in everything until it's disproved"@en .
[] rdfs:label "Yoko"@en ;
:name "小野 洋子"@jp .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"@language": "en"
}
],
"@graph": [
{
"_label": "John",
"said": [
{
"@language": "en",
"@value": "I believe in everything until it's disproved"
}
]
},
{
"_label": "Yoko",
"name": [
{
"@language": "jp",
"@value": "小野 洋子"
}
]
}
]
}
Import data from another file.
John : <http://www.wikidata.org/entity/Q1203> date : <http://www.w3.org/2001/XMLSchema#date> date of birth : <https://schema.org/birthDate>-- terms.md
---
import: tests/extra/terms.md
---
- John
- date of birth
- > 1940-10-09 `date`
text/turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.wikidata.org/entity/Q1203> rdfs:label "John" ;
schema:birthDate "1940-10-09"^^xsd:date .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/",
"date%20of%20birth": {
"@id": "https://schema.org/birthDate",
"@container": "@set"
},
"date": {
"@id": "http://www.w3.org/2001/XMLSchema#date",
"@type": "@id"
}
}
],
"@graph": [
{
"@id": "http://www.wikidata.org/entity/Q1203",
"_label": "John",
"date%20of%20birth": [
{
"@type": "date",
"@value": "1940-10-09"
}
]
}
]
}
Set the URI of the named graph.
---
id: docs/1
---
application/trig
@base <http://exaple.org/> .
<docs/1> {
}
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"@id": "docs/1",
"@graph": []
}
Set a label for the (un)named graph.
---
title: Lorem Ipsum
---
text/turtle
@prefix ex: <http://example.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[] rdfs:label "Lorem Ipsum" .
application/ld+json
{
"@context": [
{
"@version": 1.1,
"dcmitype": "http://purl.org/dc/dcmitype/",
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"_Dataset": {
"@id": "dcmitype:Dataset"
},
"_HTML": {
"@id": "rdf:HTML"
},
"_Image": {
"@id": "dcmitype:Image"
},
"_Table": {
"@id": "schema:Table"
},
"_Text": {
"@id": "dcmitype:Text"
},
"_boolean": {
"@id": "xsd:boolean"
},
"_content": {
"@id": "rdf:value"
},
"_format": {
"@id": "dcterms:format"
},
"_label": {
"@id": "rdfs:label"
},
"_sameAs": {
"@id": "owl:sameAs",
"@container": "@set"
},
"_seeAlso": {
"@id": "rdfs:seeAlso",
"@container": "@set"
}
},
{
"@base": "http://example.org/",
"@vocab": "http://example.org/terms/"
}
],
"_label": "Lorem Ipsum",
"@graph": []
}