n3 2.11.2 → 3.0.0-alpha.1
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 +5 -3
- package/browser/n3.esm.min.js +12 -12
- package/browser/n3.min.js +12 -12
- package/lib/N3Lexer.js +133 -148
- package/lib/N3Parser.js +2 -1
- package/package.json +29 -2
- package/src/N3Lexer.js +142 -162
- package/src/N3Parser.js +2 -1
package/README.md
CHANGED
|
@@ -190,13 +190,15 @@ This is done by passing a `baseIRI` argument upon creation:
|
|
|
190
190
|
const parser = new N3.Parser({ baseIRI: 'http://example.org/' });
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
In N3 mode,
|
|
194
|
-
document IRI with a `#` fragment
|
|
193
|
+
In N3 mode, an undeclared empty prefix is bound to the
|
|
194
|
+
document IRI with a `#` fragment, so `:term` parses as `<http://example.org/document#term>`
|
|
195
|
+
(see [w3c-cg/N3#235](https://github.com/w3c-cg/N3/issues/235)).
|
|
196
|
+
Setting `implicitEmptyPrefix` to `false` requires an explicit `@prefix :` declaration instead:
|
|
195
197
|
```JavaScript
|
|
196
198
|
const parser = new N3.Parser({
|
|
197
199
|
format: 'text/n3',
|
|
198
200
|
baseIRI: 'http://example.org/document',
|
|
199
|
-
implicitEmptyPrefix:
|
|
201
|
+
implicitEmptyPrefix: false,
|
|
200
202
|
});
|
|
201
203
|
```
|
|
202
204
|
|