You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2008/05/16 00:54:33 UTC

svn commit: r656888 - in /xmlbeans/trunk/samples/XQueryXPath: ./ src/org/apache/xmlbeans/samples/xquery/ src/org/apache/xmlbeans/samples/xquery/employees/ src/org/apache/xmlbeans/samples/xquery/employees/impl/

Author: radup
Date: Thu May 15 15:54:32 2008
New Revision: 656888

URL: http://svn.apache.org/viewvc?rev=656888&view=rev
Log:
Contributed by Wing Yew Poon. Update XQueryXPath sample for Saxon 9; remove generated source.

Removed:
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/AddressType.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/EmployeeType.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/EmployeesDocument.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/PhoneType.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/impl/AddressTypeImpl.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/impl/EmployeeTypeImpl.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/impl/EmployeesDocumentImpl.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/employees/impl/PhoneTypeImpl.java
Modified:
    xmlbeans/trunk/samples/XQueryXPath/README.txt
    xmlbeans/trunk/samples/XQueryXPath/build.xml
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/ExecQuery.java
    xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/SelectPath.java

Modified: xmlbeans/trunk/samples/XQueryXPath/README.txt
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/XQueryXPath/README.txt?rev=656888&r1=656887&r2=656888&view=diff
==============================================================================
--- xmlbeans/trunk/samples/XQueryXPath/README.txt (original)
+++ xmlbeans/trunk/samples/XQueryXPath/README.txt Thu May 15 15:54:32 2008
@@ -1,10 +1,10 @@
 Sample: XQueryXPath
 Author: Steven Traut (straut@bea.com)
-Last Updated: June 8, 2005
+Last Updated: May 14, 2008
 
 Versions:
     xmlbeans-v1 1.0.3
-    xmlbeans-v2
+    xmlbeans-v2 2.4.0
 
 -----------------------------------------------------------------------------
 
@@ -28,17 +28,20 @@
 
 A note about dependencies. Very simple XPath expressions -- e.g.,
 expressions without predicates or function calls -- require only
-the xbean.jar on your class path. More complex expressions require
-xbean_xpath.jar. XQuery expressions require the Saxon 8.1.1 JAR. 
-Both xbean_xpath.jar and saxon8.jar are created for you when you build
-XMLBeans from Apache source code. These files are required on the class
-path for code in this sample to run.
+the xbean.jar on your class path. More complex XPath expressions
+and XQuery expressions require an XPath/XQuery engine, such as
+Saxon. XMLBeans 2.4.0 supports the use of Saxon 9. Two Saxon jars,
+saxon9.jar and saxon9-dom.jar, as well as xbean_xpath.jar, are 
+required on the classpath for code in this sample to run.
+These jars are created in the build/lib directory if you build
+XMLBeans from Apache source.
 
 To try out this sample:
 
 1. Set XMLBEANS_HOME in your environment
 2. Ant must be on your PATH
-3. xbean_xpath.jar and saxon8.jar must be on your class path.
+3. xbean_xpath.jar, saxon9.jar, and saxon9-dom.jar must be on your 
+   classpath.
    These files are created in the build/lib directory when you 
    build XMLBeans from source.
 4. To compile the schemas and sample source, run "ant build"

Modified: xmlbeans/trunk/samples/XQueryXPath/build.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/XQueryXPath/build.xml?rev=656888&r1=656887&r2=656888&view=diff
==============================================================================
--- xmlbeans/trunk/samples/XQueryXPath/build.xml (original)
+++ xmlbeans/trunk/samples/XQueryXPath/build.xml Thu May 15 15:54:32 2008
@@ -77,7 +77,6 @@
 
         <xmlbean schema="schemas"
             destfile="build/lib/schemas.jar"
-            srcgendir="src"
             classpathref="xmlbeans.path"
             debug="on"
             />

Modified: xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/ExecQuery.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/ExecQuery.java?rev=656888&r1=656887&r2=656888&view=diff
==============================================================================
--- xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/ExecQuery.java (original)
+++ xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/ExecQuery.java Thu May 15 15:54:32 2008
@@ -59,7 +59,6 @@
         
         // A cursor instance to query with.
         XmlCursor empCursor = empDoc.newCursor();
-        empCursor.toNextToken();
 
         // The expression: Get the <employee> elements with <state> elements whose
         // value is "WA".

Modified: xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/SelectPath.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/SelectPath.java?rev=656888&r1=656887&r2=656888&view=diff
==============================================================================
--- xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/SelectPath.java (original)
+++ xmlbeans/trunk/samples/XQueryXPath/src/org/apache/xmlbeans/samples/xquery/SelectPath.java Thu May 15 15:54:32 2008
@@ -117,7 +117,7 @@
         // is inserted at the very beginning of the incoming XML, then moved to
         // the first element's START token.
         XmlCursor pathCursor = empDoc.newCursor();
-        pathCursor.toNextToken();
+        pathCursor.toFirstChild();
 
         // Execute the path expression, qualifying it with the namespace
         // declaration.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org