diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-26 04:27:21 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-26 04:27:21 +0000 |
commit | e1dcff6d7363f21e6cc96da05bc2d91e6b3cbd4f (patch) | |
tree | 8267cad6ca818d98574781cf017a20dadea2c06b /sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany | |
parent | 5833f3c5697ea9cd743b053a4940ddd19b4c1ac8 (diff) |
Use default namespace for intents specified in XPath if no prefix specified
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@979152 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyXPathFunction.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyXPathFunction.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyXPathFunction.java index d0b45b2d7d..8e2d7f9e60 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyXPathFunction.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyXPathFunction.java @@ -29,6 +29,7 @@ import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.xpath.XPathFunction; @@ -242,7 +243,7 @@ public class PolicyXPathFunction implements XPathFunction { private QName getStringAsQName(String intent) { int idx = intent.indexOf(':'); if (idx == -1) - return new QName(intent); + return new QName(namespaceContext.getNamespaceURI(XMLConstants.DEFAULT_NS_PREFIX), intent); String prefix = intent.substring(0, idx); intent = intent.substring(idx + 1); |