Closed tpluscode closed 1 year ago
Hm, there would probably be other (edge) cases but this seems to work
diff --git a/node_modules/n3/lib/N3Parser.js b/node_modules/n3/lib/N3Parser.js
index 8f16bab..28d4514 100644
--- a/node_modules/n3/lib/N3Parser.js
+++ b/node_modules/n3/lib/N3Parser.js
@@ -99,7 +99,7 @@ class N3Parser {
this._inversePredicate = false; // In N3, blank nodes are scoped to a formula
// (using a dot as separator, as a blank node label cannot start with it)
- this._prefixes._ = this._graph ? `${this._graph.id.substr(2)}.` : '.'; // Quantifiers are scoped to a formula
+ this._prefixes._ = this._graph ? `${this._graph.value}.` : '.'; // Quantifiers are scoped to a formula
this._quantified = Object.create(this._quantified);
}
Fixed in 1.16.4
I have never had such an issue until I tried parsing some rules with
format: 'text/n3'
. When afactory
is used this error is thrownI find that on that line internally the
this._graph
is accessed with properties which are not defined in the RDF/JS spec. Thus I found that no common factory implementations to work.rdf-ext
,@rdfjs/data-model
, norrdf-data-factory
Here's an example: https://runkit.com/embed/k5l3tf4fmvpq