You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2006/08/31 00:10:29 UTC

svn commit: r438669 - /incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java

Author: mriou
Date: Wed Aug 30 15:10:29 2006
New Revision: 438669

URL: http://svn.apache.org/viewvc?rev=438669&view=rev
Log:
Removed unnecessary dependency on Saxon.

Modified:
    incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java

Modified: incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java?rev=438669&r1=438668&r2=438669&view=diff
==============================================================================
--- incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java (original)
+++ incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/compiler/XPath20ExpressionCompilerBPEL20.java Wed Aug 30 15:10:29 2006
@@ -18,7 +18,6 @@
  */
 package org.apache.ode.bpel.elang.xpath20.compiler;
 
-import net.sf.saxon.xpath.XPathEvaluator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bom.api.Expression;
@@ -37,6 +36,7 @@
 import org.w3c.dom.Node;
 
 import javax.xml.namespace.QName;
+import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
@@ -129,8 +129,7 @@
             XPathFactory xpf = new net.sf.saxon.xpath.XPathFactoryImpl();
             xpf.setXPathFunctionResolver(new JaxpFunctionResolver(_compilerContext, out, source.getNamespaceContext(), Constants.BPEL20_NS));
             xpf.setXPathVariableResolver(new JaxpVariableResolver(_compilerContext, out));
-            XPathEvaluator xpe = (XPathEvaluator) xpf.newXPath();
-
+            XPath xpe = xpf.newXPath();
             xpe.setNamespaceContext(source.getNamespaceContext());
             XPathExpression expr = xpe.compile(xpathStr);
             // Here we're "faking" an evaluation to parse properly variables and functions and
@@ -138,7 +137,8 @@
             // return guessed appropriate values from variable types.
             expr.evaluate(DOMUtils.newDocument());
         } catch (XPathExpressionException e) {
-            throw new CompilationException(__msgs.warnXPath20Syntax(xpathStr, e.getCause().toString()), e.getCause());
+            __log.info("Couldn't validate properly expression " + xpathStr);
+//            throw new CompilationException(__msgs.warnXPath20Syntax(xpathStr, e.getCause().toString()), e.getCause());
         } catch (WrappedResolverException wre) {
             if (wre._compilationMsg != null) throw new CompilationException(wre._compilationMsg, wre);
             if (wre.getCause() instanceof CompilationException) throw (CompilationException)wre.getCause();