Skip to content

Add version validation #90

@rubensworks

Description

@rubensworks

While not required by the spec, it would be good to default to strict VERSION validation in the SPARQL 1.2 config.
This ensures that we are future-proof when someone uses the current version of Traqula on SPARQL 1.3 in the future (which we can not parse yet, and should thus error).
Concretely, we should accept "1.1", "1.2", and "1.2-basic" values, and error on all other versions.
Besides this, we should also add a flag to disable this, and not throw on unsupported versions.

Additionally, we should also have a way to pass a version parameter as passed externally (e.g. as media type parameter).

This would align with the behaviour of all other RDF and SPARQL results parsers within Comunica.
For example, this is how these two things are implemented for SPARQL/JSON:

Something very similar can probably be done here as well.

On the comunica side, we can then pass these options like this:
https://github.com/comunica/comunica/blob/4231cf8254902322f6144a42233dc3fbcc4baec2/packages/actor-rdf-parse-rdfxml/lib/ActorRdfParseRdfXml.ts#L31-L32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions