Add registerNamespacePrefix() to XMLHelper
------------------------------------------
Key: TUSCANY-3602
URL: https://issues.apache.org/jira/browse/TUSCANY-3602
Project: Tuscany
Issue Type: Improvement
Components: C++ SDO
Affects Versions: Cpp-M3
Reporter: Thomas Gentsch
Priority: Minor
A thing we always found quite annoying is that the SDOXMLWriter prints NS
prefixes like tns1: etc ... which is technically OK, but not nice.
When saving a SDO, the SDOXMLWriter dynamically collects all NS in a map in a
way that it adds a NS/prefix pair only, if not yet in (by URI).
This feature could be used nicely, by
- adding a method registerNamespace() to XMLHelper
- XMLHelperImpl maintains a map just like SDOXMLWriter
- whenever XMLHelperImpl is asked to save a SDO, it passes this map on to the
instance of SDOXMLWriter
using SDOXMLWriter.addNamespace() which is private currently though
Then, SDOXML just goes on like today collecting the NS ... but then, when
actually printing it uses the NS prefixes supplied by the user (or not,
depending whether the needed NS was in or not).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.