n3 2.10.1 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/browser/n3.esm.min.js +3 -3
- package/browser/n3.min.js +3 -3
- package/lib/N3Parser.js +11 -5
- package/lib/N3Writer.js +19 -3
- package/package.json +1 -1
- package/src/N3Parser.js +11 -5
- package/src/N3Writer.js +20 -4
package/README.md
CHANGED
|
@@ -220,6 +220,16 @@ the `emptyFormulaAsTrue` flag enables that behavior:
|
|
|
220
220
|
const parser = new N3.Parser({ format: 'text/n3', emptyFormulaAsTrue: true });
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
+
In N3 documents, the parser by default rescopes blank node labels
|
|
224
|
+
in lists and blank node property lists, in addition to formulas,
|
|
225
|
+
so `_:a` inside a list does not co-reference `_:a` outside of it.
|
|
226
|
+
The `formulaScopedBlankNodes` flag scopes blank node labels to formulas only,
|
|
227
|
+
matching N3's formula-scoped blank node semantics
|
|
228
|
+
(this will become the default in the next major version):
|
|
229
|
+
```JavaScript
|
|
230
|
+
const parser = new N3.Parser({ format: 'N3', formulaScopedBlankNodes: true });
|
|
231
|
+
```
|
|
232
|
+
|
|
223
233
|
### From an RDF stream to quads
|
|
224
234
|
|
|
225
235
|
`N3.Parser` can parse [Node.js streams](http://nodejs.org/api/stream.html) as they grow,
|