This PR adds the possibility to (forcefully) set namespaces prefixes on a Serializer instance, as opposed to the current suggestNamespaces and suggestPrefix methods that propose prefixes but cannot override defaults prefixes.
What it does is
fix IndexedFormula.setPrefixForURI that did allow multiple namespaces to be mapped on the same prefix
add setNamespaces and setPrefix methods on Serializer that can override default prefixes
add a options.namespaces to the serialize function, that defines namespaces that should be forcefully set
override the IndexedFormula.serialize method so that the current graph namespaces are kept as mandatory prefixes
This PR adds the possibility to (forcefully) set namespaces prefixes on a Serializer instance, as opposed to the current
suggestNamespaces
andsuggestPrefix
methods that propose prefixes but cannot override defaults prefixes.What it does is
IndexedFormula.setPrefixForURI
that did allow multiple namespaces to be mapped on the same prefixsetNamespaces
andsetPrefix
methods onSerializer
that can override default prefixesoptions.namespaces
to theserialize
function, that defines namespaces that should be forcefully setIndexedFormula.serialize
method so that the current graph namespaces are kept as mandatory prefixesAs a result ,
and keeps the graph namespace prefixes, while
behaves as before, i.e. giving priority to default prefixes