Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of prefix declarations in SPARQL serializer #108

Open
kasei opened this issue Oct 26, 2016 · 0 comments
Open

Improve handling of prefix declarations in SPARQL serializer #108

kasei opened this issue Oct 26, 2016 · 0 comments
Assignees

Comments

@kasei
Copy link
Owner

kasei commented Oct 26, 2016

#104 reveals that the current SPARQL serializer will always add prefix declarations when calling $a->as_sparql(namespaces => $map), even when $a isn't a top-level query object. The tests included in #104 include examples of serializing bare IRIs, and getting:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
foaf:Person

This needs to be changed so that prefix declarations are only emitted for top-level queries. Special care should be taken to avoid emitting new declarations for sub-queries.

I'm not sure if this fix needs to happen in AtteanX::Serializer::SPARQL, Attean::API::SPARQLSerializable->sparql_tokens, or Attean::API::SPARQLSerializable->as_sparql.

@kasei kasei assigned kasei and unassigned kasei Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant