From 3d8624b6480be57c37076c68c179319aeef83d26 Mon Sep 17 00:00:00 2001 From: bdaniel Date: Wed, 21 Jul 2010 17:53:00 +0000 Subject: Update regular expression to correctly handle multiple prefixes git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@966332 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/tuscany/sca/common/xml/xpath/XPathHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/modules/common-xml/src/main/java/org') 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 f1eb6dc78a..d364aa199f 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 @@ -121,7 +121,7 @@ public class XPathHelper { private Collection getPrefixes(String expression) { Collection prefixes = new HashSet(); prefixes.add(XMLConstants.DEFAULT_NS_PREFIX); - Pattern pattern = Pattern.compile("([^:]+):([^:]+)"); + Pattern pattern = Pattern.compile("([a-zA-Z.]+):([a-zA-Z.]+)"); Matcher matcher = pattern.matcher(expression); while (matcher.find()) { String prefix = extractNCName(matcher.group(1), true); -- cgit v1.2.3