diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-23 04:03:27 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-23 04:03:27 +0000 |
commit | ea1e0402d7f3408bb0747ced4fa481b6efc81bf0 (patch) | |
tree | 55f8b213f821228526eeb1486b6f7b138f9177e8 /sca-java-2.x/trunk/modules/common-xml/src | |
parent | 7dafb5576bd9715760139fcf4a769891e3740cf4 (diff) |
Remove NameSpaceContextImpl class reference from assembly-xml
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@957102 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/common-xml/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java index a65bd5fe15..d48f010c55 100644 --- a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java +++ b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java @@ -91,11 +91,23 @@ public class XPathHelper { if (namespace != null && !XMLConstants.NULL_NS_URI.equals(namespace)) { nsContext.register(prefix, namespace); } - } + } + return nsContext; } /** + * Registers a prefix in an existing NamespaceContext + * @param prefix + * @param namespace + * @param context + */ + public void registerPrefix(String prefix, String namespace, NamespaceContext context) { + NamespaceContextImpl nsContext = (NamespaceContextImpl) context; + nsContext.register(prefix, namespace); + } + + /** * Parse the XPath expression to collect all the prefixes for namespaces * @param expression * @return A collection of prefixes |