[
https://issues.jboss.org/browse/SRAMP-230?page=com.atlassian.jira.plugin....
]
Eric Wittmann commented on SRAMP-230:
-------------------------------------
Note: the intent of the deriver is for it to be stateless and lightweight. So it's
not a good idea to hang on to the namespace context in any case. Instead, the approach to
fixing this issue is to create a XmlDeriverContext that will get passed around. This
object will have the root element and XPath objects. Additionally, it will have a
"addNamespaceMapping" method to solve the above problem.
ArtifactDeriver Subclasses Should Have Direct Access To The
StaticNamespaceContext
----------------------------------------------------------------------------------
Key: SRAMP-230
URL:
https://issues.jboss.org/browse/SRAMP-230
Project: S-RAMP
Issue Type: Task
Security Level: Public(Everyone can see)
Components: Core
Affects Versions: 0.4.0 - API Management
Reporter: Dan Florian
Assignee: Eric Wittmann
Fix For: 0.3.1 - jBPM - bugfix 1
While writing a custom {{AbstractXmlDeriver}}, I needed to register a namespace
discovered during the processing of the XML file (i.e., during the {{derive}} method). The
only way I could figure out how to do this was to cache the instance of the
{{StaticNamespaceContext}} passed into the {{configureNamespaceMappings}} method. Then,
when the {{derive}} method is called I could register namespaces with the namespace
context. It would be nice to have a getter for the namespace context for subclasses to
use.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira