diff --git a/spec/index.html b/spec/index.html index fd81765..30c261b 100644 --- a/spec/index.html +++ b/spec/index.html @@ -86,7 +86,9 @@ subject or object of another triple, - making it possible to make statements about other statements.
+ making it possible to make statements about other statements. + RDF 1.2 N-Quads also adds support for + directional language-tagged strings.As in N-Triples, literals are used to identify values such as strings, numbers, dates.
+Literals (Grammar production Literal
)
+ have a lexical form followed by either a
+ language tag
+ (possibly including base direction),
+ a datatype IRI,
+ or neither.
The representation of the lexical form consists of an
initial delimiter "
,
a sequence of permitted characters or numeric escape sequence or string escape sequence,
@@ -260,11 +269,17 @@
The corresponding lexical form
is the characters between the delimiters, after processing any escape sequences.
- If present, the language tag
- is preceded by an @
.
+ If present, the LANG_DIR
+ terminal matches the language tag
+ and optionally the base direction.
+ The language tag
+ is preceded by an @
,
+ and, if present, the base direction
+ is separated from the language tag
+ by --
.
If there is no language tag, there may be a datatype IRI,
preceded by ^^
.
- If there is no datatype IRI and no language tag
+ If there is no datatype IRI and no language tag, then
it is a simple literal
and the datatype is http://www.w3.org/2001/XMLSchema#string
.
_:
followed by a blank node label which is a series of name characters.
- The characters in the label are built upon PN_CHARS_BASE,
+ The characters in the label are built upon PN_CHARS_BASE
,
liberalized as follows:
- A fresh RDF blank node is allocated for each unique blank node label in a document. - Repeated use of the same blank node label identifies the same RDF blank node. + A fresh RDF blank node is allocated for each unique blank node identifier in a document. + Repeated use of the same blank node identifier identifies the same blank node.
A Canonical form of N-Quads
any of which MUST be a single space
.
http://www.w3.org/2001/XMLSchema#string
- MUST NOT use the datatype IRI part of the literal,
+ MUST NOT use the datatype IRI part of the literal
,
and are represented using only STRING_LITERAL_QUOTE
.
HEX
MUST use only digits
@@ -394,7 +409,7 @@ A conforming N-Quads parser is a system capable of - reading N-Quads documents on behalf of an application. + reading N-Quads documents on behalf of an application. It makes the serialized RDF dataset, as defined in , available to the application, usually through some form of API.
@@ -430,8 +445,7 @@White space (spaces
, and/or tabs
) is allowed outside of terminals.
- Rule names below in capitals indicate where white space is significant.
-
White space is significant in the production STRING_LITERAL_QUOTE
.
U+005E
_:
_
followed by :
--
-
characters_:
,
is a key in bnodeLabels.
- If there is no corresponding blank node in the map,
+ If there is no corresponding blank node in the map,
one is allocated.
<
+ and >
are taken,
with escape sequences unescaped,
to form the IRI.
@
form the language tag.
+ The characters following the @
+ form the language tag
+ and optionally the base direction,
+ if the matched characters include
+ --
.
STRING_LITERAL_QUOTE
,
- and either a language tag of LANGTAG
- or a datatype IRI of iri
,
+ and either a language tag
+ with optional base direction
+ from LANG_DIR
+ or a datatype IRI of iri
,
depending on which rule matched the input.
- If the LANGTAG
rule matched,
- the datatype is rdf:langString
- and the language tag is LANGTAG
.
- If neither a language tag nor a datatype IRI is provided,
+ If the LANG_DIR
rule matched,
+ the language tag
+ and base direction
+ are taken from LANG_DIR.
+ If there is no base direction,
+ the datatype is rdf:langString
.
+ If there is a base direction,
+ the datatype is rdf:dirLangString
.
+ If neither LANG_DIR
+ nor datatype IRI match,
the literal has a datatype of xsd:string
.
statement
production produces a
triple defined by the terms constructed for
subject
,
- a href="#grammar-production-predicate">predicate
, and
- object
>.
+ predicate
, and
+ object
.
This RDF triple is added to the graph labeled by
the production graphLabel
,
if no graphLabel
is present the triple is added to the RDF dataset's default graph.
@@ -927,17 +956,20 @@ PN_CHARS_U
grammar production to be consistent with Turtle.
- Formerly, PN_CHARS_U
+ Formerly, PN_CHARS_U
included "`:`" in N-Triples and N-Quads, but not in Turtle nor TriG.
- PN_CHARS_U is a component
- of BLANK_NODE_LABEL.PN_CHARS_U
is a component
+ of BLANK_NODE_LABEL
.LANG_DIR
to include
+ an optional base direction.literal
(
(
'^^
' IRIREF)
|
LANGTAG)
?
(
(
'^^
' IRIREF)
|
LANG_DIR)
?
_:
' (
PN_CHARS_U |
[
0-9
]
)
(
(
PN_CHARS |
'.
')
*
PN_CHARS)
?
LANGTAG
LANG_DIR
@
' [
a-zA-Z
]
+
(
'-
' [
a-zA-Z0-9
]
+
)
*
@
' [
a-zA-Z
]
+
(
'-
' [
a-zA-Z0-9
]
+
)
*
(
'--
' [
a-zA-Z
]
+
)
?