Decodes each statement line to one triple, skipping blank lines and # comments, so a
document carrying no statements decodes to the empty graph. Blank-node subjects and objects (_:bX) decode to
scope-numbered Blank nodes: a per-document scope keyed by the external
label mints one node per distinct label, numbered by a short sequential id, so repeats of one label correlate to
the same node within the document.
Warning
External labels are read against the intersection of the N-Triples, Turtle and SPARQL 1.1 BLANK_NODE_LABEL
productions, so that every decoded label is one the blank factory accepts; a label
carrying :, which only N-Triples admits, is consequently rejected as malformed.
SyntaxError if any non-empty, non-comment line is not a well-formed N-Triples triple, or if a UCHAR
escape within an IRI or a literal lexical form expands to an isolated UTF-16 surrogate code point
Throws
RangeError if a component the document syntax admits is rejected by the data model factory building it:
a relative IRI, or a language tag outside the BCP 47 syntax the wider N-Triples LANGTAG production allows
Decodes an N-Triples document into its RDF graph.
Decodes each statement line to one triple, skipping blank lines and
#comments, so a document carrying no statements decodes to the empty graph. Blank-node subjects and objects (_:bX) decode to scope-numbered Blank nodes: a per-document scope keyed by the external label mints one node per distinct label, numbered by a short sequential id, so repeats of one label correlate to the same node within the document.External labels are read against the intersection of the N-Triples, Turtle and SPARQL 1.1
BLANK_NODE_LABELproductions, so that every decoded label is one the blank factory accepts; a label carrying:, which only N-Triples admits, is consequently rejected as malformed.