-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add XML abbreviations and BNode ellision #39
Comments
Yes, having prefixes and removing not useful blank node IDs would be great. About URI prefixes, I am considering allowing the Rio user to provide them when building a |
You are correct about prefix support of course, and that would also be a great addition. I have given a little thought to it, and I think you could stream, although, of course, which bnodes get elided would depend entirely on the order in which you stream. Another possibility would be have a semi-streaming interface. You might allow, for example, passing of an Perhaps the solution is do as Jena has done, and have two serializers: RDF/XML and RDF/XML-ABBREV. |
I realise btw, that this is non trivial to implement. I thought it worth opening the issue to get some idea of the API that would enable this to work, before I build against the current API. |
Incidentally, this seems to be very related to #25. At the moment, the XML renderer is cloning the subjects that go into it. In my cases, I am creating the |
Yes, it seems like the best option: a fast serializer that outputs "ugly" data and a slower and more memory hunrgy serializer that outputs nicer format. This distinction would be also useful for the Turtle and TriG serializers which could benefit from the same optimizations. Indeed, the RDF/XML serializer (and parser) could be made much faster with some optimization work. We have mostly focused on having working parsers at the moment. |
Currently the XML serialization is all in long hand. It would be good to have some of the short hand syntaxes, for example typed nodes and the ability to remove explicit BNode IDs where possible.
For example:
currently produces
where as something like this:
would be better. Combined with the other short cut syntaxes, this will make a big difference to eventual file size!
The text was updated successfully, but these errors were encountered: