Open tpluscode opened 4 years ago
Just to note, several parsers (N3, RDF/XML, JSON-LD, RDFa) have this parameter on the constructor, instead of the import
method.
It might make sense to have a standard for what as well/instead.
That is already there: https://github.com/rdfjs/stream-spec/blob/master/index.html#L155
And not "instead of". Those are separate features
That is already there: https://github.com/rdfjs/stream-spec/blob/master/index.html#L155
Oh, I completely missed that, then my implementations adhere to it by coincidence 😄
And not "instead of". Those are separate features
Just wondering if this will not be too confusing for people, as there would be two places to set a baseIRI.
Just wondering if this will not be too confusing for people, as there would be two places to set a baseIRI.
I mostly use the Sink
returned by a sink map, typically constructed by @rdf-esm/formats-common
or even @rdfjs/fetch
. This way I never call the constructor myself and thus have no opportunity for setting the base.
As discussed in https://github.com/rdfjs/rdfxml-streaming-parser.js/issues/41, @rubensworks proposed to add a parameter to the import method so that it's a standard feature of all parsers to accept a
baseIRI
This is already implemented by a most and would nicely complement the analogous param on the constructor