summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-07-06 20:34:54 +0000
committerbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-07-06 20:34:54 +0000
commit52c5c05cd6669b5fae2813877fc073eb10b7a6c4 (patch)
tree279e6cae8796b6e4b6b8ad7c7cdb84253683d4c1
parentf093fe74dbd3b677a4980edf8a6ac9ad88f90aba (diff)
Ensure that the SCA namespace prefix is registered in the XPath namespace context
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@961010 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
index 880addb292..68475a208b 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
@@ -260,7 +260,7 @@ public class PolicySetProcessor extends BaseStAXArtifactProcessor implements StA
}
}
- return "_sca";
+ return "__sca";
}
public void readIntentMap(XMLStreamReader reader, PolicySet policySet, Intent mappedIntent, ProcessorContext context)
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 c2ce8c427d..f1eb6dc78a 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,7 +91,8 @@ public class XPathHelper {
String namespace = context.getNamespaceURI(prefix);
if (namespace != null && !XMLConstants.NULL_NS_URI.equals(namespace)) {
nsContext.register(prefix, namespace);
- found = true;
+ if ( (namespace.equals("http://docs.oasis-open.org/ns/opencsa/sca/200912")) && !prefix.equals(XMLConstants.DEFAULT_NS_PREFIX))
+ found = true;
}
}