n3 3.0.0-alpha.8 → 3.0.0-alpha.9

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 CHANGED
@@ -160,7 +160,8 @@ const quads = parser.parse('<a> <b> "hello"@en.', {
160
160
 
161
161
  Packages that extend a format with their own directives can register their names with the `directives` option.
162
162
  Between statements (outside graph blocks and formulas), a registered directive is accepted
163
- as `@name .` in Turtle, TriG and N3, and as `NAME` (case-insensitive) in all formats, including N-Triples and N-Quads.
163
+ as `@name .` in Turtle, TriG and N3, and as `NAME` in all formats: case-insensitive in Turtle, TriG and N3,
164
+ and uppercase only in N-Triples and N-Quads, like `VERSION`.
164
165
  `onDirective(name)` receives each one in order with the quads, and `N3.StreamParser` emits them as `directive` events.
165
166
  Names consist of letters only, and cannot be words that already have a meaning in the grammar, such as `prefix` or `a`.
166
167
 
@@ -326,6 +327,9 @@ const streamParser = new N3.StreamParser(),
326
327
 
327
328
  ## Writing
328
329
 
330
+ `N3.Writer` writes each quad as it arrives, so it cannot write N3 formulas (graphs used as terms).
331
+ For full writing, including formulas, use [n3-full-writer](https://github.com/jeswr/n3-full-writer).
332
+
329
333
  ### From quads to a string
330
334
 
331
335
  `N3.Writer` serializes quads as an RDF document.
@@ -621,6 +625,11 @@ They are maintained separately from N3.js; please report issues with them in the
621
625
  | ------- | ----------- |
622
626
  | [n3.js-messages](https://www.npmjs.com/package/n3.js-messages) | Parses and writes [RDF Messages](https://w3c-cg.github.io/rsp/spec/messages) (message-delimited Turtle, TriG, N-Triples and N-Quads). |
623
627
  | [@jeswr/n3-provenance](https://github.com/jeswr/n3-provenance) | Experimental. Maps the terms of parsed quads back to their source positions in the input document. Terms that the parser generates, such as list nodes and reification scaffolding, have no position. It builds on the parser's `onToken` and `onTokenEnd` callbacks, but also subclasses private parser and index internals, so it is pinned to a specific N3.js revision. |
628
+ | [n3-match-bgp](https://github.com/jeswr/n3-match-bgp) | Experimental. Matches basic graph patterns against a `Store`, or any RDF/JS dataset, and yields RDF/JS `Bindings`. It is being worked on as a consideration for the RDF/JS specifications, and will only move into N3.js if it lands there. On a `Store`, it joins on private index internals for speed. |
629
+ | [n3-full-writer](https://github.com/jeswr/n3-full-writer) | Experimental. Writes complete N3 documents, including formulas, by holding back the statements that use formulas until the end. It was proposed for N3.js in [#822](https://github.com/rdfjs/N3.js/pull/822). It extends `N3.Writer` and overrides private writer methods. |
630
+
631
+ Features intended for N3.js itself are considered once their specification is settled.
632
+ If you would like to see one of these packages in N3.js, please open an issue or discussion.
624
633
 
625
634
  To list a package here, open a pull request that adds a row to this table.
626
635