n3 2.4.0 → 2.6.0
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 +4 -4
- package/browser/n3.min.js +1 -1
- package/lib/N3Lexer.js +5 -0
- package/lib/N3Parser.js +26 -0
- package/package.json +1 -1
- package/src/N3Lexer.js +9 -0
- package/src/N3Parser.js +35 -0
package/README.md
CHANGED
|
@@ -175,6 +175,16 @@ This is done by passing a `baseIRI` argument upon creation:
|
|
|
175
175
|
const parser = new N3.Parser({ baseIRI: 'http://example.org/' });
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
In N3 mode, `implicitEmptyPrefix` can bind an undeclared empty prefix to the
|
|
179
|
+
document IRI with a `#` fragment:
|
|
180
|
+
```JavaScript
|
|
181
|
+
const parser = new N3.Parser({
|
|
182
|
+
format: 'text/n3',
|
|
183
|
+
baseIRI: 'http://example.org/document',
|
|
184
|
+
implicitEmptyPrefix: true,
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
178
188
|
By default, `N3.Parser` will prefix blank node labels with a `b{digit}_` prefix.
|
|
179
189
|
This is done to prevent collisions of unrelated blank nodes having identical
|
|
180
190
|
labels. The `blankNodePrefix` constructor argument can be used to modify the
|