On 20/01/11 15:55, Reto Bachmann-Gmür (JIRA) wrote:
Add possibility to connect serializers to prefix service
--------------------------------------------------------
Key: JENA-31
URL: https://issues.apache.org/jira/browse/JENA-31
Project: Jena
Issue Type: Improvement
Components: Jena
Reporter: Reto Bachmann-Gmür
Currently the serializers want to access the whole set of available
prefimappings, instead they shold only ask for a prefix suggestion for uris
actually in the model, that way it is possible to connect services which can
suggest prefixes for a huge number of uris which is not reasonably feasible now.
It is feasible - the application can analysis the data, make choices of
prefixes, set the prefix map appropriately and call the writer. This
seems to be what you are asking that Jena provide that functionality
rather than the application.
Adding the interfaces and interactions necessary to do that would still
need application code to be invoked to make the choices so I don't think
it provides much benefit.
Pretty printing RDF/XML requires all the prefixes to be available at the
start.
The whole problem is rather different for Turtle and related languages.
Analysing the model is, in general, not practical (it's too large).
It's possible to write subsets of Turtle as a single pass over the data
and analysing the data would slow that down a great deal.
Carrying all the namespaces, even unused, that were mentioned in the
initial data read is current behaviour and one that natural
user-expectation (despite prefixes having no formal role in RDF).