diff --git a/spec/index.html b/spec/index.html index e62a2de..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; @@ -111,11 +114,14 @@ } .ex th { text-align: center; } + table.simple { border-collapse:collapse;} + table.simple th, table.simple td { border:1px solid black; padding:0.2em; } + table.cp-definitions { border-collapse:collapse; background-color: #DDDDFF} table.cp-definitions, table.cp-definitions th, - table.cp-definitions td { border:1px solid black; padding:0.2em; } + table.cp-definitions td { border:0px solid black; padding:0.2em; } table.cp-definitions td:nth-child(2) { text-align: center; } @@ -234,12 +240,12 @@
.
).
+ 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.
Object ListsThere 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. @@ -535,7 +541,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 (
@@ -1505,7 +1511,7 @@?
name or$
name) in any part of the triple of the form.Escape Sequences
-+
+
Context where each kind of escape sequence can be used @@ -1829,7 +1835,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. @@ -1948,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.- PNAME_NS prefix When used in a prefixID
orsparqlPrefix
production, theprefix
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 correspondingnamespace
, 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 correspondingnamespace
. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument,PN_LOCAL
, and concatenating this onto thenamespace
.- 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--
.- 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 theiri
, and the literal has no language tag. If theLANG_DIR
rule is matched, the language tag and initial text direction are taken fromLANG_DIR
. If there is no initial text direction, the datatype isrdf:langString
. If there is a initial text direction, the datatype isrdf:dirLangString
. If neither matched, the datatype isxsd: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
orfalse
, depending on which matched the input, and a datatype ofxsd: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 forcollection
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
orsparqlPrefix
production, theprefix
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 correspondingnamespace
, 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 correspondingnamespace
. The RDF string of the IRI is formed by unescaping the reserved characters in the second argument,PN_LOCAL
, and concatenating this onto thenamespace
. 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 theiri
, and the literal has no language tag. If theLANG_DIR
rule is matched, the language tag and initial text direction are taken fromLANG_DIR
. If there is no initial text direction, the datatype isrdf:langString
. If there is a initial text direction, the datatype isrdf:dirLangString
. If neither matched, the datatype isxsd: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
orfalse
, depending on which matched the input, and a datatype ofxsd: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 forcollection
in the next section.- reifier IRI + | blank node The |curReifier| is taken from term, which is taken from the matched iri
production @@ -1978,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 @@ -1987,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. @@ -2002,6 +2008,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 output triples, + which may be incomplete and/or include + ill-typed + or ill-formed terms.
+