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

Update SPARQLHTML serializer to consume AbbreviatingSerializer #54

Open
kasei opened this issue Jan 7, 2016 · 0 comments
Open

Update SPARQLHTML serializer to consume AbbreviatingSerializer #54

kasei opened this issue Jan 7, 2016 · 0 comments

Comments

@kasei
Copy link
Owner

kasei commented Jan 7, 2016

Emit prefix names as the link text for IRIs.

After consuming Attean::API::AbbreviatingSerializer, the serializer will have a namespaces attribute. When serializing IRIs as links, check to see if the IRI can be shortened to a prefixname based on the URI prefixes in the namespaces (URI::NamespaceMap) object. The Turtle serializer has code that shortens IRIs to prefixnames that can be used as a guide for how to do it.

In the end, you should end up with an HTML link for IRIs that (assuming the right prefixes are defined) looks something like:

<a href="http://xmlns.com/foaf/0.1/Person">foaf:Person</a>

The only code that needs to change is in AtteanX::Serializer::SPARQLHTML::node_as_html. Following the Turtle serializer code, this should be a very simple task.

Varadinsky pushed a commit to Varadinsky/attean that referenced this issue Jan 29, 2016
Varadinsky pushed a commit to Varadinsky/attean that referenced this issue Jan 29, 2016
@Varadinsky Varadinsky mentioned this issue Jan 29, 2016
Varadinsky added a commit to Varadinsky/attean that referenced this issue Jan 29, 2016
Varadinsky added a commit to Varadinsky/attean that referenced this issue Jan 29, 2016
@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
Projects
None yet
Development

No branches or pull requests

1 participant