From 7f185134199cfa83113f9d6c106f02b019bbfc4a Mon Sep 17 00:00:00 2001
From: Gregg Kellogg Simple Triples
predicate, and
object) terms,
forming an RDF triple,
- terminated by a full stop (.).
+ terminated by a period (.).
White space
(spaces,
tabs,
- LF, and/or
- CR)
+ LFs, and/or
+ CRs)
may surround terms,
except where significant as noted in the grammar.
RDF Term Constructors
production type procedure
- IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3.
+ IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
PNAME_NS prefix When used in a prefixID or sparqlPrefix production, the prefix is the potentially empty RDF string matching the first argument of the rule is a key into the namespaces map into which the expanded second argument is stored for future lookup.
- IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI.
- PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace.
+ IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
+ PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
VersionSpecifier literal. The |curVersion| is taken from a literal using the matched RDF string lexical form and `xsd:string` datatype.
STRING_LITERAL_SINGLE_QUOTE lexical form The characters between the outermost 's are taken, after numeric and string escape sequences are replaced with the characters that they represent, to form the RDF string of a lexical form.
STRING_LITERAL_QUOTE lexical form The characters between the outermost "s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
STRING_LITERAL_LONG_SINGLE_QUOTE lexical form The characters between the outermost '''s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
STRING_LITERAL_LONG_QUOTE lexical form The characters between the outermost """s are taken, after numeric and string escape sequences are are replaced with the characters that they represent, to form the RDF string of a lexical form.
- LANG_DIR language tag The characters following the @ form the language tag and optionally the initial text direction, if the matched characters include --.
+ LANG_DIR language tag The characters following the @ form the language tag and optionally the initial text direction,
if the matched characters include --.
The language tag MUST be well-formed according to section 2.2.9 of [[!BCP47]].
If present, the initial text direction MUST be either `ltr` or `rtl`.
RDFLiteral literal The literal has a lexical form of the first rule argument, String. If the '^^' iri rule is matched, the datatype IRI is derived from the iri, and the literal has no language tag. If the LANG_DIR rule is matched, the language tag and initial text direction are taken from LANG_DIR. If there is no initial text direction, the datatype is rdf:langString. If there is a initial text direction, the datatype is rdf:dirLangString. If neither matched, the datatype is xsd:string, and the literal has no language tag.
INTEGER literal The literal has a lexical form of the input string, and a datatype of xsd:integer.
DECIMAL literal The literal has a lexical form of the input string, and a datatype of xsd:decimal.
@@ -2002,6 +2005,15 @@ RDF Term Constructors
+ As processors which detect errors on input can result in
+ graphs which contain fewer triples than are described in the input
+ (including no triples whatsoever),
+ consumers should consider information of any errors signaled
+ when using the resulting graph,
+ which may be incomplete and/or include
+ ill-typed
+ or ill-formed terms.
+
From c5891dc60ee02f496bc40ed4c07d43ae9618d3f0 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
Date: Mon, 21 Jul 2025 09:37:11 -1000
Subject: [PATCH 2/5] Change `RDF12-CONCEPTS#dfn-literal` to
`RDF12-CONCEPTS#dfn-rdf-literal`, which is the correct term to reference.
---
spec/index.html | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/spec/index.html b/spec/index.html
index 4074394..da9fbd2 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -321,7 +321,7 @@ Object Lists
There are four RDF terms defined in RDF Concepts:
IRIs (Internationalized Resource Identifiers),
- literals,
+ literals,
blank nodes, and
triple terms;
Turtle provides a number of ways of writing each.
@@ -538,7 +538,7 @@
IRIs
RDF Literals
- Literals are used to identify values such as strings, numbers, dates.
+ Literals are used to identify values such as strings, numbers, dates.
Turtle compared to SPARQL
- - SPARQL permits RDF Literals
+
- SPARQL permits RDF Literals
as the subject of Triple Patterns.
- SPARQL permits variables (
?name or $name)
in any part of the triple of the form.
@@ -1832,7 +1832,7 @@ Parsing
The RDF 1.2 Concepts and Abstract Syntax specification [[!RDF12-CONCEPTS]] defines four types of RDF terms:
IRIs,
- literals,
+ literals,
blank nodes, and
triple terms.
@@ -1955,17 +1955,17 @@
RDF Term Constructors
PNAME_NS prefix When used in a prefixID or sparqlPrefix production, the prefix is the potentially empty RDF string matching the first argument of the rule is a key into the namespaces map into which the expanded second argument is stored for future lookup.
IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
- VersionSpecifier literal. The |curVersion| is taken from a literal using the matched RDF string lexical form and `xsd:string` datatype.
+ VersionSpecifier literal. The |curVersion| is taken from a literal using the matched RDF string lexical form and `xsd:string` datatype.
STRING_LITERAL_SINGLE_QUOTE lexical form The characters between the outermost 's are taken, after numeric and string escape sequences are replaced with the characters that they represent, to form the RDF string of a lexical form.
STRING_LITERAL_QUOTE lexical form The characters between the outermost "s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
STRING_LITERAL_LONG_SINGLE_QUOTE lexical form The characters between the outermost '''s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
STRING_LITERAL_LONG_QUOTE lexical form The characters between the outermost """s are taken, after numeric and string escape sequences are are replaced with the characters that they represent, to form the RDF string of a lexical form.
LANG_DIR language tag The characters following the @ form the language tag and optionally the initial text direction,
if the matched characters include --.
The language tag MUST be well-formed according to section 2.2.9 of [[!BCP47]].
If present, the initial text direction MUST be either `ltr` or `rtl`.
- RDFLiteral literal The literal has a lexical form of the first rule argument, String. If the '^^' iri rule is matched, the datatype IRI is derived from the iri, and the literal has no language tag. If the LANG_DIR rule is matched, the language tag and initial text direction are taken from LANG_DIR. If there is no initial text direction, the datatype is rdf:langString. If there is a initial text direction, the datatype is rdf:dirLangString. If neither matched, the datatype is xsd:string, and the literal has no language tag.
- INTEGER literal The literal has a lexical form of the input string, and a datatype of xsd:integer.
- DECIMAL literal The literal has a lexical form of the input string, and a datatype of xsd:decimal.
- DOUBLE literal The literal has a lexical form of the input string, and a datatype of xsd:double.
- BooleanLiteral literal The literal has a lexical form of the true or false, depending on which matched the input, and a datatype of xsd:boolean.
+ RDFLiteral literal The literal has a lexical form of the first rule argument, String. If the '^^' iri rule is matched, the datatype IRI is derived from the iri, and the literal has no language tag. If the LANG_DIR rule is matched, the language tag and initial text direction are taken from LANG_DIR. If there is no initial text direction, the datatype is rdf:langString. If there is a initial text direction, the datatype is rdf:dirLangString. If neither matched, the datatype is xsd:string, and the literal has no language tag.
+ INTEGER literal The literal has a lexical form of the input string, and a datatype of xsd:integer.
+ DECIMAL literal The literal has a lexical form of the input string, and a datatype of xsd:decimal.
+ DOUBLE literal The literal has a lexical form of the input string, and a datatype of xsd:double.
+ BooleanLiteral literal The literal has a lexical form of the true or false, depending on which matched the input, and a datatype of xsd:boolean.
BLANK_NODE_LABEL blank node The string matching the second argument, PN_LOCAL, is a key in bnodeLabels. If there is no corresponding blank node in the map, one is allocated.
ANON blank node A blank node is generated.
blankNodePropertyList blank node A blank node is generated. Note the rules for blankNodePropertyList in the next section.
From f23631c5e087a010a280b28f7239bdac9222456e Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
Date: Thu, 24 Jul 2025 08:58:21 -1000
Subject: [PATCH 3/5] Update spec/index.html
Co-authored-by: Andy Seaborne
---
spec/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/index.html b/spec/index.html
index da9fbd2..5f6f2eb 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -2009,7 +2009,7 @@ RDF Term Constructors
graphs which contain fewer triples than are described in the input
(including no triples whatsoever),
consumers should consider information of any errors signaled
- when using the resulting graph,
+ when using the output triples,
which may be incomplete and/or include
ill-typed
or ill-formed terms.
From 294130efa856a724798e2293b6de7c66a5457564 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
Date: Thu, 24 Jul 2025 09:04:38 -1000
Subject: [PATCH 4/5] Add SHOULD criteria on IRIREF for RFC3986 section 3.3.
---
spec/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/index.html b/spec/index.html
index 5f6f2eb..a5edf9a 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -1951,7 +1951,7 @@ RDF Term Constructors
production type procedure
- IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
+ IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD conform to section 3.3 of [[RFC3986]] and comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
PNAME_NS prefix When used in a prefixID or sparqlPrefix production, the prefix is the potentially empty RDF string matching the first argument of the rule is a key into the namespaces map into which the expanded second argument is stored for future lookup.
IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
From 9897324834831a617f0d15827577f61860b6ed41 Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
Date: Sun, 27 Jul 2025 15:25:52 -1000
Subject: [PATCH 5/5] Use style for table cell text alignment rather than
inline-css and change how whitespace is introduced between `--`.
---
spec/index.html | 55 ++++++++++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/spec/index.html b/spec/index.html
index a5edf9a..3aad45d 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -72,6 +72,9 @@
.separated thead tr th { border:1px solid black; padding: .2em; min-width: 10vw }
.separated tbody tr td { border:1px solid black; text-align: center; min-width: 10vw }
.separated tbody tr td.r { text-align: right; padding: .5em; }
+ .separated tbody tr td:first-child,
+ .separated tbody tr td:last-child {text-align: left; padding: .5em; }
+ .separated.last-center tbody tr td:last-child {text-align: center; padding: .5em; }
.grammar td {
font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
font-size: .9em;
@@ -1508,7 +1511,7 @@ Escape Sequences
-
+
Context where each kind of escape sequence can be used
@@ -1951,28 +1954,28 @@ RDF Term Constructors
production type procedure
- IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD conform to section 3.3 of [[RFC3986]] and comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
- PNAME_NS prefix When used in a prefixID or sparqlPrefix production, the prefix is the potentially empty RDF string matching the first argument of the rule is a key into the namespaces map into which the expanded second argument is stored for future lookup.
- IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
- PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
- VersionSpecifier literal. The |curVersion| is taken from a literal using the matched RDF string lexical form and `xsd:string` datatype.
- STRING_LITERAL_SINGLE_QUOTE lexical form The characters between the outermost 's are taken, after numeric and string escape sequences are replaced with the characters that they represent, to form the RDF string of a lexical form.
- STRING_LITERAL_QUOTE lexical form The characters between the outermost "s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
- STRING_LITERAL_LONG_SINGLE_QUOTE lexical form The characters between the outermost '''s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
- STRING_LITERAL_LONG_QUOTE lexical form The characters between the outermost """s are taken, after numeric and string escape sequences are are replaced with the characters that they represent, to form the RDF string of a lexical form.
- LANG_DIR language tag The characters following the @ form the language tag and optionally the initial text direction,
if the matched characters include --.
The language tag MUST be well-formed according to section 2.2.9 of [[!BCP47]].
If present, the initial text direction MUST be either `ltr` or `rtl`.
- RDFLiteral literal The literal has a lexical form of the first rule argument, String. If the '^^' iri rule is matched, the datatype IRI is derived from the iri, and the literal has no language tag. If the LANG_DIR rule is matched, the language tag and initial text direction are taken from LANG_DIR. If there is no initial text direction, the datatype is rdf:langString. If there is a initial text direction, the datatype is rdf:dirLangString. If neither matched, the datatype is xsd:string, and the literal has no language tag.
- INTEGER literal The literal has a lexical form of the input string, and a datatype of xsd:integer.
- DECIMAL literal The literal has a lexical form of the input string, and a datatype of xsd:decimal.
- DOUBLE literal The literal has a lexical form of the input string, and a datatype of xsd:double.
- BooleanLiteral literal The literal has a lexical form of the true or false, depending on which matched the input, and a datatype of xsd:boolean.
- BLANK_NODE_LABEL blank node The string matching the second argument, PN_LOCAL, is a key in bnodeLabels. If there is no corresponding blank node in the map, one is allocated.
- ANON blank node A blank node is generated.
- blankNodePropertyList blank node A blank node is generated. Note the rules for blankNodePropertyList in the next section.
- collection blank node For non-empty lists, a blank node is generated. Note the rules for collection in the next section.
- IRI For empty lists, the resulting IRI is rdf:nil. Note the rules for collection in the next section.
- reifier IRI
- | blank node
+ IRIREF IRI The characters between < and > are taken, with the numeric escape sequences unescaped, to form the IRI. Relative IRI reference resolution is performed per Section 6.3. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD conform to section 3.3 of [[RFC3986]] and comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
+ PNAME_NS prefix When used in a prefixID or sparqlPrefix production, the prefix is the potentially empty RDF string matching the first argument of the rule is a key into the namespaces map into which the expanded second argument is stored for future lookup.
+ IRI When used in a PrefixedName production; the namespaces map MUST have a corresponding namespace, which forms the RDF string of the IRI. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
+ PNAME_LN IRI A potentially empty prefix is identified by the first sequence, PNAME_NS. The namespaces map MUST have a corresponding namespace. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument, PN_LOCAL, and concatenating this onto the namespace. The resulting IRI MUST comply with the syntactic restrictions of generic IRI syntax, and SHOULD comply with any narrower restrictions imposed by the corresponding IRI scheme specification.
+ VersionSpecifier literal. The |curVersion| is taken from a literal using the matched RDF string lexical form and `xsd:string` datatype.
+ STRING_LITERAL_SINGLE_QUOTE lexical form The characters between the outermost 's are taken, after numeric and string escape sequences are replaced with the characters that they represent, to form the RDF string of a lexical form.
+ STRING_LITERAL_QUOTE lexical form The characters between the outermost "s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
+ STRING_LITERAL_LONG_SINGLE_QUOTE lexical form The characters between the outermost '''s are taken, with numeric and string escape sequences unescaped, to form the RDF string of a lexical form.
+ STRING_LITERAL_LONG_QUOTE lexical form The characters between the outermost """s are taken, after numeric and string escape sequences are are replaced with the characters that they represent, to form the RDF string of a lexical form.
+ LANG_DIR language tag The characters following the @ form the language tag and optionally the initial text direction, if the matched characters include --. The language tag MUST be well-formed according to section 2.2.9 of [[!BCP47]]. If present, the initial text direction MUST be either `ltr` or `rtl`.
+ RDFLiteral literal The literal has a lexical form of the first rule argument, String. If the '^^' iri rule is matched, the datatype IRI is derived from the iri, and the literal has no language tag. If the LANG_DIR rule is matched, the language tag and initial text direction are taken from LANG_DIR. If there is no initial text direction, the datatype is rdf:langString. If there is a initial text direction, the datatype is rdf:dirLangString. If neither matched, the datatype is xsd:string, and the literal has no language tag.
+ INTEGER literal The literal has a lexical form of the input string, and a datatype of xsd:integer.
+ DECIMAL literal The literal has a lexical form of the input string, and a datatype of xsd:decimal.
+ DOUBLE literal The literal has a lexical form of the input string, and a datatype of xsd:double.
+ BooleanLiteral literal The literal has a lexical form of the true or false, depending on which matched the input, and a datatype of xsd:boolean.
+ BLANK_NODE_LABEL blank node The string matching the second argument, PN_LOCAL, is a key in bnodeLabels. If there is no corresponding blank node in the map, one is allocated.
+ ANON blank node A blank node is generated.
+ blankNodePropertyList blank node A blank node is generated. Note the rules for blankNodePropertyList in the next section.
+ collection blank node For non-empty lists, a blank node is generated. Note the rules for collection in the next section.
+ IRI For empty lists, the resulting IRI is rdf:nil. Note the rules for collection in the next section.
+ reifier IRI
+ | blank node
The |curReifier| is taken from term, which is taken from the matched
iri production
@@ -1981,7 +1984,7 @@ RDF Term Constructors
from a fresh RDF blank node.
- tripleTerm triple term
+ tripleTerm triple term
The triple term
is composed of the terms constructed from
@@ -1990,13 +1993,13 @@ RDF Term Constructors
ttObject productions.
- reifiedTriple IRI | blank node
+ reifiedTriple IRI | blank node
The term is taken from the matched reifier, if any,
or from a fresh RDF blank node.
- annotationBlock IRI | blank node
+ annotationBlock IRI | blank node
The term is taken from a previously matched reifier, if any,
or from a fresh RDF blank node.