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

Can't handle blank subjects #23

Open
tpendragon opened this issue Oct 30, 2015 · 5 comments
Open

Can't handle blank subjects #23

tpendragon opened this issue Oct 30, 2015 · 5 comments
Assignees

Comments

@tpendragon
Copy link

https://gist.github.com/tpendragon/1ad503fddf769567cf21

@tpendragon
Copy link
Author

Wondering if we need to enable RAPTOR_FEATURE_RELATIVE_RELATIVE_URIs, but not sure how to set features in this C binding.

@dwbutler
Copy link
Member

Looks like we would need to expose raptor_serializer_set_option and raptor_parser_set_option.

@artob
Copy link
Member

artob commented Oct 31, 2015

Exposing those two functions for setting options looks fairly straightforward based on their API signatures, other than the mechanical work involved in defining the large raptor_option enum.

I'd be a little surprised, though, if the RAPTOR_FEATURE_RELATIVE_URIS option enables @tpendragon's example to work. As I understand it, that feature is for Raptor (itself) to auto-abbreviate URIs when serializing into an output format that supports qualified names.

raptor_uri instances are supposed to be absolute URIs, which means that the expansion of relative URIs to absolute needs to be done on construction, and you can't feed the serializer a statement with a relative URI:

@tpendragon
Copy link
Author

@bendiken Yeah, I tried it last night and it didn't work. Is this just unsupported by raptor?

@gkellogg
Copy link
Member

gkellogg commented Oct 31, 2015

Exposing those two methods for setting options looks fairly straightforward based on their API signatures, other than the mechanical work involved in defining the big raptor_option enum.

I'd be a little surprised, though, if the RAPTOR_FEATURE_RELATIVE_URIS option enables @tpendragon's example to work. As I understand it, that feature is for Raptor (itself) to auto-abbreviate URIs when serializing into an output format that supports qualified names.

This is the same as the standard_prefixes option with other serializers, so that would be a good way to expose it too.
raptor_uri instances are supposed to be absolute URIs, which means that the expansion of relative URIs to absolute needs to be done on construction, you can't feed the serializer a statement with a relative URI:

http://librdf.org/raptor/api/raptor2-section-uri.html#raptor-uri
http://librdf.org/raptor/api/raptor2-section-uri.html#raptor-new-uri-relative-to-base

That is generally true for RDF serializers, but some play loose with the rules :). Setting a base URI may help, which could be removed from the serialization afterwards if necessary.

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

4 participants