Open ghost opened 2 years ago
I think it is not a bug.
The spec states that IRIs are absolute IRIs. https://www.w3.org/TR/n-triples/#h3_sec-iri
IRIs may be written only as absolute IRIs. IRIs are enclosed in '<' and '>' and may contain numeric escape sequences (described below). For example http://example.org/#green-goblin.
The value <make\\u0020me>
is not an absolute IRI. I think the parser is correct in saying that it is an invalid value.
The W3C N-Triples test suite also provides 4 tests to ensure that relative IRIs are not allowed.
From the manifest:
<#nt-syntax-bad-uri-06> rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "nt-syntax-bad-uri-06" ;
rdfs:comment "Bad IRI : relative IRI not allowed in subject (negative test)" ;
mf:action <nt-syntax-bad-uri-06.nt> ;
.
<#nt-syntax-bad-uri-07> rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "nt-syntax-bad-uri-07" ;
rdfs:comment "Bad IRI : relative IRI not allowed in predicate (negative test)" ;
mf:action <nt-syntax-bad-uri-07.nt> ;
.
<#nt-syntax-bad-uri-08> rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "nt-syntax-bad-uri-08" ;
rdfs:comment "Bad IRI : relative IRI not allowed in object (negative test)" ;
mf:action <nt-syntax-bad-uri-08.nt> ;
.
<#nt-syntax-bad-uri-09> rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "nt-syntax-bad-uri-09" ;
rdfs:comment "Bad IRI : relative IRI not allowed in datatype (negative test)" ;
mf:action <nt-syntax-bad-uri-09.nt> ;
.
Discussed in https://github.com/RDFLib/rdflib/discussions/1557