amagioss / py_rdfc10

Implementation of RDF canonicalization using W3 spec
1 stars 0 forks source link

Supports only default graph ? #1

Open ksridhar opened 6 months ago

ksridhar commented 6 months ago

According to the statement at https://github.com/amagioss/py_rdfc10/blob/2430b95e2915f52dc657b337abc824013ae278c6/Readme.md?plain=1#L41 it seems that only default graph is supported for now. I suppose that this is ok.

The title of https://www.w3.org/TR/rdf-canon/ states RDF Datasets which implies that named graphs must also be supported which can only happen if the format is n-quads.

see the statement

The N-Quads format is a line-based RDF syntax, which is an extension of N-Triples [[RDF12-N-TRIPLES](https://www.w3.org/TR/rdf12-n-quads/#bib-rdf12-n-triples)]. The main distinction is that N-Quads allows the encoding of multiple graphs in a single document representing an [RDF Dataset](https://www.w3.org/TR/rdf12-concepts/#dfn-rdf-dataset)

in https://www.w3.org/TR/rdf12-n-quads/

With this the following questions/observations follow:

ksridhar commented 6 months ago

Also see

NOTE
The [Canonicalization Algorithm](https://www.w3.org/TR/rdf-canon/#canonicalization) operates over [RDF quads](https://www.w3.org/TR/rdf-canon/#dfn-quad), rather than separately canonicalizing each [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph) contained within a dataset. This is necessary as blank nodes may be shared among graphs within an RDF dataset, or be used as the graph name for a named graph within the dataset, making it important that the full context of each blank node be considered when assigning canonical identifiers.

in https://www.w3.org/TR/rch-explainer/#goals