activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r525893 - in /activemq/camel/trunk/camel-saxon/src: main/java/org/apache/camel/builder/saxon/XQueryBuilder.java test/java/org/apache/camel/builder/saxon/XQueryTest.java
Date Thu, 05 Apr 2007 17:10:51 GMT
Author: jstrachan
Date: Thu Apr  5 10:10:50 2007
New Revision: 525893

URL: http://svn.apache.org/viewvc?view=rev&rev=525893
Log:
fixed up a better test case

Modified:
    activemq/camel/trunk/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
    activemq/camel/trunk/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryTest.java

Modified: activemq/camel/trunk/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java?view=diff&rev=525893&r1=525892&r2=525893
==============================================================================
--- activemq/camel/trunk/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
(original)
+++ activemq/camel/trunk/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
Thu Apr  5 10:10:50 2007
@@ -28,7 +28,7 @@
 import org.apache.camel.Predicate;
 import org.apache.camel.RuntimeExpressionException;
 import org.apache.camel.converter.jaxp.BytesSource;
-import org.apache.camel.converter.jaxp.JaxpConverter;
+import org.apache.camel.converter.jaxp.XmlConverter;
 import org.apache.camel.converter.jaxp.StringSource;
 import org.w3c.dom.Node;
 
@@ -57,7 +57,7 @@
     private XQueryExpression expression;
     private StaticQueryContext staticQueryContext;
     private Map<String, Object> parameters = new HashMap<String, Object>();
-    private JaxpConverter converter = new JaxpConverter();
+    private XmlConverter converter = new XmlConverter();
     private ResultFormat resultsFormat = ResultFormat.DOM;
     private Properties properties = new Properties();
 

Modified: activemq/camel/trunk/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryTest.java?view=diff&rev=525893&r1=525892&r2=525893
==============================================================================
--- activemq/camel/trunk/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryTest.java
(original)
+++ activemq/camel/trunk/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryTest.java
Thu Apr  5 10:10:50 2007
@@ -33,15 +33,11 @@
         Exchange exchange = new DefaultExchange(new DefaultCamelContext());
         exchange.getIn().setBody("<products><product type='food'><pizza/></product><product
type='beer'><stella/></product></products>");
 
-        Object result = xquery("//product[@type = 'beer']").asList().evaluate(exchange);
-
-        System.out.println("Returned: " + result);
-/*
+        Object result = xquery(".//product[@type = 'beer']/*").evaluate(exchange);
 
         assertTrue("Should be a document but was: " + className(result), result instanceof
Document);
 
         Document doc = (Document) result;
-        assertEquals("Root document element name", "", doc.getDocumentElement().getLocalName());
-*/
+        assertEquals("Root document element name", "stella", doc.getDocumentElement().getLocalName());
     }
 }



Mime
View raw message