[libjaxen-java] 20/49: Merge new upstream version 1.1.1.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Oct 25 13:22:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository libjaxen-java.

commit 4874bdc589bc6f4802ffc4de9049fa8d8b97bd28
Author: Marcus Better <marcus at better.se>
Date:   Wed Jun 6 15:23:13 2007 +0000

    Merge new upstream version 1.1.1.
---
 build.xml                                          |  24 +-
 debian/changelog                                   |   5 +-
 maven.xml                                          |   6 +
 project.properties                                 |  14 +-
 project.xml                                        |  79 ++--
 src/conf/MANIFEST.MF                               |   9 -
 src/doc/default.css                                | 124 ------
 src/doc/download.xml                               |  86 ----
 src/doc/faq.xml                                    | 117 ------
 src/doc/index.xml                                  |  73 ----
 src/doc/project.xml                                |  41 --
 src/doc/status.xml                                 | 145 -------
 src/doc/style/document.xsl                         | 202 ---------
 src/doc/style/images/ball.gif                      | Bin 377 -> 0 bytes
 src/doc/style/images/blank.gif                     | Bin 807 -> 0 bytes
 src/doc/style/images/blueball.gif                  | Bin 377 -> 0 bytes
 src/doc/style/images/jars.gif                      | Bin 2159 -> 0 bytes
 src/doc/style/images/logo.gif                      | Bin 1508 -> 0 bytes
 src/doc/style/javadoc.css                          |  27 --
 src/doc/style/style.xsl                            | 322 --------------
 src/java/main/org/jaxen/BaseXPath.java             |  12 +-
 src/java/main/org/jaxen/Context.java               |  35 +-
 src/java/main/org/jaxen/XPath.java                 |   4 +-
 src/java/main/org/jaxen/XPathFunctionContext.java  |  19 +-
 src/java/main/org/jaxen/dom/DocumentNavigator.java |  21 +-
 src/java/main/org/jaxen/expr/AdditiveExpr.java     |  24 +-
 src/java/main/org/jaxen/expr/AllNodeStep.java      |  13 +-
 src/java/main/org/jaxen/expr/BinaryExpr.java       |  38 +-
 src/java/main/org/jaxen/expr/CommentNodeStep.java  |  12 +-
 .../jaxen/expr/DefaultAbsoluteLocationPath.java    |  12 +-
 .../main/org/jaxen/expr/DefaultAllNodeStep.java    |  14 +-
 src/java/main/org/jaxen/expr/DefaultAndExpr.java   |  14 +-
 .../main/org/jaxen/expr/DefaultBinaryExpr.java     |  15 +-
 .../org/jaxen/expr/DefaultCommentNodeStep.java     |  13 +-
 src/java/main/org/jaxen/expr/DefaultDivExpr.java   |  14 +-
 .../main/org/jaxen/expr/DefaultEqualsExpr.java     |  14 +-
 .../main/org/jaxen/expr/DefaultFilterExpr.java     |  13 +-
 .../org/jaxen/expr/DefaultFunctionCallExpr.java    |  12 +-
 .../jaxen/expr/DefaultGreaterThanEqualExpr.java    |  13 +-
 .../org/jaxen/expr/DefaultGreaterThanExpr.java     |  12 +-
 .../org/jaxen/expr/DefaultLessThanEqualExpr.java   |  12 +-
 .../main/org/jaxen/expr/DefaultLessThanExpr.java   |  13 +-
 .../main/org/jaxen/expr/DefaultLiteralExpr.java    |  23 +-
 src/java/main/org/jaxen/expr/DefaultMinusExpr.java |  12 +-
 src/java/main/org/jaxen/expr/DefaultModExpr.java   |  12 +-
 .../main/org/jaxen/expr/DefaultMultiplyExpr.java   |  12 +-
 src/java/main/org/jaxen/expr/DefaultNameStep.java  |  73 ++--
 .../main/org/jaxen/expr/DefaultNotEqualsExpr.java  |  14 +-
 .../main/org/jaxen/expr/DefaultNumberExpr.java     |  18 +-
 src/java/main/org/jaxen/expr/DefaultOrExpr.java    |  13 +-
 src/java/main/org/jaxen/expr/DefaultPathExpr.java  |  13 +-
 src/java/main/org/jaxen/expr/DefaultPlusExpr.java  |  13 +-
 src/java/main/org/jaxen/expr/DefaultPredicate.java |  13 +-
 .../expr/DefaultProcessingInstructionNodeStep.java |  37 +-
 .../jaxen/expr/DefaultRelativeLocationPath.java    |  12 +-
 .../main/org/jaxen/expr/DefaultTextNodeStep.java   |  12 +-
 src/java/main/org/jaxen/expr/DefaultUnaryExpr.java |  13 +-
 src/java/main/org/jaxen/expr/DefaultUnionExpr.java |  13 +-
 .../jaxen/expr/DefaultVariableReferenceExpr.java   |  12 +-
 .../main/org/jaxen/expr/DefaultXPathFactory.java   |  88 ++--
 src/java/main/org/jaxen/expr/EqualityExpr.java     |  24 +-
 src/java/main/org/jaxen/expr/Expr.java             |  49 ++-
 src/java/main/org/jaxen/expr/FilterExpr.java       |  29 +-
 src/java/main/org/jaxen/expr/FunctionCallExpr.java |  44 +-
 src/java/main/org/jaxen/expr/LiteralExpr.java      |  23 +-
 src/java/main/org/jaxen/expr/LocationPath.java     |  39 +-
 src/java/main/org/jaxen/expr/LogicalExpr.java      |  30 +-
 .../main/org/jaxen/expr/MultiplicativeExpr.java    |  30 +-
 src/java/main/org/jaxen/expr/NameStep.java         |  35 +-
 src/java/main/org/jaxen/expr/NumberExpr.java       |  23 +-
 src/java/main/org/jaxen/expr/PathExpr.java         |  38 +-
 src/java/main/org/jaxen/expr/Predicate.java        |  56 ++-
 src/java/main/org/jaxen/expr/PredicateSet.java     |  64 ++-
 src/java/main/org/jaxen/expr/Predicated.java       |  31 +-
 .../jaxen/expr/ProcessingInstructionNodeStep.java  |  17 +-
 src/java/main/org/jaxen/expr/RelationalExpr.java   |  31 +-
 src/java/main/org/jaxen/expr/Step.java             |  41 +-
 src/java/main/org/jaxen/expr/TextNodeStep.java     |  12 +-
 src/java/main/org/jaxen/expr/UnaryExpr.java        |  23 +-
 src/java/main/org/jaxen/expr/UnionExpr.java        |  19 +-
 .../main/org/jaxen/expr/VariableReferenceExpr.java |  28 +-
 src/java/main/org/jaxen/expr/Visitable.java        |  50 ---
 src/java/main/org/jaxen/expr/Visitor.java          |  71 ----
 src/java/main/org/jaxen/expr/VisitorSupport.java   |  89 ----
 src/java/main/org/jaxen/expr/XPathExpr.java        |  53 ++-
 src/java/main/org/jaxen/expr/XPathFactory.java     | 211 +++++++++-
 .../jaxen/function/ext/MatrixConcatFunction.java   | 165 --------
 src/java/main/org/jaxen/pantry/Test.java           |  48 ---
 .../main/org/jaxen/util/AncestorAxisIterator.java  |  25 +-
 .../org/jaxen/util/AncestorOrSelfAxisIterator.java |  48 ++-
 .../org/jaxen/util/DescendantAxisIterator.java     |  44 +-
 .../jaxen/util/DescendantOrSelfAxisIterator.java   |  23 +-
 .../main/org/jaxen/util/FollowingAxisIterator.java |  44 +-
 .../jaxen/util/FollowingSiblingAxisIterator.java   |  48 ++-
 src/java/main/org/jaxen/util/LinkedIterator.java   |  15 +-
 .../main/org/jaxen/util/PrecedingAxisIterator.java |  67 ++-
 .../jaxen/util/PrecedingSiblingAxisIterator.java   |  46 +-
 src/java/main/org/jaxen/util/SelfAxisIterator.java |  21 +-
 .../main/org/jaxen/util/SingleObjectIterator.java  |  38 +-
 src/java/main/org/jaxen/util/SingletonList.java    |  36 +-
 src/java/main/org/jaxen/util/XPath2XMLVisitor.java | 237 -----------
 src/java/main/org/jaxen/xom/package.html           |  16 +
 .../test/{ModTest.java => BinaryExprTest.java}     |  52 +--
 src/java/test/org/jaxen/test/ContextTest.java      |  29 +-
 src/java/test/org/jaxen/test/CoreTests.java        |   4 +-
 .../{ModTest.java => DefaultNamestepTest.java}     |  79 ++--
 .../test/org/jaxen/test/DefaultXPathExprTest.java  |   3 +-
 .../{ModTest.java => DefaultXPathFactoryTest.java} |  46 +-
 src/java/test/org/jaxen/test/ExprComparator.java   | 461 +++++++++++++++++++++
 src/java/test/org/jaxen/test/ExprTests.java        |   6 +-
 .../test/{ModTest.java => IterableAxisTest.java}   |  62 ++-
 .../test/{ModTest.java => LiteralExprTest.java}    |  61 +--
 src/java/test/org/jaxen/test/ModTest.java          |   4 +-
 ...est.java => ProcessingInstructionNodeTest.java} |  63 +--
 .../org/jaxen/test/SimpleVariableContextTest.java  |   6 +-
 src/java/test/org/jaxen/test/XPathTestBase.java    |   8 +
 src/javadoc/j2se/package-list                      |  76 ----
 src/javadoc/jaxp/package-list                      |   9 -
 118 files changed, 2374 insertions(+), 2702 deletions(-)

diff --git a/build.xml b/build.xml
index 5d3cf05..fdc37d0 100644
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!--build.xml generated by maven from project.xml version 1.1-beta-11
-  on date October 8 2006, time 1741-->
+<!--build.xml generated by maven from project.xml version 1.1.1
+  on date May 5 2007, time 1501-->
 
 <project default="jar" name="jaxen" basedir=".">
   <property name="defaulttargetdir" value="target">
@@ -20,7 +20,7 @@
   </property>
   <property name="javadocdir" value="dist/docs/api">
   </property>
-  <property name="final.name" value="jaxen-1.1-beta-11">
+  <property name="final.name" value="jaxen-1.1.1">
   </property>
   <path id="build.classpath">
     <fileset dir="${libdir}">
@@ -136,9 +136,9 @@
       <format pattern="2001-yyyy" property="year">
       </format>
     </tstamp>
-    <property name="copyright" value="Copyright &copy; 2001-2006 Codehaus. All Rights Reserved.">
+    <property name="copyright" value="Copyright &copy; 2001-2007 Codehaus. All Rights Reserved.">
     </property>
-    <property name="title" value="jaxen 1.1-beta-11 API">
+    <property name="title" value="jaxen 1.1.1 API">
     </property>
     <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java/main" packagenames="org.jaxen.*">
       <classpath>
@@ -152,19 +152,19 @@
 
     <setproxy>
     </setproxy>
-    <get dest="${libdir}/dom4j-1.6.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//dom4j/jars/dom4j-1.6.1.jar">
+    <get dest="${libdir}/dom4j-1.6.1.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/dom4j/jars/dom4j-1.6.1.jar">
     </get>
-    <get dest="${libdir}/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//jdom/jars/jdom-1.0.jar">
+    <get dest="${libdir}/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/jdom/jars/jdom-1.0.jar">
     </get>
-    <get dest="${libdir}/xml-apis-1.3.02.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//xml-apis/jars/xml-apis-1.3.02.jar">
+    <get dest="${libdir}/xml-apis-1.3.02.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/xml-apis/jars/xml-apis-1.3.02.jar">
     </get>
-    <get dest="${libdir}/xercesImpl-2.6.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//xerces/jars/xercesImpl-2.6.2.jar">
+    <get dest="${libdir}/xercesImpl-2.6.2.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/xerces/jars/xercesImpl-2.6.2.jar">
     </get>
-    <get dest="${libdir}/xom-1.0b3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//xom/jars/xom-1.0b3.jar">
+    <get dest="${libdir}/xom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/xom/jars/xom-1.0.jar">
     </get>
-    <get dest="${libdir}/maven-cobertura-plugin-1.1.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//maven-plugins/plugins/maven-cobertura-plugin-1.1.1.jar">
+    <get dest="${libdir}/maven-cobertura-plugin-1.3.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/maven-plugins/plugins/maven-cobertura-plugin-1.3.jar">
     </get>
-    <get dest="${libdir}/maven-findbugs-plugin-0.9.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//maven-plugins/plugins/maven-findbugs-plugin-0.9.2.jar">
+    <get dest="${libdir}/maven-findbugs-plugin-1.3.1.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/maven-plugins/plugins/maven-findbugs-plugin-1.3.1.jar">
     </get>
   </target>
   <target name="install-maven">
diff --git a/debian/changelog b/debian/changelog
index 8c7a1a5..1b83b11 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-libjaxen-java (1.1~beta11-2) UNRELEASED; urgency=low
+libjaxen-java (1.1.1-1) unstable; urgency=low
 
+  * New upstream release. (Closes: #427224)
   * debian/control: Add XS-Vcs-* fields.
 
- -- Marcus Better <marcus at better.se>  Mon, 18 Dec 2006 18:32:18 +0100
+ -- Marcus Better <marcus at better.se>  Wed, 06 Jun 2007 17:21:05 +0200
 
 libjaxen-java (1.1~beta11-1) unstable; urgency=low
 
diff --git a/maven.xml b/maven.xml
index 5d954cf..2c58e55 100644
--- a/maven.xml
+++ b/maven.xml
@@ -5,6 +5,12 @@
       <attainGoal name="dist:build-src" />
     </preGoal>
 
+    <postGoal name="dist:build-bin">
+        <ant:copy 
+          tofile="${maven.build.dir}/distributions/jaxen-${pom.currentVersion}.pom" 
+          file="project.xml" />
+    </postGoal>
+
     <postGoal name="dist:prepare-bin-filesystem">
         <ant:copy todir="${maven.dist.bin.assembly.dir}">
             <fileset dir=".">
diff --git a/project.properties b/project.properties
index 7e949e5..0787234 100644
--- a/project.properties
+++ b/project.properties
@@ -12,6 +12,7 @@ maven.compile.deprecation = on
 maven.compile.target = 1.2
 maven.compile.source = 1.3
 
+
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 #     xdocs
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
@@ -47,8 +48,8 @@ checkstyle.const.pattern = ^[a-zA-Z][a-zA-Z0-9_]*$
 #     pmd
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
-maven.jar.override=on
-maven.jar.pmd=3.2
+# maven.jar.override=on
+# maven.jar.pmd=3.8
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 #     javadoc
@@ -60,6 +61,13 @@ maven.javadoc.links = \
 	http://java.sun.com/j2se/1.4.2/docs/api/
 maven.javadoc.excludepackagenames = org.jaxen.saxpath.base,org.jaxen.saxpath.helpers
 
+maven.javadoc.customtags=tag1
+tag1.name=todo
+tag1.description=To Do:
+tag1.enabled=false
+tag1.scope=all
+
+
 maven.jarResources.basedir = src/java/main/
 
 maven.xdoc.date = left
@@ -71,7 +79,7 @@ maven.junit.fork=true
 #maven.latex.src.dir = ${basedir}/src/latex/
 #maven.latex.docs = intro-slides.tex
 
-maven.repo.remote=http://www.ibiblio.org/maven/,http://dist.codehaus.org/
+maven.repo.remote=http://repo1.maven.org/maven,http://dist.codehaus.org/
 maven.repo.central=dist.codehaus.org
 maven.repo.central.directory=/dist
 maven.remote.group=jaxen
\ No newline at end of file
diff --git a/project.xml b/project.xml
index e818d61..6044b90 100644
--- a/project.xml
+++ b/project.xml
@@ -5,11 +5,11 @@
   <pomVersion>3</pomVersion>
   <id>jaxen</id>
   <name>jaxen</name>
-  <currentVersion>1.1-beta-11</currentVersion>
+  <currentVersion>1.1.1</currentVersion>
 
   <organization>
     <name>Codehaus</name>
-    <url>http://www.codehaus.org</url>
+    <url>http://codehaus.org</url>
     <logo>http://codehaus.org/codehaus-small.gif</logo>
   </organization>
   <inceptionYear>2001</inceptionYear>
@@ -30,37 +30,36 @@
   <distributionDirectory>/dist</distributionDirectory>
   
   <repository>
-    <connection>scm:cvs:pserver:anonymous at cvs.jaxen.codehaus.org:/home/projects/jaxen/scm:jaxen</connection>
+    <connection>scm:cvs:pserver:anonymous at cvs.jaxen.codehaus.org:/cvs/jaxen:jaxen</connection>
     <url>http://cvs.jaxen.codehaus.org</url>
   </repository>
   
-    <!-- the archive URLs are broken ???? -->
-    <mailingLists>
-        <mailingList>
-            <name>Jaxen Users List</name>
-            <subscribe>user-subscribe at jaxen.codehaus.org</subscribe>
-            <unsubscribe>user-unsubscribe at jaxen.codehaus.org</unsubscribe>
-            <!--<archive>http://archive.jaxen.codehaus.org/user/</archive> -->
-        </mailingList>
-        <mailingList>
-            <name>Jaxen Developers List</name>
-            <subscribe>dev-subscribe at jaxen.codehaus.org</subscribe>
-            <unsubscribe>dev-unsubscribe at jaxen.codehaus.org</unsubscribe>
-         <!--   <archive>http://archive.jaxen.codehaus.org/dev/</archive> -->
-        </mailingList>
-        <mailingList>
-            <name>Jaxen CVS Commits List</name>
-            <subscribe>scm-subscribe at jaxen.codehaus.org</subscribe>
-            <unsubscribe>scm-unsubscribe at jaxen.codehaus.org</unsubscribe>
-       <!--     <archive>http://archive.jaxen.codehaus.org/scm/</archive> -->
-        </mailingList>
-        <mailingList>
-            <name>Jaxen Announcement List</name>
-            <subscribe>announce-subscribe at jaxen.codehaus.org</subscribe>
-            <unsubscribe>announce-unsubscribe at jaxen.codehaus.org</unsubscribe>
-       <!--     <archive>http://archive.jaxen.codehaus.org/announce/</archive> -->
-        </mailingList>
-    </mailingLists>
+  <mailingLists>
+    <mailingList>
+        <name>Jaxen Users List</name>
+        <subscribe>user-subscribe at jaxen.codehaus.org</subscribe>
+        <unsubscribe>user-unsubscribe at jaxen.codehaus.org</unsubscribe>
+        <archive>http://archive.jaxen.codehaus.org/user/</archive>
+    </mailingList>
+    <mailingList>
+        <name>Jaxen Developers List</name>
+        <subscribe>dev-subscribe at jaxen.codehaus.org</subscribe>
+        <unsubscribe>dev-unsubscribe at jaxen.codehaus.org</unsubscribe>
+        <archive>http://archive.jaxen.codehaus.org/dev/</archive>
+    </mailingList>
+    <mailingList>
+        <name>Jaxen CVS Commits List</name>
+        <subscribe>scm-subscribe at jaxen.codehaus.org</subscribe>
+        <unsubscribe>scm-unsubscribe at jaxen.codehaus.org</unsubscribe>
+        <archive>http://archive.jaxen.codehaus.org/scm/</archive>
+    </mailingList>
+    <!-- <mailingList>
+        <name>Jaxen Announcement List</name>
+        <subscribe>announce-subscribe at jaxen.codehaus.org</subscribe>
+        <unsubscribe>announce-unsubscribe at jaxen.codehaus.org</unsubscribe>
+        <archive>http://archive.jaxen.codehaus.org/announce/</archive>
+    </mailingList> -->
+  </mailingLists>
 
 
   <developers>
@@ -157,6 +156,11 @@
 
   <contributors>
     <contributor>
+      <name>Ryan Gustafson</name> 
+      <email>rgustav at users.sourceforge.net</email>
+    </contributor>
+
+    <contributor>
       <name>David Peterson</name> 
       <email>david at randombits.org</email>
     </contributor>
@@ -210,11 +214,17 @@
       <email>cao at ispsoft.com</email>
     </contributor>
 
-   <contributor>
+    <contributor>
       <name>Jérôme Nègre</name>
       <email>jerome.negre at e-xmlmedia.fr</email>
     </contributor>
 
+    <!-- org.jaxen.ext.MatrixConcat function -->
+    <!-- <contributor>
+      <name>James Pereira</name>
+      <email>JPereira at CT.BBD.CO.ZA</email>
+    </contributor> -->
+
     <!-- found next two in CVS-->
     <contributor>
       <name>Eddie McGreal</name>
@@ -240,7 +250,6 @@
      <report>maven-jxr-plugin</report>
      <report>maven-junit-report-plugin</report>
      <report>maven-linkcheck-plugin</report>
-     <report>maven-tasklist-plugin</report>
      <report>maven-pmd-plugin</report> 
      <report>maven-findbugs-plugin</report> 
    <!-- commenting out until they fix their repository  <report>jutils-lint4j-plugin</report> -->
@@ -279,13 +288,13 @@
     <dependency>
       <groupId>xom</groupId>
       <artifactId>xom</artifactId>
-      <version>1.0b3</version>
+      <version>1.0</version>
     </dependency>
 
     <dependency>
       <groupId>maven-plugins</groupId>
       <artifactId>maven-cobertura-plugin</artifactId>
-      <version>1.1.1</version>
+      <version>1.3</version>
       <type>plugin</type>
     </dependency>
     
@@ -299,7 +308,7 @@
     <dependency>
       <groupId>maven-plugins</groupId>
       <artifactId>maven-findbugs-plugin</artifactId>
-      <version>0.9.2</version>
+      <version>1.3.1</version>
       <type>plugin</type>
     </dependency>
 
diff --git a/src/conf/MANIFEST.MF b/src/conf/MANIFEST.MF
deleted file mode 100644
index 092f5ec..0000000
--- a/src/conf/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Extension-Name: org.jaxen
-Specification-Title: jaxen
-Specification-Version: 1.0 FCS
-Specification-Vendor: bob mcwhirter & James Strachan.
-Created-By: Ant 1.4.1
-Implementation-Vendor:  bob mcwhirter & James Strachan.
-Implementation-Version: 1.0 FCS
-Implementation-Title: jaxen
diff --git a/src/doc/default.css b/src/doc/default.css
deleted file mode 100644
index 49d3b7c..0000000
--- a/src/doc/default.css
+++ /dev/null
@@ -1,124 +0,0 @@
-body {
-  margin: 2em 1em 2em 70px;
-  font-family: sans-serif;
-  color: black;
-  background: white;
-  background-position: top left;
-  background-attachment: fixed;
-  background-repeat: no-repeat;
-}
-
-th, td { /* ns 4 */
-  font-family: sans-serif;
-}
-
-h1, h2, h3, h4, h5, h6 { text-align: left }
-h1, h2, h3, h4, h5 { color: #005A9C }
-h1 { font: 170% sans-serif }
-h2 { font: 140% sans-serif }
-h3 { font: 120% sans-serif }
-h4 { font: bold 100% sans-serif }
-h5 { font: italic 100% sans-serif }
-h6 { font: small-caps 100% sans-serif }
-
-.hide { display: none }
-
-div.head { margin-bottom: 1em }
-div.head h1 { margin-top: 2em; clear: both }
-div.head table { margin-left: 2em; margin-top: 2em }
-div.head img { color: white; border: none } /* remove border from top image */
-
-p.copyright { font-size: small }
-p.copyright small { font-size: small }
-
- at media screen {  /* hide from IE3 */
-a:hover { background: #ffa } 
-}
-
-dt, dd { margin-top: 0; margin-bottom: 0 } /* opera 3.50 */
-dt { font-weight: bold }
-
-pre, code { font-family: monospace } /* navigator 4 requires this */
-
-ul.toc {
-  list-style: disc;		/* Mac NS has problem with 'none' */
-  list-style: none;
-}
-
- at media aural {  
-  h1, h2, h3 { stress: 20; richness: 90 }
-  .hide { speak: none }
-  p.copyright { volume: x-soft; speech-rate: x-fast }
-  dt { pause-before: 20% }
-  pre { speak-punctuation: code } 
-}
-
-/* Things (icons) that should only show up in projection mode */
-.projection { display: none }
- at media projection { .projection { display: inline } }
-
-div.example {
-    width: 100%;
-    color: black;
-}
-div.dtd-example {
-    width: 100%;
-    color: black;
-}
-tt.example {
-    color: maroon;
-    margin-left: 1em;
-}
-pre {
-    color: maroon;
-}
-div.dtd-fragment {
-    width: 100%;
-    border: none;
-    background-color: #eee;
-}
-pre.dtd-fragment {
-    margin-left: 0;
-}
-pre.dtd {
-    color: black;
-    margin-left: 0;
-}
-div.illegal-example {
-    width: 100%;
-    color: red;
-    border: solid red;
-}
-div.illegal-example p {
-    color: black;
-}
-div.deprecated-example {
-    width: 100%;
-    color: red;
-    border: solid rgb(255,165,0); /* orange */
-}
-div.deprecated-example p {
-    color: black;
-}
-div.note {
-    color: green;
-    margin-left: 1em;
-}
-p.note {
-    color: green;
-    margin-left: 1em;
-}
-ul.toc {
-    list-style-type: none;
-}
-
-a.normref { 
-    color : red;
-}	
-
-a.informref {
-    color : green;
-}	
-
-DIV.subtoc {padding: 1em; border: solid thin; margin: 1em 0;
-    background: #ddd}
diff --git a/src/doc/download.xml b/src/doc/download.xml
deleted file mode 100644
index 6c5a44a..0000000
--- a/src/doc/download.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<document url="http://jaxen.org/download.xml">
-  <body>
-    <title>Download Jaxen</title>
-    
-    <section title="Download the current release">
-      <p>The current release is version $VERSION$.</p>
-      <p>It can be downloaded at
-        <a href="http://sourceforge.net/project/showfiles.php?group_id=31447">SourceForge</a>
-        or directly via one of the following links:-
-      </p>
-      <ul>
-          <li>
-            <a href="http://prdownloads.sourceforge.net/jaxen/jaxen-$VERSION$.zip">jaxen-$VERSION$.zip</a> for Windows platforms (ZIP)
-          </li>
-          <li>
-            <a href="http://prdownloads.sourceforge.net/jaxen/jaxen-$VERSION$.tar.gz">jaxen-$VERSION$.tar.gz</a> for all other platforms (Tarball)
-          </li>
-      </ul>
-    </section>
-
-<!--
-    <section title="Download a daily build">
-      <ul>
-        <li><a href="../../dist/jaxen-daily.zip">jaxen-daily.zip</a> 
-            for Windows platforms (ZIP)
-        </li>
-        <li><a href="../../dist/jaxen-daily.tar.gz">jaxen-daily.tar.gz</a>
-            for all other platforms (Tarball)
-        </li>
-      </ul>
-    </section>
--->
-
-    <section title="Obtaining the latest CVS snapshot">
-      
-      <p>
-        You can browse the current CVS repository 
-        <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jaxen/">here</a>
-      </p>
-
-      <p>To learn more about CVS go <a href="http://www.cvshome.org/">here</a>.
-      </p>
-
-      <section title="Anonymous CVS Access">
-        <p>
-        This project's SourceForge CVS repository can be checked out through anonymous 
-        (pserver) <a href="http://www.cvshome.org/">CVS</a> with the following instruction set. 
-        When prompted for a password for anonymous, simply press the Enter key. 
-        </p>
-        <pre>
-cvs -d:pserver:anonymous at cvs.jaxen.org:/cvsroot/jaxen login 
-
-cvs -d:pserver:anonymous at cvs.jaxen.org:/cvsroot/jaxen co jaxen
-        </pre>
-        <p>Updates from within the module's directory do not need the -d parameter.
-        </p>
-      </section>
-
-      <section title="Developer CVS Access via SSH">
-        <p>
-        Only project developers can access the CVS tree via this method. 
-        SSH1 must be installed on your client machine. 
-        Substitute developername with the proper values. 
-        Enter your site password when prompted.
-        </p>
-
-        <pre>
-export CVS_RSH=ssh 
- 
-cvs -d:ext:developername at cvs.jaxen.org:/cvsroot/jaxen co jaxen
-        </pre>
-      </section>
-
-    </section>
-  </body>
-</document>
-
-
-
-
-
-
-
-
-
diff --git a/src/doc/faq.xml b/src/doc/faq.xml
deleted file mode 100644
index 6c9e8c8..0000000
--- a/src/doc/faq.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<document url="http://jaxen.org/faq.xml">
-  <body>
-    <title>Frequently Asked Questions</title>
-    
-    <section title="What is Jaxen?">
-      <p>
-      The <i>Jaxen</i> project is a Java XPath Engine.
-      <i>Jaxen</i> is a universal object model walker, capable of evaluating
-      XPath expressions across multiple models.  Currently supported
-      are <a href="http://dom4j.org">dom4j</a> and <a href="http://jdom.org">JDOM</a>.
-      </p>
-    </section>
-
-    <section title="What is the Jaxen license?">
-      <p>We use an Apache-style open source license which is one of the least
-        restrictive licenses around, you can use <i>Jaxen</i> to create new products
-        without them having to be open source.
-      </p>
-    </section>
-
-    <section title="Why is Jaxen useful?">
-      <p>
-      After implementing an XPath engine for both <a href="http://dom4j.org">dom4j</a> and
-      <a href="http://jdom.org">JDOM</a>, and attempting to keep them both in sync, it was
-      decided that factoring out the commonality would be a Good Thing.  Thus, <i>Jaxen</i>
-      provides a single point for XPath expression evaluation, regardless of the target
-      object model, whether its <b>dom4j</b>, <b>JDOM</b>, <b>DOM</b>, <b>JavaBeans</b>,
-      or whatnot.
-      </p>
-    </section>
-
-    <section title="Why is Jaxen better than <some other xpath technology>">
-      <p>
-      <i>Jaxen</i> is better than <b>werken.xpath</b> specifically because it better
-      handles XPath expressions, and syntax error reporting.  Additionally, since
-      Jaxen is a unified code-base, developer effort isn't split between maintaining
-      the <b>dom4j</b> version and the <b>JDOM</b> version.  More hands working on
-      the same project reduces bug count.
-      </p>
-
-      <p>
-      <i>Jaxen</i> may be perceived to be better than other XPath technologies since it
-      provides a single cohesive API for evaluating XPaths against multiple object
-      models.  Learn the <i>Jaxen</i> API, and apply it to <b>dom4j</b>, <b>JDOM</b>,
-      <b>EXML</b> or <b>DOM</b> trees in exactly the same way.
-      </p>
-
-      <p>
-      Also, since <i>Jaxen</i> works against an adaptor which provides InfoSet access
-      to arbitrary object models, it should be possible to build even larger
-      tools in terms of <i>Jaxen</i>, to work with multiple models.  For example, an
-      <b>XQL</b> engine could be developed, which would automagically work with
-      all models already supported by <i>Jaxen</i>.
-      </p>
-    </section>
-
-    <section title="What are some related technologies?">
-      <p>
-      <i>Jaxen</i> currently has navigators defined for <a href="http://dom4j.org/">dom4j</a>
-      and <a href="http://jdom.org/">JDOM</a>, two popular and convenient object models
-      for representing XML documents.  Additionally, <a href="http://themindelectric.com/">The Mind Electric's</a>
-      EXML is supported, providing better XPath support within the GLUE platform.
-      Of course, <a href="http://w3c.org/">W3C DOM</a> is also supported.
-      </p>
-    </section>
-
-    <section title="How do I support a different object model?">
-      <p>
-      The only thing required is an implementation of the interface 
-      <code>org.jaxen.Navigator</code>.  Not all of the interface is required,
-      and a default implementation, in the form of <code>org.jaxen.DefaultNavigator</code>
-      is also provided.
-      </p>
-
-      <p>
-      Since many of the XPath axes can be defined in terms of each other (for example,
-      the <code>ancestor</code> axis is merely a the <code>parent</code> recursively
-      applied), only a few low-level axis iterators are required to initially get
-      started.  Of course, you may implement them directly, instead of relying upon
-      <i>Jaxen</i>'s composition ability.
-      </p>
-
-    </section>
-
-    <section title="Is Jaxen only good for XPath evaluation?">
-      <p>
-      No. 
-      </p>
-
-      <p>
-      The <i>DocumentNavigators</i> provided with <i>Jaxen</i> would be used
-      by themselves, without the XPath evaluation engine, to provide univeral
-      access to many object models for other technologies.
-      </p>
-    </section>
-
-    <section title="Who uses Jaxen?">
-      <p>
-      <i>Jaxen</i> has been embedded directly into <b>dom4j</b> to provide
-      easy XPath evaluation directly from your documents.  Additionally, it's
-      being integrated into David Megginson's 
-      <a href="http://sourceforge.net/projects/newsml-toolkit/">NewsML Framework</a>.
-      </p>
-    </section>
-
-  </body>
-</document>
-
-
-
-
-
-
-
-
-
diff --git a/src/doc/index.xml b/src/doc/index.xml
deleted file mode 100644
index 619bbea..0000000
--- a/src/doc/index.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<document url="http://jaxen.org/index.xml">
-  <body>
-    <title>Jaxen: Java XPath Engine</title>
-
-    <header>
-      <p>
-      <i>Jaxen</i> is a fast Java engine for <a href="http://www.w3.org/TR/xpath">XPath 1.0</a>
-      that works on all XML object models. The following models are currently supported out of the box
-      <ul>
-      <li><a href="http://www.w3.org/DOM/">DOM</a></li>
-      <li><a href="http://dom4j.org">dom4j</a></li>
-      <li><a href="http://www.xom.nu/">XOM</a></li>
-      <li><a href="http://jdom.org">JDOM</a></li>
-      </ul>
-      </p>
-    </header>
-    
-    <section title="News">
-      <ul>
-      <li>Check out these new <a href="http://dom4j.org/benchmarks/xpath/index.html">Performance Benchmarks</a> comparing dom4j and Jaxen against Xerces and Xalan. 
-      </li>
-      <li>Sun chooses Jaxen for the XPath engine 
-        <a href="http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html">JSTL</a> and 
-        <a href="http://java.sun.com/webservices/webservicespack.html">Web Services pack</a>
-      </li>
-      <li>
-        Since the reference implementation of 
-        <a href="http://developer.java.sun.com/developer/earlyAccess/xml/jaxm/">JAXM</a>
-        is based on <a href="http://dom4j.org">dom4j</a> and Jaxen that means you can use
-        Jaxen to query SOAP messages on the Java platform too!
-      </li>
-      <li>Check out Elliotte Rusty Harolds book chapter on XPath and 
-        <a href="http://cafeconleche.org/books/xmljava/chapters/ch16s06.html">Jaxen</a>
-      </li>
-      <li>Alex Chaffee wrote 
-        <a href="http://www.purpletech.com/xpe/">XPath Explorer</a> 
-        to help visualize results of XPath expressions.
-      </li>
-      </ul>
-    </section>
-
-    <section title="Getting Started">
-      <p>You can download the current $VERSION$ release 
-        or a nightly build via the <a href="download.html">download page</a>.</p>
-
-      <p>You could try browsing the
-        <a href="faq.html">FAQ</a> or the online 
-        <a href="apidocs/index.html">JavaDoc</a>.
-      </p>      
-      
-      <p>Contributors are welcome to join this project. 
-        Once you've browsed the <a href="faq.html">FAQ</a> you could try
-        sending an email to one of the mailing lists below or check out the
-        <a href="http://sourceforge.net/projects/jaxen/">project page</a>.</p>
-
-    </section>
-
-    <section title="Mailing Lists">
-      <p>There is a
-        <a href="http://lists.sourceforge.net/lists/listinfo/jaxen-interest">
-          jaxen-interest
-        </a> 
-        email list where you can share ideas and experiences, ask for help, 
-        give us feedback or discuss your requirements.
-      </p>
-
-      <p>You can also browse the <a href="http://www.mail-archive.com/jaxen-interest%40lists.sourceforge.net/">archives</a>.
-      </p>
-    </section>
-
-  </body>
-</document>
diff --git a/src/doc/project.xml b/src/doc/project.xml
deleted file mode 100644
index 626c6df..0000000
--- a/src/doc/project.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="jaxen" repository="jaxen" href="http://jaxen.org">
-
-  <title>jaxen: Java XPath Engine</title>
-
-  <meta>
-    
-  </meta>
-
-  <links>
-    <table width="100%">
-      <tr>
-        <td align="left" valign="center">
-          <a href="index.html"><img src="style/images/logo.gif" border="0" alt="jaxen"/></a>
-        </td>
-        <td><br /></td>
-        <td align="right" valign="center">
-          <font size="2">
-            <a href="faq.html">FAQ</a> 
-            | <a href="apidocs/index.html">JavaDoc</a> 
-            | <a href="download.html">download</a>
-            | <a href="status.html">status</a> 
-            | <a href="http://sourceforge.net/projects/jaxen/">project page</a>
-          </font>
-        </td>
-      </tr>
-    </table>
-  </links>
-
-  <notice>
-    Copyright 2001 (C) bob mcwhirter & James Strachan. All rights reserved. Hosted by SourceForge <br/>
-    <table cellspacing="10" align="Center" valign="Center">
-    <tr>
-    <td valign="Center">
-    <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=31477" width="88" height="31" border="0" alt="SourceForge Logo"/></a>
-    </td>
-    </tr>
-    </table>
-  </notice>
-
-</project>
diff --git a/src/doc/status.xml b/src/doc/status.xml
deleted file mode 100644
index e9722c4..0000000
--- a/src/doc/status.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<document url="http://jaxen.org/status.xml">
-  <body>
-    <title>Status</title>
-    
-    <section title="Change History">
-      <section title="Changes in CVS since last release">
-        <p>Applied Elliotte's suggestions and moved the document() function 
-          into the org.jaxen.function.xslt package
-          to better reflect the fact that it is an XSLT function rather than XPath 1.0
-          as well as adding the lang() function to the list of known problems.
-          </p>
-      </section>
-      
-      <section title="Jaxen 1.0 FCS">
-        <p>Applied patch submitted by Shawn Bayern to fix the booleanValueOf() method.
-        </p>
-        <p>Added licenses to each source file and a proper manifest to the build at last ;-).
-        </p>
-      </section>
-      
-      <section title="Jaxen 1.0 RC1">
-        <p>There is now an XPath interface in the org.jaxen package to represent any XPath implementation.
-          So this means that the XPath API of Jaxen is now polymorphic, the same interface can work with 
-          any model.
-        </p>
-        <p>
-           This now means that the org.jaxen.* package represents a purely interface based API to any XPath
-           engine. So it should be possible to implement XPath, FunctionContext, NamespaceContext, VariableContext
-           on any XPath engine if so desired.
-        </p>
-        <p>The XPath implementation for each model has now got a fully qualified class name. 
-          The following code describes how to instantiate an XPath object for each model.
-<pre>
-// for DOM
-XPath xpath = new DOMXPath( "//foo" );
-
-// for dom4j
-XPath xpath = new Dom4jXPath( "//foo" );
-
-// for Electric XML
-XPath xpath = new ElectricXPath( "//foo" );
-
-// for JDOM
-XPath xpath = new JDOMXPath( "//foo" );
-</pre>
-        </p>
-        <p>The XPath.valueOf() method is now deprecated, XPath.stringValueOf() should be used instead.
-        </p>
-        <p>Added new extension functions kindly provided by Mark Wilson. They are as follows...
-          <ul>
-            <li>upper-case() - converts the first argument to an upper case string using either the default Locale or the Locale specified by the second parameter</li>
-            <li>lower-case() - converts the first argument to a lower case string using either the default Locale or the Locale specified by the second parameter</li>
-            <li>ends-with() - evaluates true if the first string ends with the postfix</li>
-          </ul>
-          <p>Locales can be specified either using a variable which is a Locale object or using an xml:lang style string
-            which specifies the Locale via a language together with an optional country and variant such as 'fr', 'fr-CA' or 'es-ES-Traditional_WIN'.
-            e.g.
-          </p>
-<pre>
-upper-case( @foo, $myLocale )
-upper-case( /foo/bar, 'fr' )
-lower-case( foo, 'fr-CA' )
-upper-case( @foo, 'es-ES-Traditional_WIN' )
-</pre>
-        </p>
-        <p>The translate() function is now implemented - thanks to Jan for that!
-        </p>
-        <p>Some auxillary implementation detail changes, which shouldn't affect the public API in any way are as follows
-          <ul>
-            <li>The org.jaxen.JaXPath class has been removed. Now we have an org.jaxen.XPath interface its no longer required.</li>
-            <li>The org.jaxen.expr.XPath class has been renamed to org.jaxen.expr.XPathExpr to avoid confusion and to use a more consistent name.
-            Similarly the DefaultXPath class has been renamed to DefaultXPathExpr as well.</li>
-            <li>The very confusing jaSelect*() methods have gone from JaXPath and BaseXPath. All evaluation methods can take a Context object, null, a node or a node set.</li>
-          </ul>
-        </p>
-       </section>
-       
-      <section title="Jaxen 1.0 beta 8">
-        <p>
-          Initial beta development cycle.  Please see
-          CVS changelogs for up-to-date list of changes.
-        </p>
-       </section>
-    </section>
-
-    <section title="To Do List">
-      <ul>
-        <li>Implement a GenericXPath which could use reflection on the nodes passed into it to
-          choose the Navigator to use. So the same GenericXPath instance could be used
-          to evaluate XPaths on any object. This feature would be particularly useful
-          in <a href="http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html">JSTL</a> 
-          since it would allow web developers to mix and match any
-          all XML models.
-        </li>
-        <li>The <code>format-number()</code> XSLT function is not yet implemented but would be useful. Any volunteers?
-        </li>
-        <li>While already Jaxen is pretty 
-        <a href="http://dom4j.org/benchmarks/xpath/index.html">fast</a>
-        but we are sure it could use some more tuning.
-        </li>
-        <li>selectSingleNode() and possibly the *ValueOf() methods should be return-fast
-          as a performance improvement.
-          For example selectSingleNode( "//foo" ) on a document with lots of <foo/>
-          elements would actually create a full nodeset of results then extract the first
-          element - rather than just returning as soon as the first one is found.
-        </li>
-        <li>Better user guides and examples!
-        </li>
-        <li>Any Locale sepecific functions, such as <code>upper-case()</code> 
-          and <code>lowercase-case()</code> could well follow the example of
-          <a href="http://www.w3.org/TR/xquery-operators/#func-upper-case">XSLT 2.0</a>
-          by using the <a href="http://www.unicode.org/unicode/reports/tr21/">Unicode case mappings</a>
-        </li>
-      </ul>
-    </section>
-
-    <section title="Known problems">    
-      <ul>
-        <li>The <code>lang()</code> XPath function is not yet implemented. Any volunteers?
-        </li>
-        <li><code>id()</code> function not implemented for most models, though it works fine for W3C DOM.</li>
-      </ul>
-    </section>
-
-    <section title="Contributors">    
-      <p>The following people have contributed to the Jaxen project. 
-      Many thanks to you all!</p>
-      <ul>
-        <li>Bob McWhirter (<a href="http://code.werken.com/">The Werken Company</a>)</li>
-        <li><a href="http://www.apache.org/~jstrachan/">James Strachan</a> (<a href="http://www.spiritsoft.com">SpiritSoft</a>)</li>
-        <li>David Megginson (<a href="http://megginson.com/">Megginson Technologies</a>)</li>
-        <li>Erwin Bolwidt</li>
-        <li>David Peterson</li>
-        <li>Mark A. Belonga</li>
-        <li>Christian Nentwich</li>
-        <li>Alexander Day Chaffee (<a href="http://www.purpletech.com">Purple Technology</a>)</li>
-        <li>Elliotte Rusty Harold (<a href="http://www.cafeconleche.org">Cafe con Leche</a>)</li>
-        <li>Mark Wilson (<a href="http://www.wilsoncom.de">WilsonCon</a>)</li>
-        <li>Jan Dvorak</li>
-        <li>J�r�me N�gre (<a href="http://e-xmlmedia.com">e-xmlmedia.com</a>)</li>
-      </ul>
-    </section>
-  </body>
-</document>
diff --git a/src/doc/style/document.xsl b/src/doc/style/document.xsl
deleted file mode 100644
index a47faad..0000000
--- a/src/doc/style/document.xsl
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="document">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="document/properties">
-
-    <table border="0" cellpadding="4" cellspacing="2">
-
-      <xsl:for-each select="author">
-
-        <tr>
-
-          <td valign="top"><b>Author:</b></td>
-
-          <td valign="top">
-
-            <xsl:value-of select="."/>&#xA0;
-
-            <xsl:if test="@email">
-
-              [ <a href="mailto:{@email}"><xsl:value-of select="@email"/></a> ]
-
-            </xsl:if>
-
-<!--
-
-            <xsl:if test="@ldap">
-
-              [ <a href="ldap://{@ldap}">LDAP</a> ]<br/>
-
-            </xsl:if>
-
- -->
-
-          </td>
-
-        </tr>
-
-      </xsl:for-each>
-
-      <xsl:if test="abstract">
-
-        <tr>
-
-          <td valign="top"><b>Abstract:</b></td>
-
-          <td valign="top"><xsl:value-of select="abstract"/></td>
-
-        </tr>
-
-      </xsl:if>
-
-      <xsl:if test="status">
-
-        <tr>
-
-          <td valign="top"><b>Status:</b></td>
-
-          <td valign="top"><xsl:value-of select="status"/></td>
-
-        </tr>
-
-      </xsl:if>
-
-    </table><br/>
-
-  </xsl:template>
-  <!-- Process the document body -->
-
-  <xsl:template match="document/body">
-
-    <xsl:if test="/document/properties/title">
-
-      <br/>
-
-      <h1><xsl:value-of select="/document/properties/title"/></h1>
-
-    </xsl:if>
-
-    <xsl:if test="header">
-
-      <xsl:apply-templates select="header"/>
-
-    </xsl:if>
-    <xsl:for-each select=".//section">
-
-      <small>
-
-      <xsl:if test="@title">
-
-        <xsl:variable name="level" select="count(ancestor::*)"/>
-
-        <xsl:choose>
-
-          <xsl:when test='$level=2'>
-
-            <a href="#{@title}"><xsl:value-of select="@title"/></a><br/>
-
-          </xsl:when>
-
-          <xsl:when test='$level=3'>
-
-            &#xA0;&#xA0;&#xA0;&#xA0;<a href="#{@title}"><xsl:value-of select="@title"/></a><br/>
-
-          </xsl:when>
-
-        </xsl:choose>
-
-      </xsl:if>
-
-      </small>
-
-    </xsl:for-each>
-
-    <br/>
-    <xsl:apply-templates select="section"/>
-    <xsl:if test="footer">
-
-      <br/>
-
-      <xsl:apply-templates select="footer"/>
-
-    </xsl:if>
-
-  </xsl:template>
-  <!-- Process a section in the document. Nested sections are supported -->
-
-  <xsl:template match="document//section">
-
-    <xsl:variable name="level" select="count(ancestor::*)"/>
-
-    <xsl:choose>
-
-      <xsl:when test='$level=2'>
-
-        <a name="{@title}"><h2><xsl:value-of select="@title"/></h2></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level=3'>
-
-        <a name="{@title}"><h3><xsl:value-of select="@title"/></h3></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level=4'>
-
-        <a name="{@title}"><h4><xsl:value-of select="@title"/></h4></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level>=5'>
-
-        <h5><xsl:copy-of select="@title"/></h5>
-
-      </xsl:when>
-
-    </xsl:choose>
-
-    <blockquote>
-
-      <xsl:apply-templates/>
-
-    </blockquote>
-
-  </xsl:template>
-  <!-- Paragraphs are separated with one empty line -->
-
-  <xsl:template match="p">
-
-    <p><xsl:apply-templates/><br/></p>
-
-  </xsl:template>
-  <!-- Paragraphs are separated with one empty line -->
-
-  <xsl:template match="body-note">
-
-    <blockquote><hr size="1" noshadow=""/><xsl:apply-templates/><hr size="1" noshadow=""/></blockquote>
-
-  </xsl:template>
-  <xsl:template match="nbsp">
-
-    &#xA0;
-
-  </xsl:template>
-
-  <xsl:template match="url">
-    <a href="{.}"><xsl:copy-of select="."/></a>
-  </xsl:template>
-
-  <xsl:template match="email">
-    <a href="mailto:{.}"><xsl:copy-of select="."/></a>
-  </xsl:template>
-
-
-</xsl:stylesheet>
-
-
diff --git a/src/doc/style/images/ball.gif b/src/doc/style/images/ball.gif
deleted file mode 100644
index f64b12b..0000000
Binary files a/src/doc/style/images/ball.gif and /dev/null differ
diff --git a/src/doc/style/images/blank.gif b/src/doc/style/images/blank.gif
deleted file mode 100644
index 53c870f..0000000
Binary files a/src/doc/style/images/blank.gif and /dev/null differ
diff --git a/src/doc/style/images/blueball.gif b/src/doc/style/images/blueball.gif
deleted file mode 100644
index f64b12b..0000000
Binary files a/src/doc/style/images/blueball.gif and /dev/null differ
diff --git a/src/doc/style/images/jars.gif b/src/doc/style/images/jars.gif
deleted file mode 100644
index 6edcf0e..0000000
Binary files a/src/doc/style/images/jars.gif and /dev/null differ
diff --git a/src/doc/style/images/logo.gif b/src/doc/style/images/logo.gif
deleted file mode 100644
index 5053b79..0000000
Binary files a/src/doc/style/images/logo.gif and /dev/null differ
diff --git a/src/doc/style/javadoc.css b/src/doc/style/javadoc.css
deleted file mode 100644
index d6aad9d..0000000
--- a/src/doc/style/javadoc.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Apache Javadoc style sheet */
-
-/* Page background color */
-body { background-color: #FFFFFF }
-
-/* Table colors */
-.TableHeadingColor     { background: #D0D0D0 }
-.TableSubHeadingColor  { background: #E0E0E0 }
-.TableRowColor         { background: #F9F9F9 }
-
-/* Navigation bar fonts and colors */
-.NavBarCell1    { background-color:#D0D0D0;}
-.NavBarCell1Rev { background-color:#A0A0A0;}
-.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#E0E0E0;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#F0F0F0;}
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Helvetica, Arial, sans-serif }
-.FrameHeadingFont { font-size: normal; font-family: Helvetica, Arial, sans-serif }
-.FrameItemFont    { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
-
-/* Link colors styling */
-A:link { color: #0000A0 }          /* unvisited link */
-A:visited { color: #A00000 }       /* visited links */
-A:active { color: #00A000 }        /* active links */
diff --git a/src/doc/style/style.xsl b/src/doc/style/style.xsl
deleted file mode 100644
index 13c8299..0000000
--- a/src/doc/style/style.xsl
+++ /dev/null
@@ -1,322 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:output method="html" indent="yes"/>
-
-  <xsl:template match="document">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="document/properties">
-
-    <table border="0" cellpadding="4" cellspacing="2">
-
-      <xsl:for-each select="author">
-
-        <tr>
-
-          <td valign="top"><b>Author:</b></td>
-
-          <td valign="top">
-
-            <xsl:value-of select="."/>&#xA0;
-
-            <xsl:if test="@email">
-
-              [ <a href="mailto:{@email}"><xsl:value-of select="@email"/></a> ]
-
-            </xsl:if>
-
-<!--
-
-            <xsl:if test="@ldap">
-
-              [ <a href="ldap://{@ldap}">LDAP</a> ]<br/>
-
-            </xsl:if>
-
- -->
-
-          </td>
-
-        </tr>
-
-      </xsl:for-each>
-
-      <xsl:if test="abstract">
-
-        <tr>
-
-          <td valign="top"><b>Abstract:</b></td>
-
-          <td valign="top"><xsl:value-of select="abstract"/></td>
-
-        </tr>
-
-      </xsl:if>
-
-      <xsl:if test="status">
-
-        <tr>
-
-          <td valign="top"><b>Status:</b></td>
-
-          <td valign="top"><xsl:value-of select="status"/></td>
-
-        </tr>
-
-      </xsl:if>
-
-    </table><br/>
-
-  </xsl:template>
-  <!-- Process the document body -->
-
-  <xsl:template match="document/body">
-
-    <xsl:if test="/document/properties/title">
-
-      <br/>
-
-      <h1><xsl:value-of select="/document/properties/title"/></h1>
-
-    </xsl:if>
-
-    <xsl:if test="header">
-
-      <xsl:apply-templates select="header"/>
-
-    </xsl:if>
-    <xsl:for-each select=".//section">
-
-      <small>
-
-      <xsl:if test="@title">
-
-        <xsl:variable name="level" select="count(ancestor::*)"/>
-
-        <xsl:choose>
-
-          <xsl:when test='$level=2'>
-
-            <a href="#{@title}"><xsl:value-of select="@title"/></a><br/>
-
-          </xsl:when>
-
-          <xsl:when test='$level=3'>
-
-            &#xA0;&#xA0;&#xA0;&#xA0;<a href="#{@title}"><xsl:value-of select="@title"/></a><br/>
-
-          </xsl:when>
-
-        </xsl:choose>
-
-      </xsl:if>
-
-      </small>
-
-    </xsl:for-each>
-
-    <br/>
-    <xsl:apply-templates select="section"/>
-    <xsl:if test="footer">
-
-      <br/>
-
-      <xsl:apply-templates select="footer"/>
-
-    </xsl:if>
-
-  </xsl:template>
-
-
-  <!-- Process a section in the document. Nested sections are supported -->
-
-  <xsl:template match="document//section">
-
-    <xsl:variable name="level" select="count(ancestor::*)"/>
-
-    <xsl:choose>
-
-      <xsl:when test='$level=2'>
-
-        <a name="{@title}"><h2><xsl:value-of select="@title"/></h2></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level=3'>
-
-        <a name="{@title}"><h3><xsl:value-of select="@title"/></h3></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level=4'>
-
-        <a name="{@title}"><h4><xsl:value-of select="@title"/></h4></a>
-
-      </xsl:when>
-
-      <xsl:when test='$level>=5'>
-
-        <h5><xsl:copy-of select="@title"/></h5>
-
-      </xsl:when>
-
-    </xsl:choose>
-
-    <blockquote>
-
-      <xsl:apply-templates/>
-
-    </blockquote>
-
-  </xsl:template>
-  <!-- Paragraphs are separated with one empty line -->
-
-  <xsl:template match="p">
-
-    <p><xsl:apply-templates/><br/></p>
-
-  </xsl:template>
-  <!-- Paragraphs are separated with one empty line -->
-
-  <xsl:template match="body-note">
-
-    <blockquote><hr size="1" noshadow=""/><xsl:apply-templates/><hr size="1" noshadow=""/></blockquote>
-
-  </xsl:template>
-  <xsl:template match="nbsp">
-
-    &#xA0;
-
-  </xsl:template>
-
-  <xsl:template match="url">
-    <a href="{.}"><xsl:copy-of select="."/></a>
-  </xsl:template>
-
-  <xsl:template match="email">
-    <a href="mailto:{.}"><xsl:copy-of select="."/></a>
-  </xsl:template>
-
-  <xsl:template match="/">
-    <xsl:variable name="project" select="document('../project.xml')/project"/>
-    <html lang="en">
-    <head>
-      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-      <xsl:element name="META">
-        <xsl:attribute name="NAME">Keywords</xsl:attribute>
-        <xsl:attribute name="CONTENT">DOM4J, XML, Java, XML and Java, Open Source, 
-            XML software, Java software, XML API, Java API, XML parser, 
-            DOM, Document Object Model, SAX, XML Library, XPath, 
-            Java 2 Collections
-        </xsl:attribute>
-      </xsl:element>
-      <xsl:element name="META">
-        <xsl:attribute name="NAME">Description</xsl:attribute>
-        <xsl:attribute name="CONTENT">DOM4J is an Open Source XML framework 
-            for the Java Platform that combines the best of DOM and SAX 
-            together with integrated  XPath and Java 2 Collections support
-        </xsl:attribute>
-      </xsl:element>
-      <xsl:element name="META">
-        <xsl:attribute name="NAME">Copyright</xsl:attribute>
-        <xsl:attribute name="CONTENT">(c) 2001 MetaStuff Ltd.</xsl:attribute>
-      </xsl:element>
-
-      <xsl:choose>
-        <xsl:when test="/document/properties/title"><title><xsl:value-of select="/document/body/title"/></title></xsl:when>
-        <xsl:when test="/document/body/title"><title><xsl:value-of select="/document/body/title"/></title></xsl:when>
-        <xsl:otherwise><title><xsl:value-of select="$project/title"/></title></xsl:otherwise>
-      </xsl:choose>
-      <link rel="stylesheet" type="text/css" href="default.css"/>
-    </head>
-
-    <body>
-
-      <table border="0" cellpadding="0" cellspacing="0" width="100%">
-        <tr>
-          <td valign="top">          
-            <xsl:apply-templates select="$project/links"/>
-            <hr/>
-          </td>
-        </tr>
-
-        <tr>
-          <td>
-            <h1>
-              <xsl:choose>
-                <xsl:when test="/document/body/title"><xsl:value-of select="/document/body/title"/></xsl:when>
-                <xsl:otherwise><xsl:value-of select="$project/title"/></xsl:otherwise>
-              </xsl:choose>
-            </h1>
-           </td>
-        </tr>
-
-        <tr>
-          <td>
-             <xsl:apply-templates select="document/body"/>
-             <br/>
-             <hr/>
-          </td>
-        </tr>
-
-        <tr>
-          <td valign="top">
-            <xsl:apply-templates select="$project/links"/>
-            <hr/>
-          </td>
-        </tr>
-
-        <xsl:if test="$project/notice">
-          <tr>
-            <td align="center">
-              <xsl:for-each select="$project/notice">
-                <small><xsl:copy-of select="."/><br/>&#xA0;<br/></small>
-              </xsl:for-each>
-            </td>
-          </tr>
-        </xsl:if>
-
-      </table>
-
-    </body>
-    </html>
-  </xsl:template>
-
-
-  <!-- UL is processed into a table using graphical bullets -->
-  <xsl:template match="ul">
-    <table border="0" cellpadding="2" cellspacing="2">
-      <tr><td colspan="2" height="5"></td></tr>
-      <xsl:apply-templates/>
-    </table>
-  </xsl:template>
-
-  <xsl:template match="ul/li">
-    <tr>
-      <td align="left" valign="top">
-        <img src="style/images/blueball.gif" alt="*"/>
-     </td>
-      <td align="left" valign="top"><xsl:apply-templates/></td>
-    </tr>
-  </xsl:template>
-
-  <xsl:template match="section">
-    <br />
-  </xsl:template>
-
-  <xsl:template match="br">
-    <br />
-  </xsl:template>
-
-  <xsl:template match='@* | node()'>
-    <xsl:copy>
-      <xsl:apply-templates select='@* | node()'/>
-    </xsl:copy>
-  </xsl:template>
-
-
-</xsl:stylesheet>
-
-
diff --git a/src/java/main/org/jaxen/BaseXPath.java b/src/java/main/org/jaxen/BaseXPath.java
index 6ac43f9..3ca9776 100644
--- a/src/java/main/org/jaxen/BaseXPath.java
+++ b/src/java/main/org/jaxen/BaseXPath.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/BaseXPath.java,v 1.49 2006/02/05 21:47:41 elharo Exp $
- * $Revision: 1.49 $
- * $Date: 2006/02/05 21:47:41 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/BaseXPath.java,v 1.50 2007/04/16 15:44:37 elharo Exp $
+ * $Revision: 1.50 $
+ * $Date: 2007/04/16 15:44:37 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: BaseXPath.java,v 1.49 2006/02/05 21:47:41 elharo Exp $
+ * $Id: BaseXPath.java,v 1.50 2007/04/16 15:44:37 elharo Exp $
  */
 
 
@@ -85,10 +85,10 @@ import org.jaxen.util.SingletonList;
 public class BaseXPath implements XPath, Serializable
 {
     /** Original expression text. */
-    private String exprText;
+    private final String exprText;
 
     /** the parsed form of the XPath expression */
-    private XPathExpr xpath;
+    private final XPathExpr xpath;
     
     /** the support information and function, namespace and variable contexts */
     private ContextSupport support;
diff --git a/src/java/main/org/jaxen/Context.java b/src/java/main/org/jaxen/Context.java
index 76fafdd..5a4f7f2 100644
--- a/src/java/main/org/jaxen/Context.java
+++ b/src/java/main/org/jaxen/Context.java
@@ -1,7 +1,7 @@
 package org.jaxen;
 
 /*
- $Id: Context.java,v 1.17 2006/09/07 15:47:03 elharo Exp $
+ $Id: Context.java,v 1.20 2006/10/15 21:08:16 elharo Exp $
 
  Copyright 2003 The Werken Company. All Rights Reserved.
  
@@ -63,9 +63,8 @@ import java.util.List;
  *
  *  @author <a href="mailto:bob at werken.com">bob mcwhirter</a>
  */
-public class Context
-    implements Serializable
-{
+public class Context implements Serializable {
+    
     /**
      * 
      */
@@ -99,17 +98,27 @@ public class Context
     {
         this.contextSupport = contextSupport;
         this.nodeSet        = Collections.EMPTY_LIST;
-        this.size = 0;
-        // XXX What should position be?
+        this.size           = 0;
+        this.position       = 0;
     }
     
     // ----------------------------------------------------------------------
     //     Instance methods
     // ----------------------------------------------------------------------
 
-    /** Set the context node-set, and sets the current context size to the size 
-     * of this node-set. The actual list is stored in this object. A copy
-     * is not made.
+    /** 
+     * <p>
+     * Set the context node-set, and sets the current context size to the size 
+     * of this node-set. </p>
+     * 
+     * <p>The actual list is stored in this object. A copy
+     * is not made. This list should not be modified in other code after
+     * calling this method.</p>
+     *  
+     * <p>
+     * After invoking this method, the client should immediately call 
+     * {@link #setSize(int) setSize} and {@link #setPosition(int) setPosition}.
+     *</p>
      *
      *  @param nodeSet the context node-set
      */
@@ -117,10 +126,12 @@ public class Context
     {
         this.nodeSet = nodeSet;
         this.size    = nodeSet.size();
-        // XXX How should we set position?
+        if (position >= size) this.position = 0;
     }
 
-    /** Retrieve the context node-set. This is a live list. It is not a copy.
+    /** Retrieve the context node-set.
+     *  This is a live list. It is not a copy.
+     *  Do not modify it.
      *
      *  @return the context node-set
      */
@@ -266,7 +277,7 @@ public class Context
             List dupeNodeSet = new ArrayList( thisNodeSet.size() );
             dupeNodeSet.addAll( thisNodeSet );
             dupe.setNodeSet( dupeNodeSet );
-            // XXX should set the size of the duplicate
+            dupe.setPosition(this.position);
         }
 
         return dupe;
diff --git a/src/java/main/org/jaxen/XPath.java b/src/java/main/org/jaxen/XPath.java
index dd5d4bf..6cd1775 100644
--- a/src/java/main/org/jaxen/XPath.java
+++ b/src/java/main/org/jaxen/XPath.java
@@ -1,7 +1,7 @@
 package org.jaxen;
 
 /*
- $Id: XPath.java,v 1.12 2006/06/03 20:07:37 elharo Exp $
+ $Id: XPath.java,v 1.13 2007/05/02 15:00:13 elharo Exp $
 
  Copyright 2003 The Werken Company. All Rights Reserved.
  
@@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import java.util.List;
 
-/** Defines the interface to an object which represents an XPath 1.0 expression which
+/** Represents an XPath 1.0 expression which
  *  can be evaluated against a variety of different XML object models.
  *
  *  <p>
diff --git a/src/java/main/org/jaxen/XPathFunctionContext.java b/src/java/main/org/jaxen/XPathFunctionContext.java
index a32759d..b6bc723 100644
--- a/src/java/main/org/jaxen/XPathFunctionContext.java
+++ b/src/java/main/org/jaxen/XPathFunctionContext.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/XPathFunctionContext.java,v 1.28 2006/02/05 21:47:41 elharo Exp $
- * $Revision: 1.28 $
- * $Date: 2006/02/05 21:47:41 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/XPathFunctionContext.java,v 1.29 2006/11/08 13:59:38 elharo Exp $
+ * $Revision: 1.29 $
+ * $Date: 2006/11/08 13:59:38 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: XPathFunctionContext.java,v 1.28 2006/02/05 21:47:41 elharo Exp $
+ * $Id: XPathFunctionContext.java,v 1.29 2006/11/08 13:59:38 elharo Exp $
  */
 
 
@@ -78,7 +78,6 @@ import org.jaxen.function.TrueFunction;
 import org.jaxen.function.ext.EndsWithFunction;
 import org.jaxen.function.ext.EvaluateFunction;
 import org.jaxen.function.ext.LowerFunction;
-import org.jaxen.function.ext.MatrixConcatFunction;
 import org.jaxen.function.ext.UpperFunction;
 import org.jaxen.function.xslt.DocumentFunction;
 
@@ -96,8 +95,7 @@ import org.jaxen.function.xslt.DocumentFunction;
  *  default instance, it is inadvisable to call 
  *  {@link #registerFunction(String, String, Function)}
  *  as that will extend the global function context, affecting other
- *  users.  But that's your call, really, now isn't
- *  it?  That may be what you really want to do.
+ *  users. 
  *  </p>
  *
  *  <p>
@@ -105,7 +103,6 @@ import org.jaxen.function.xslt.DocumentFunction;
  *  </p>
  *
  *  <ul>
- *     <li>matrix-concat(..)</li>
  *     <li>evaluate(..)</li>
  *     <li>upper-case(..)</li>
  *     <li>lower-case(..)</li>
@@ -144,7 +141,7 @@ public class XPathFunctionContext extends SimpleFunctionContext
      *  All core XPath functions are registered.
      *  
      * @param includeExtensionFunctions if true extension functions are included;
-     *     if false, they aren't.
+     *     if false, they aren't
      */
     public XPathFunctionContext(boolean includeExtensionFunctions)
     {
@@ -279,10 +276,6 @@ public class XPathFunctionContext extends SimpleFunctionContext
         // for now, keep them in default namespace to not break any code
 
         registerFunction( null,  // namespace URI
-                          "matrix-concat",
-                          new MatrixConcatFunction() );
-
-        registerFunction( null,  // namespace URI
                           "evaluate",
                           new EvaluateFunction() );
         
diff --git a/src/java/main/org/jaxen/dom/DocumentNavigator.java b/src/java/main/org/jaxen/dom/DocumentNavigator.java
index dbadd12..f4027a6 100644
--- a/src/java/main/org/jaxen/dom/DocumentNavigator.java
+++ b/src/java/main/org/jaxen/dom/DocumentNavigator.java
@@ -1,9 +1,9 @@
 package org.jaxen.dom;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom/DocumentNavigator.java,v 1.56 2006/07/03 13:08:43 elharo Exp $
- * $Revision: 1.56 $
- * $Date: 2006/07/03 13:08:43 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom/DocumentNavigator.java,v 1.57 2007/05/05 18:08:55 elharo Exp $
+ * $Revision: 1.57 $
+ * $Date: 2007/05/05 18:08:55 $
  *
  * ====================================================================
  *
@@ -45,7 +45,7 @@ package org.jaxen.dom;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DocumentNavigator.java,v 1.56 2006/07/03 13:08:43 elharo Exp $
+ * $Id: DocumentNavigator.java,v 1.57 2007/05/05 18:08:55 elharo Exp $
 */
 
 import javax.xml.parsers.DocumentBuilder;
@@ -199,17 +199,17 @@ public class DocumentNavigator extends DefaultNavigator
     
     
     /** 
-     * Return the XPath parent of this DOM node.
+     * Return the XPath parent of the supplied DOM node.
      * XPath has slightly different definition of parent than DOM does.
      * In particular, the parent of an attribute is not null.
      * 
-     * @param o 
+     * @param child the child node
      * 
      * @return the parent of the specified node; or null if
      *     the node does not have a parent
      */
-    public Object getParentNode(Object o) {
-        Node node = (Node) o;
+    public Object getParentNode(Object child) {
+        Node node = (Node) child;
         if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
             return ((Attr) node).getOwnerElement();
         }
@@ -803,6 +803,8 @@ public class DocumentNavigator extends DefaultNavigator
      * @return the new W3C DOM Level 2 Document instance
      * @throws FunctionCallException containing a nested exception
      *      if a problem occurs trying to parse the given document
+     *
+     * @todo Possibly we could make the factory a thread local.
      */
     public Object getDocument(String uri) throws FunctionCallException
     {
@@ -810,7 +812,6 @@ public class DocumentNavigator extends DefaultNavigator
         {
             // We really do need to construct a new factory here each time.
             // DocumentBuilderFactory is not guaranteed to be thread safe? 
-            // Possibly we could make this a thread local.????
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             factory.setNamespaceAware(true);
             DocumentBuilder builder = factory.newDocumentBuilder();
@@ -1049,7 +1050,7 @@ public class DocumentNavigator extends DefaultNavigator
      *            does not know about attribute types
      *  @see   javax.xml.parsers.DocumentBuilderFactory
      *  
-     *  @throws ClassCastException if object is not an org.w3c.dom.Node object
+     *  @throws ClassCastException if object is not an <code>org.w3c.dom.Node</code> object
      *  
      */
     public Object getElementById(Object object, String elementId)
diff --git a/src/java/main/org/jaxen/expr/AdditiveExpr.java b/src/java/main/org/jaxen/expr/AdditiveExpr.java
index 6345361..6e2072d 100644
--- a/src/java/main/org/jaxen/expr/AdditiveExpr.java
+++ b/src/java/main/org/jaxen/expr/AdditiveExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/AdditiveExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/AdditiveExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/09 16:21:05 $
  *
  * ====================================================================
  *
@@ -43,11 +43,25 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: AdditiveExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: AdditiveExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
  */
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath additive expression. This is production 25 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">XPath 1.0 specification</a>:
+ * 
+ * <table><tr valign="baseline"><td><a name="NT-AdditiveExpr"></a>[25]   </td><td>AdditiveExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr#NT-MultiplicativeExpr">MultiplicativeExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a> '+' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr#NT-MultiplicativeExpr">MultiplicativeExpr</a></td><td></td>
+ * </tr>
+ *
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr#NT-AdditiveExpr">AdditiveExpr</a> '-' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr#NT-MultiplicativeExpr">MultiplicativeExpr</a>
+ * </tr></table>
+ * 
+ */
 public interface AdditiveExpr extends BinaryExpr
 {
-    String getOperator();
 }
diff --git a/src/java/main/org/jaxen/expr/AllNodeStep.java b/src/java/main/org/jaxen/expr/AllNodeStep.java
index d4d38ec..3bebb17 100644
--- a/src/java/main/org/jaxen/expr/AllNodeStep.java
+++ b/src/java/main/org/jaxen/expr/AllNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/AllNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.5 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/AllNodeStep.java,v 1.6 2006/11/08 15:41:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/08 15:41:05 $
  *
  * ====================================================================
  *
@@ -42,10 +42,15 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: AllNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
+ * $Id: AllNodeStep.java,v 1.6 2006/11/08 15:41:05 elharo Exp $
  */
 package org.jaxen.expr;
 
+
+/**
+ * Represents the XPath node-test <code>node()</code>.
+ * 
+ */
 public interface AllNodeStep extends Step
 {
 }
diff --git a/src/java/main/org/jaxen/expr/BinaryExpr.java b/src/java/main/org/jaxen/expr/BinaryExpr.java
index 5dc96ba..acf9ce4 100644
--- a/src/java/main/org/jaxen/expr/BinaryExpr.java
+++ b/src/java/main/org/jaxen/expr/BinaryExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/BinaryExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/BinaryExpr.java,v 1.8 2006/11/09 16:21:04 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/09 16:21:04 $
  *
  * ====================================================================
  *
@@ -42,15 +42,45 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: BinaryExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: BinaryExpr.java,v 1.8 2006/11/09 16:21:04 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+
+/**
+ * Represents a binary expression. 
+ * This does not match anything in the XPath 1.0 grammar, but in Jaxen
+ * it includes the usual binary operations such as addition, multiplication,
+ * logical and, logical or, and so forth.
+ * 
+ */
 public interface BinaryExpr extends Expr
 {
+    
+    /**
+     * Returns the left-hand side of the binary expression.
+     * 
+     * @return the left hand side expression
+     */
     Expr getLHS();
+
+    
+    /**
+     * Returns the right-hand side of the binary expression.
+     * 
+     * @return the right-hand side expression
+     */
     Expr getRHS();
+    
+    /**
+     * Returns the operator for the binary expression such as "+" or
+     * "div".
+     * 
+     * @return the operator for the expression
+     */
+    String getOperator();
+    
 }
diff --git a/src/java/main/org/jaxen/expr/CommentNodeStep.java b/src/java/main/org/jaxen/expr/CommentNodeStep.java
index bd8823d..facc822 100644
--- a/src/java/main/org/jaxen/expr/CommentNodeStep.java
+++ b/src/java/main/org/jaxen/expr/CommentNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/CommentNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.5 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/CommentNodeStep.java,v 1.6 2006/11/08 15:42:39 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/08 15:42:39 $
  *
  * ====================================================================
  *
@@ -42,10 +42,14 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: CommentNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
+ * $Id: CommentNodeStep.java,v 1.6 2006/11/08 15:42:39 elharo Exp $
  */
 package org.jaxen.expr;
 
+/**
+ * Represents the XPath node-test <code>comment()</code>.
+ * 
+ */
 public interface CommentNodeStep extends Step
 {
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java b/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java
index 5e01b3c..d1e04a5 100644
--- a/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java
+++ b/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java,v 1.17 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.17 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAbsoluteLocationPath.java,v 1.18 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.18 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultAbsoluteLocationPath.java,v 1.17 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultAbsoluteLocationPath.java,v 1.18 2006/11/30 18:49:27 elharo Exp $
  */
 package org.jaxen.expr;
 
@@ -113,9 +113,5 @@ public class DefaultAbsoluteLocationPath extends DefaultLocationPath
         return super.evaluate( absContext );
     }
 
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
 
diff --git a/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java b/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java
index 1067c74..577d7d7 100644
--- a/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java
+++ b/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAllNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultAllNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultAllNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -83,9 +83,5 @@ public class DefaultAllNodeStep extends DefaultStep implements AllNodeStep
     {
         return true;
     }
-    
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultAndExpr.java b/src/java/main/org/jaxen/expr/DefaultAndExpr.java
index 7510bae..f656554 100644
--- a/src/java/main/org/jaxen/expr/DefaultAndExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultAndExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAndExpr.java,v 1.15 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.15 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultAndExpr.java,v 1.16 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.16 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultAndExpr.java,v 1.15 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultAndExpr.java,v 1.16 2006/11/30 18:49:27 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -97,10 +97,6 @@ class DefaultAndExpr extends DefaultLogicalExpr
 
         return Boolean.TRUE;
     }
-    
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
     
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java b/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java
index 2685a86..9676bc3 100644
--- a/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.8 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultBinaryExpr.java,v 1.10 2007/01/05 18:25:43 elharo Exp $
+ * $Revision: 1.10 $
+ * $Date: 2007/01/05 18:25:43 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultBinaryExpr.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
+ * $Id: DefaultBinaryExpr.java,v 1.10 2007/01/05 18:25:43 elharo Exp $
  */
 
 
@@ -54,8 +54,7 @@ abstract class DefaultBinaryExpr extends DefaultExpr implements BinaryExpr
     private Expr lhs;
     private Expr rhs;
 
-    DefaultBinaryExpr(Expr lhs,
-                             Expr rhs)
+    DefaultBinaryExpr(Expr lhs, Expr rhs)
     {
         this.lhs = lhs;
         this.rhs = rhs;
@@ -85,12 +84,12 @@ abstract class DefaultBinaryExpr extends DefaultExpr implements BinaryExpr
 
     public String getText()
     {
-        return "(" + getLHS().getText() + " " + getOperator() + " " + getRHS().getText() + ")";
+        return "(" + getLHS().getText() + " " + getOperator() + " " + getRHS().getText() +")";
     }
 
     public String toString()
     {
-        return "[(" + getClass().getName() + "): " + getLHS() + ", " + getRHS() + "]";
+        return "[" + getClass().getName() + ": " + getLHS() + ", " + getRHS() + "]";
     }
 
     public Expr simplify()
diff --git a/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java b/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java
index 884467e..43b8a11 100644
--- a/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java
+++ b/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultCommentNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultCommentNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultCommentNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -85,8 +85,5 @@ public class DefaultCommentNodeStep extends DefaultStep implements CommentNodeSt
 
         return nav.isComment( node );
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultDivExpr.java b/src/java/main/org/jaxen/expr/DefaultDivExpr.java
index 61149a0..1541032 100644
--- a/src/java/main/org/jaxen/expr/DefaultDivExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultDivExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultDivExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultDivExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultDivExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultDivExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -58,6 +58,7 @@ class DefaultDivExpr extends DefaultMultiplicativeExpr
      * 
      */
     private static final long serialVersionUID = 6318739386201615441L;
+    
     DefaultDivExpr(Expr lhs,
                           Expr rhs)
     {
@@ -81,8 +82,5 @@ class DefaultDivExpr extends DefaultMultiplicativeExpr
 
         return new Double( result );
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java b/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java
index 41fa5dd..dd417cb 100644
--- a/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.12 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultEqualsExpr.java,v 1.13 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultEqualsExpr.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultEqualsExpr.java,v 1.13 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -85,9 +85,5 @@ class DefaultEqualsExpr extends DefaultEqualityExpr {
     
     return lhs.equals( rhs );
     }
-  
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultFilterExpr.java b/src/java/main/org/jaxen/expr/DefaultFilterExpr.java
index 8239a5c..edbfb69 100644
--- a/src/java/main/org/jaxen/expr/DefaultFilterExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultFilterExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultFilterExpr.java,v 1.18 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.18 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultFilterExpr.java,v 1.19 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.19 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultFilterExpr.java,v 1.18 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultFilterExpr.java,v 1.19 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -176,8 +176,5 @@ public class DefaultFilterExpr extends DefaultExpr implements FilterExpr, Predic
 
         return results;
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java b/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java
index 09dc863..6966857 100644
--- a/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.16 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultFunctionCallExpr.java,v 1.17 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.17 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultFunctionCallExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultFunctionCallExpr.java,v 1.17 2006/11/30 18:49:27 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -195,9 +195,5 @@ public class DefaultFunctionCallExpr extends DefaultExpr implements FunctionCall
         return paramValues;
     }
 
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
 
diff --git a/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java b/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java
index 4b7e929..686bf36 100644
--- a/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultGreaterThanEqualExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultGreaterThanEqualExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultGreaterThanEqualExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -67,8 +67,5 @@ DefaultGreaterThanEqualExpr( Expr lhs, Expr rhs )
     {
     return lhs.compareTo( rhs ) >= 0;        
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java b/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java
index f8a8aed..a8db3ce 100644
--- a/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultGreaterThanExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultGreaterThanExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultGreaterThanExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -69,8 +69,4 @@ DefaultGreaterThanExpr( Expr lhs, Expr rhs )
     return lhs.compareTo( rhs ) > 0;        
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java b/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java
index a09d70e..e6c098a 100644
--- a/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLessThanEqualExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultLessThanEqualExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultLessThanEqualExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -67,9 +67,5 @@ DefaultLessThanEqualExpr( Expr lhs, Expr rhs )
     {
     return lhs.compareTo( rhs ) <= 0;        
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java b/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java
index b3b25b0..34cbc3d 100644
--- a/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java,v 1.14 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.14 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLessThanExpr.java,v 1.15 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.15 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultLessThanExpr.java,v 1.14 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultLessThanExpr.java,v 1.15 2006/11/30 18:49:27 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -67,8 +67,5 @@ DefaultLessThanExpr( Expr lhs, Expr rhs )
     {
     return lhs.compareTo( rhs ) < 0;
     }    
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }  
+
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java b/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java
index 4e09268..ad8c601 100644
--- a/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java,v 1.11 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.11 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultLiteralExpr.java,v 1.13 2007/01/03 20:47:42 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2007/01/03 20:47:42 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultLiteralExpr.java,v 1.11 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultLiteralExpr.java,v 1.13 2007/01/03 20:47:42 elharo Exp $
  */
 
 
@@ -76,16 +76,19 @@ class DefaultLiteralExpr extends DefaultExpr implements LiteralExpr
 
     public String getText()
     {
-        return "\"" + getLiteral() + "\"";
+        
+        if (literal.indexOf('"') == -1 ) {
+            return "\"" + getLiteral() + "\"";
+        }
+        else { // Not possible for string literal to contain both " and '
+            return "'" + getLiteral() + "'";
+        }
+            
     }
 
     public Object evaluate(Context context)
     {
         return getLiteral();
     }
-    
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }   
+       
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultMinusExpr.java b/src/java/main/org/jaxen/expr/DefaultMinusExpr.java
index 88ba07b..32c0888 100644
--- a/src/java/main/org/jaxen/expr/DefaultMinusExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultMinusExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultMinusExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultMinusExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultMinusExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultMinusExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -83,8 +83,4 @@ class DefaultMinusExpr extends DefaultAdditiveExpr
         return new Double( result );
     }
 
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultModExpr.java b/src/java/main/org/jaxen/expr/DefaultModExpr.java
index 94f6284..4efbf36 100644
--- a/src/java/main/org/jaxen/expr/DefaultModExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultModExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultModExpr.java,v 1.14 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.14 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultModExpr.java,v 1.15 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.15 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultModExpr.java,v 1.14 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultModExpr.java,v 1.15 2006/11/30 18:49:26 elharo Exp $
  */
 package org.jaxen.expr;
 
@@ -81,8 +81,4 @@ class DefaultModExpr extends DefaultMultiplicativeExpr
         return new Double( result );
     }
 
-    public void accept( Visitor visitor )
-    {
-        visitor.visit( this );
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java b/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java
index 7c49858..be7a1d0 100644
--- a/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultMultiplyExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultMultiplyExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultMultiplyExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 package org.jaxen.expr;
 
@@ -82,8 +82,4 @@ class DefaultMultiplyExpr extends DefaultMultiplicativeExpr
         return new Double( result );
     }
 
-    public void accept( Visitor visitor )
-    {
-        visitor.visit( this );
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultNameStep.java b/src/java/main/org/jaxen/expr/DefaultNameStep.java
index d54f721..29221e7 100644
--- a/src/java/main/org/jaxen/expr/DefaultNameStep.java
+++ b/src/java/main/org/jaxen/expr/DefaultNameStep.java
@@ -1,5 +1,5 @@
 /*
- $Id: DefaultNameStep.java,v 1.50 2006/10/06 13:11:45 elharo Exp $
+ $Id: DefaultNameStep.java,v 1.53 2007/04/17 01:26:35 bewins Exp $
 
  Copyright 2003 The Werken Company. All Rights Reserved.
  
@@ -179,7 +179,7 @@ public class DefaultNameStep extends DefaultStep implements NameStep {
                 }
                 Iterator axisNodeIter = iterableAxis.namedAccessIterator(
                                 contextNode, support, localName, prefix, uri);
-                if (axisNodeIter == null || axisNodeIter.hasNext() == false) {
+                if (axisNodeIter == null || !axisNodeIter.hasNext()) {
                     return Collections.EMPTY_LIST;
                 }
 
@@ -197,7 +197,7 @@ public class DefaultNameStep extends DefaultStep implements NameStep {
             else {
                 // get the iterator over the nodes and check it
                 Iterator axisNodeIter = iterableAxis.iterator(contextNode, support);
-                if (axisNodeIter == null || axisNodeIter.hasNext() == false) {
+                if (axisNodeIter == null || !axisNodeIter.hasNext()) {
                     return Collections.EMPTY_LIST;
                 }
 
@@ -234,30 +234,39 @@ public class DefaultNameStep extends DefaultStep implements NameStep {
 
                 Iterator axisNodeIter = iterableAxis.namedAccessIterator(
                                 eachContextNode, support, localName, prefix, uri);
-                if (axisNodeIter == null || axisNodeIter.hasNext() == false) {
+                if (axisNodeIter == null || !axisNodeIter.hasNext()) {
                     continue;
                 }
 
-                // ensure only one of each node in the result
-                while (axisNodeIter.hasNext()) {
-                    Object eachAxisNode = axisNodeIter.next();
-                    if (! unique.contains(eachAxisNode)) {
-                        unique.add(eachAxisNode);
-                        interimSet.add(eachAxisNode);
-                    }
-                }
-
-                // evaluate the predicates
-                newNodeSet.addAll(getPredicateSet().evaluatePredicates(interimSet, support));
-                interimSet.clear();
-            }
+				while (axisNodeIter.hasNext())
+				{
+					Object eachAxisNode = axisNodeIter.next();
+					interimSet.add(eachAxisNode);
+				}
+
+				// evaluate the predicates
+				List predicateNodes = getPredicateSet().evaluatePredicates(interimSet, support);
+
+				// ensure only one of each node in the result
+				Iterator predicateNodeIter = predicateNodes.iterator();
+				while (predicateNodeIter.hasNext())
+				{
+					Object eachPredicateNode = predicateNodeIter.next();
+					if (! unique.contains(eachPredicateNode))
+					{
+						unique.add(eachPredicateNode);
+						newNodeSet.add(eachPredicateNode);
+					}
+				}
+				interimSet.clear();
+			}
             
         } else {
             for (int i = 0; i < contextSize; ++i) {
                 Object eachContextNode = contextNodeSet.get(i);
 
                 Iterator axisNodeIter = axisIterator(eachContextNode, support);
-                if (axisNodeIter == null || axisNodeIter.hasNext() == false) {
+                if (axisNodeIter == null || !axisNodeIter.hasNext()) {
                     continue;
                 }
 
@@ -274,15 +283,24 @@ public class DefaultNameStep extends DefaultStep implements NameStep {
                     Object eachAxisNode = axisNodeIter.next();
 
                     if (matches(eachAxisNode, support)) {
-                        if (! unique.contains(eachAxisNode)) {
-                            unique.add(eachAxisNode);
-                            interimSet.add(eachAxisNode);
-                        }
+						interimSet.add(eachAxisNode);
                     }
                 }
 
                 // evaluate the predicates
-                newNodeSet.addAll(getPredicateSet().evaluatePredicates(interimSet, support));
+				List predicateNodes = getPredicateSet().evaluatePredicates(interimSet, support);
+
+				// ensure only one of each node in the result
+				Iterator predicateNodeIter = predicateNodes.iterator();
+				while (predicateNodeIter.hasNext())
+				{
+					Object eachPredicateNode = predicateNodeIter.next();
+					if (! unique.contains(eachPredicateNode))
+					{
+						unique.add(eachPredicateNode);
+						newNodeSet.add(eachPredicateNode);
+					}
+				}
                 interimSet.clear();
             }
         }
@@ -389,15 +407,6 @@ public class DefaultNameStep extends DefaultStep implements NameStep {
         }
         return uri1.equals(uri2);
     }
-
-    /**
-     * Visitor pattern for the step.
-     * 
-     * @param visitor  the visitor object
-     */
-    public void accept(Visitor visitor) {
-        visitor.visit(this);
-    }
     
     /**
      * Returns a full information debugging string.
diff --git a/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java b/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java
index 79b5c45..ec1d6a9 100644
--- a/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultNotEqualsExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultNotEqualsExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultNotEqualsExpr.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -86,9 +86,5 @@ DefaultNotEqualsExpr( Expr lhs, Expr rhs )
         }
         return !lhs.equals( rhs );
     }
-
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }   
+    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultNumberExpr.java b/src/java/main/org/jaxen/expr/DefaultNumberExpr.java
index e6897cc..45bbd3b 100644
--- a/src/java/main/org/jaxen/expr/DefaultNumberExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultNumberExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultNumberExpr.java,v 1.11 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.11 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultNumberExpr.java,v 1.13 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultNumberExpr.java,v 1.11 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultNumberExpr.java,v 1.13 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -58,9 +58,9 @@ class DefaultNumberExpr extends DefaultExpr implements NumberExpr
      * 
      */
     private static final long serialVersionUID = -6021898973386269611L;
-    private Number number;
+    private Double number;
 
-    DefaultNumberExpr( Number number )
+    DefaultNumberExpr( Double number )
     {
         this.number = number;
     }
@@ -84,9 +84,5 @@ class DefaultNumberExpr extends DefaultExpr implements NumberExpr
     {
         return getNumber();
     }
-
-    public void accept( Visitor visitor )
-    {
-        visitor.visit( this );
-    }
+    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultOrExpr.java b/src/java/main/org/jaxen/expr/DefaultOrExpr.java
index c21440f..0f2a676 100644
--- a/src/java/main/org/jaxen/expr/DefaultOrExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultOrExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultOrExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.16 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultOrExpr.java,v 1.17 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.17 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultOrExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultOrExpr.java,v 1.17 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -100,9 +100,4 @@ class DefaultOrExpr extends DefaultLogicalExpr
         return Boolean.FALSE;
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
-    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultPathExpr.java b/src/java/main/org/jaxen/expr/DefaultPathExpr.java
index 0957bfb..9864dde 100644
--- a/src/java/main/org/jaxen/expr/DefaultPathExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultPathExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPathExpr.java,v 1.15 2006/10/03 16:24:32 elharo Exp $
- * $Revision: 1.15 $
- * $Date: 2006/10/03 16:24:32 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPathExpr.java,v 1.16 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.16 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultPathExpr.java,v 1.15 2006/10/03 16:24:32 elharo Exp $
+ * $Id: DefaultPathExpr.java,v 1.16 2006/11/30 18:49:26 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -143,9 +143,6 @@ class DefaultPathExpr extends DefaultExpr implements PathExpr {
         }
         return results;
     }
-
-    public void accept(Visitor visitor) {
-        visitor.visit(this);
-    }
+    
 }
 
diff --git a/src/java/main/org/jaxen/expr/DefaultPlusExpr.java b/src/java/main/org/jaxen/expr/DefaultPlusExpr.java
index d74ca44..9b36ae6 100644
--- a/src/java/main/org/jaxen/expr/DefaultPlusExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultPlusExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPlusExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPlusExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultPlusExpr.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultPlusExpr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -81,8 +81,5 @@ class DefaultPlusExpr extends DefaultAdditiveExpr
 
         return new Double( result );        
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }   
+    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultPredicate.java b/src/java/main/org/jaxen/expr/DefaultPredicate.java
index b787621..b626a58 100644
--- a/src/java/main/org/jaxen/expr/DefaultPredicate.java
+++ b/src/java/main/org/jaxen/expr/DefaultPredicate.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPredicate.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.12 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultPredicate.java,v 1.13 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultPredicate.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultPredicate.java,v 1.13 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -94,8 +94,5 @@ class DefaultPredicate implements Predicate
     {
         return getExpr().evaluate( context );
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }   
+    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java b/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java
index 4687516..a0f372a 100644
--- a/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java
+++ b/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.16 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultProcessingInstructionNodeStep.java,v 1.18 2007/01/06 12:21:12 elharo Exp $
+ * $Revision: 1.18 $
+ * $Date: 2007/01/06 12:21:12 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultProcessingInstructionNodeStep.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultProcessingInstructionNodeStep.java,v 1.18 2007/01/06 12:21:12 elharo Exp $
  */
 
 
@@ -80,17 +80,31 @@ public class DefaultProcessingInstructionNodeStep extends DefaultStep
         return this.name;
     }
 
+    public String getText()
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append(getAxisName());
+        buf.append("::processing-instruction(");
+        String name = getName();
+        if (name != null && name.length() != 0)
+        {
+            buf.append("'");
+            buf.append(name);
+            buf.append("'");
+        }
+        buf.append(")");
+        buf.append(super.getText());
+        return buf.toString();
+    }
+
     public boolean matches(Object node,
                            ContextSupport support)
     {
+        
         Navigator nav = support.getNavigator();
-
-        boolean isPi = nav.isProcessingInstruction( node );
-
-        if ( isPi )
+        if ( nav.isProcessingInstruction( node ) )
         {
             String name = getName();
-
             if ( name == null || name.length() == 0 )
             {
                 return true;
@@ -102,10 +116,7 @@ public class DefaultProcessingInstructionNodeStep extends DefaultStep
         }
 
         return false;
+        
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java b/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java
index b5ac271..073592c 100644
--- a/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java
+++ b/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.12 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultRelativeLocationPath.java,v 1.13 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultRelativeLocationPath.java,v 1.12 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultRelativeLocationPath.java,v 1.13 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -66,8 +66,4 @@ public class DefaultRelativeLocationPath extends DefaultLocationPath
         return "[(DefaultRelativeLocationPath): " + super.toString() + "]";
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java b/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java
index 3ecbad3..a0d7504 100644
--- a/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java
+++ b/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultTextNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultTextNodeStep.java,v 1.13 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultTextNodeStep.java,v 1.14 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -82,8 +82,4 @@ public class DefaultTextNodeStep extends DefaultStep implements TextNodeStep
         return getAxisName() + "::text()" + super.getText();
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java b/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java
index b1416ef..bdfc7e2 100644
--- a/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java,v 1.15 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.15 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultUnaryExpr.java,v 1.16 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.16 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultUnaryExpr.java,v 1.15 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultUnaryExpr.java,v 1.16 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -95,8 +95,5 @@ class DefaultUnaryExpr extends DefaultExpr implements UnaryExpr
 
         return new Double( number.doubleValue() * -1 );
     }
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
+    
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultUnionExpr.java b/src/java/main/org/jaxen/expr/DefaultUnionExpr.java
index 2c1f340..1b669fc 100644
--- a/src/java/main/org/jaxen/expr/DefaultUnionExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultUnionExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultUnionExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
- * $Revision: 1.16 $
- * $Date: 2006/06/03 20:52:26 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultUnionExpr.java,v 1.17 2006/11/30 18:49:27 elharo Exp $
+ * $Revision: 1.17 $
+ * $Date: 2006/11/30 18:49:27 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultUnionExpr.java,v 1.16 2006/06/03 20:52:26 elharo Exp $
+ * $Id: DefaultUnionExpr.java,v 1.17 2006/11/30 18:49:27 elharo Exp $
  */
 
 
@@ -122,10 +122,5 @@ public class DefaultUnionExpr extends DefaultBinaryExpr implements UnionExpr
         }
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
-    
 }
 
diff --git a/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java b/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java
index 4681789..880eb91 100644
--- a/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java
+++ b/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java,v 1.15 2006/10/06 13:19:57 elharo Exp $
- * $Revision: 1.15 $
- * $Date: 2006/10/06 13:19:57 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultVariableReferenceExpr.java,v 1.16 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.16 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: DefaultVariableReferenceExpr.java,v 1.15 2006/10/06 13:19:57 elharo Exp $
+ * $Id: DefaultVariableReferenceExpr.java,v 1.16 2006/11/30 18:49:26 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -105,8 +105,4 @@ class DefaultVariableReferenceExpr extends DefaultExpr implements VariableRefere
                                          localName );
     }
     
-    public void accept(Visitor visitor)
-    {
-        visitor.visit(this);
-    }
 }
diff --git a/src/java/main/org/jaxen/expr/DefaultXPathFactory.java b/src/java/main/org/jaxen/expr/DefaultXPathFactory.java
index 593c749..d0e8203 100644
--- a/src/java/main/org/jaxen/expr/DefaultXPathFactory.java
+++ b/src/java/main/org/jaxen/expr/DefaultXPathFactory.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultXPathFactory.java,v 1.15 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.15 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/DefaultXPathFactory.java,v 1.17 2006/11/09 16:07:36 elharo Exp $
+ * $Revision: 1.17 $
+ * $Date: 2006/11/09 16:07:36 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DefaultXPathFactory.java,v 1.15 2006/02/05 21:47:40 elharo Exp $
+ * $Id: DefaultXPathFactory.java,v 1.17 2006/11/09 16:07:36 elharo Exp $
  */
 package org.jaxen.expr;
 
@@ -65,6 +65,12 @@ import org.jaxen.expr.iter.IterableSelfAxis;
 import org.jaxen.saxpath.Axis;
 import org.jaxen.saxpath.Operator;
 
+/**
+ * The concrete implementation of the XPathFactory anstract factory.
+ *
+ *
+ * @see XPathFactory
+ */
 public class DefaultXPathFactory implements XPathFactory
 {
     public XPathExpr createXPath( Expr rootExpr ) throws JaxenException
@@ -295,82 +301,46 @@ public class DefaultXPathFactory implements XPathFactory
         return new DefaultPredicate( predicateExpr );
     }
 
-    protected IterableAxis getIterableAxis( int axis )
+    protected IterableAxis getIterableAxis( int axis ) throws JaxenException
     {
-        IterableAxis iter = null;
+
         switch( axis )
         {
             case Axis.CHILD:
-                {
-                    iter = new IterableChildAxis( axis );
-                    break;
-                }
+                 return new IterableChildAxis( axis );
             case Axis.DESCENDANT:
-                {
-                    iter = new IterableDescendantAxis( axis );
-                    break;
-                }
+                 return  new IterableDescendantAxis( axis );
             case Axis.PARENT:
-                {
-                    iter = new IterableParentAxis( axis );
-                    break;
-                }
+                return new IterableParentAxis( axis );
             case Axis.FOLLOWING_SIBLING:
-                {
-                    iter = new IterableFollowingSiblingAxis( axis );
-                    break;
-                }
+                return  new IterableFollowingSiblingAxis( axis );
             case Axis.PRECEDING_SIBLING:
-                {
-                    iter = new IterablePrecedingSiblingAxis( axis );
-                    break;
-                }
+                return new IterablePrecedingSiblingAxis( axis );
             case Axis.FOLLOWING:
-                {
-                    iter = new IterableFollowingAxis( axis );
-                    break;
-                }
+                return new IterableFollowingAxis( axis );
             case Axis.PRECEDING:
-                {
-                    iter = new IterablePrecedingAxis( axis );
-                    break;
-                }
+                return new IterablePrecedingAxis( axis );
             case Axis.ATTRIBUTE:
-                {
-                    iter = new IterableAttributeAxis( axis );
-                    break;
-                }
+                return new IterableAttributeAxis( axis );
             case Axis.NAMESPACE:
-                {
-                    iter = new IterableNamespaceAxis( axis );
-                    break;
-                }
+                return new IterableNamespaceAxis( axis );
             case Axis.SELF:
-                {
-                    iter = new IterableSelfAxis( axis );
-                    break;
-                }
+                return new IterableSelfAxis( axis );
             case Axis.DESCENDANT_OR_SELF:
-                {
-                    iter = new IterableDescendantOrSelfAxis( axis );
-                    break;
-                }
+                return new IterableDescendantOrSelfAxis( axis );
             case Axis.ANCESTOR_OR_SELF:
-                {
-                    iter = new IterableAncestorOrSelfAxis( axis );
-                    break;
-                }
+                return new IterableAncestorOrSelfAxis( axis );
             case Axis.ANCESTOR:
-                {
-                    iter = new IterableAncestorAxis( axis );
-                    break;
-                }
+                return new IterableAncestorAxis( axis );
+            default:
+                throw new JaxenException("Unrecognized axis code: " + axis);
         }
-        return iter;
+
     }
 
     public PredicateSet createPredicateSet() throws JaxenException
     {
         return new PredicateSet();
     }
+    
 }
diff --git a/src/java/main/org/jaxen/expr/EqualityExpr.java b/src/java/main/org/jaxen/expr/EqualityExpr.java
index 42003d5..b39bc5e 100644
--- a/src/java/main/org/jaxen/expr/EqualityExpr.java
+++ b/src/java/main/org/jaxen/expr/EqualityExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/EqualityExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/EqualityExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/09 16:21:05 $
  *
  * ====================================================================
  *
@@ -42,9 +42,23 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: EqualityExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: EqualityExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
  */
 package org.jaxen.expr;
+
+/**
+ * Represents an XPath equality expression. This is production 23 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">XPath 1.0 specification</a>:
+ * 
+ * <table><tr valign="baseline">
+ * <td><a name="NT-EqualityExpr"></a>[23]   </td><td>EqualityExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a></td><td></td></tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">EqualityExpr</a> '=' <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">EqualityExpr</a> '!=' <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a></td><td></td></tr>
+ * </table>
+ * 
+ */
 public interface EqualityExpr extends BinaryExpr{
-    public String getOperator();
 }
diff --git a/src/java/main/org/jaxen/expr/Expr.java b/src/java/main/org/jaxen/expr/Expr.java
index 5d9c201..3aa8bb8 100644
--- a/src/java/main/org/jaxen/expr/Expr.java
+++ b/src/java/main/org/jaxen/expr/Expr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Expr.java,v 1.11 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.11 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Expr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/30 18:49:26 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: Expr.java,v 1.11 2006/02/05 21:47:40 elharo Exp $
+ * $Id: Expr.java,v 1.14 2006/11/30 18:49:26 elharo Exp $
  */
 
 
@@ -53,9 +53,48 @@ import java.io.Serializable;
 import org.jaxen.Context;
 import org.jaxen.JaxenException;
 
-public interface Expr extends Serializable, Visitable
+/**
+ * Represents an XPath expression. This is production 14 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-Expr">XPath 1.0 specification</a>:
+ * 
+ * <pre>[14]      Expr       ::=      OrExpr</pre>
+ * 
+ */
+public interface Expr extends Serializable
 {
+    
+    
+    /**
+     * Returns a String containing the XPath expression.
+     * 
+     * @return the text form of this XPath expression
+     */
     String getText();
+    
+    /**
+     * Simplifies the XPath expression. For example, the expression
+     * <code>//para[1 = 1]</code> could be simplified to 
+     * <code>//para</code>. In practice, this is usually a noop.
+     * Jaxen does not currently perform any simplification.
+     * 
+     * @return the simplified expression
+     */
     Expr   simplify();
+    
+    
+    /**
+     * Evaluate the expression in the given context, and return the result.
+     * The result will be a <code>java.lang.Double</code> for expressions that 
+     * return a number, a <code>java.lang.String</code> for expressions that 
+     * return a string, a <code>java.lang.Boolean</code> for expressions that 
+     * return a boolean, and a <code>java.util.List</code> for expressions that
+     * return a node-set. In the latter case, the elements of the list are 
+     * the actual objects from the source document model. Copies are not made.
+     * 
+     * @param context the context in which the expression is evaluated
+     * @return an object representing the result of the evaluation
+     * @throws JaxenException
+     */
     Object evaluate(Context context) throws JaxenException;
+    
 }
diff --git a/src/java/main/org/jaxen/expr/FilterExpr.java b/src/java/main/org/jaxen/expr/FilterExpr.java
index 80bc6eb..2fc478a 100644
--- a/src/java/main/org/jaxen/expr/FilterExpr.java
+++ b/src/java/main/org/jaxen/expr/FilterExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/FilterExpr.java,v 1.9 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.9 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/FilterExpr.java,v 1.10 2006/11/08 16:28:04 elharo Exp $
+ * $Revision: 1.10 $
+ * $Date: 2006/11/08 16:28:04 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: FilterExpr.java,v 1.9 2006/02/05 21:47:40 elharo Exp $
+ * $Id: FilterExpr.java,v 1.10 2006/11/08 16:28:04 elharo Exp $
  */
 
 
@@ -52,15 +52,32 @@ package org.jaxen.expr;
 import org.jaxen.Context;
 import org.jaxen.JaxenException;
 
+/**
+ * Represents an XPath filter expression. This is production 20 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">XPath 1.0 specification</a>:
+ * 
+ * <table><tr valign="baseline">
+ * <td><a name="NT-FilterExpr"></a>[20]   </td><td>FilterExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-PrimaryExpr">PrimaryExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-FilterExpr">FilterExpr</a> <a href="http://www.w3.org/TR/xpath#NT-Predicate">Predicate</a></td><td></td>
+ * </tr> 
+ * </table>
+ * 
+ */
 public interface FilterExpr extends Expr, Predicated
 {
 
-    /** Evaluates the filter expression on the current context
+    /** 
+     * Evaluates the filter expression on the current context
      * and returns true if at least one node matches.
+     * 
+     * @return true if a node matches; false if no node matches
      */
     public boolean asBoolean(Context context) throws JaxenException;
+    
     /** 
-     * @return underlying filter expression
+     * @return the underlying filter expression
      */
     public Expr getExpr();
 }
diff --git a/src/java/main/org/jaxen/expr/FunctionCallExpr.java b/src/java/main/org/jaxen/expr/FunctionCallExpr.java
index bb6c270..8f7038e 100644
--- a/src/java/main/org/jaxen/expr/FunctionCallExpr.java
+++ b/src/java/main/org/jaxen/expr/FunctionCallExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/FunctionCallExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/FunctionCallExpr.java,v 1.9 2006/11/08 16:37:59 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2006/11/08 16:37:59 $
  *
  * ====================================================================
  *
@@ -42,18 +42,52 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: FunctionCallExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: FunctionCallExpr.java,v 1.9 2006/11/08 16:37:59 elharo Exp $
  */
 
 
-
 package org.jaxen.expr;
+
 import java.util.List;
 
+/**
+ * Represents an XPath function call expression. This is production 16 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-FunctionCall">XPath 1.0 specification</a>:
+ * 
+ * <<pre>[16] FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')'</pre>
+ * 
+ */
 public interface FunctionCallExpr extends Expr
 {
+    
+    /**
+     * Returns the namespace prefix of the function. This is the empty
+     * string for XPath's built-in functions. 
+     * 
+     * @return the namespace prefix of the function
+     */
     public String getPrefix();
+    
+    /**
+     * Returns the local name of the function. 
+     * 
+     * @return the local name of the function
+     */
     public String getFunctionName();
+    
+    /**
+     * Add the next argument to the function. 
+     * 
+     * @param parameter a function argument 
+     */
     public void addParameter(Expr parameter);
+    
+    /**
+     * Returns the the ordered list of function arguments.
+     * Each member of the list is an <code>Expr</code> object.
+     * 
+     * @return the ordered list of function arguments
+     */
     public List getParameters();
+    
 }
diff --git a/src/java/main/org/jaxen/expr/LiteralExpr.java b/src/java/main/org/jaxen/expr/LiteralExpr.java
index ccd9244..e19d459 100644
--- a/src/java/main/org/jaxen/expr/LiteralExpr.java
+++ b/src/java/main/org/jaxen/expr/LiteralExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LiteralExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LiteralExpr.java,v 1.9 2006/11/08 16:47:30 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2006/11/08 16:47:30 $
  *
  * ====================================================================
  *
@@ -42,14 +42,29 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: LiteralExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: LiteralExpr.java,v 1.9 2006/11/08 16:47:30 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+
+/**
+ * Represents an XPath string literal. This is production 29 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-Literal">XPath 1.0 specification</a>:
+ * 
+ * <pre>[29] Literal ::= '"' [^"]* '"'   
+ *               | "'" [^']* "'"</pre>
+ * 
+ */
 public interface LiteralExpr extends Expr
 {
+    /**
+     * Returns the contents of the string literal, not including the
+     * quote marks.
+     * 
+     * @return the contents of the string literal
+     */
     public String getLiteral();
 }
diff --git a/src/java/main/org/jaxen/expr/LocationPath.java b/src/java/main/org/jaxen/expr/LocationPath.java
index ad91ee6..e65c3e3 100644
--- a/src/java/main/org/jaxen/expr/LocationPath.java
+++ b/src/java/main/org/jaxen/expr/LocationPath.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LocationPath.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.8 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LocationPath.java,v 1.9 2006/11/08 17:02:21 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2006/11/08 17:02:21 $
  *
  * ====================================================================
  *
@@ -42,20 +42,47 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: LocationPath.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
+ * $Id: LocationPath.java,v 1.9 2006/11/08 17:02:21 elharo Exp $
  */
 
-
-
 package org.jaxen.expr;
 
 import java.util.List;
 
+/**
+ * Represents an XPath location path such as <code>//foo/bar</code>
+ * or <code>pre:baz[position()=last()]</code>.
+ * This is production 1 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-LocationPath">XPath 1.0 specification</a>:
+ * 
+ * <pre>[1]  LocationPath ::= RelativeLocationPath    
+ *                    | AbsoluteLocationPath</pre>
+ * 
+ */
 public interface LocationPath extends Expr
 {
+    
+    /**
+     * Add the next step to this location path.
+     * 
+     * @param step
+     */
     void addStep(Step step);
 
+    /**
+     * Returns the ordered list of steps in this location path.
+     * This list may be live.
+     * 
+     * @return the ordered list of steps in this location path
+     */
     List getSteps();
     
+    /**
+     * Returns true if this is an absolute location path; false if it isn't. 
+     * Absolute location paths all begiune with <code>/</code> 
+     * or <code>//</code>.
+     * 
+     * @return true if this is an absol;ute location path; false if it isn't
+     */
     boolean isAbsolute();
 }
diff --git a/src/java/main/org/jaxen/expr/LogicalExpr.java b/src/java/main/org/jaxen/expr/LogicalExpr.java
index 14fefbd..3a2fd76 100644
--- a/src/java/main/org/jaxen/expr/LogicalExpr.java
+++ b/src/java/main/org/jaxen/expr/LogicalExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LogicalExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/LogicalExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/09 16:21:05 $
  *
  * ====================================================================
  *
@@ -42,10 +42,28 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: LogicalExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: LogicalExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
  */
 package org.jaxen.expr;
 
-public interface LogicalExpr extends BinaryExpr{
-    public String getOperator();
+/**
+ * Represents an XPath logical expression. This represents productions
+ * <a href="http://www.w3.org/TR/xpath#NT-OrExpr">21   OrExpr</a> and 
+ * <a href="http://www.w3.org/TR/xpath#NT-AndExpr">22 AndExpr</a> in the XPath specification.
+ * 
+ * <table><tr valign="baseline">
+ * <td><a name="NT-OrExpr"></a>[21]   </td><td>OrExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-AndExpr">AndExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-OrExpr">OrExpr</a> 'or' <a href="http://www.w3.org/TR/xpath#NT-AndExpr">AndExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td><a name="NT-AndExpr"></a>[22]   </td><td>AndExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">EqualityExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-AndExpr">AndExpr</a> 'and' <a href="http://www.w3.org/TR/xpath#NT-EqualityExpr">EqualityExpr</a></td><td></td>
+ * </tr></table>
+ * 
+ */
+public interface LogicalExpr extends BinaryExpr {
 }
diff --git a/src/java/main/org/jaxen/expr/MultiplicativeExpr.java b/src/java/main/org/jaxen/expr/MultiplicativeExpr.java
index edbb178..e13d4fc 100644
--- a/src/java/main/org/jaxen/expr/MultiplicativeExpr.java
+++ b/src/java/main/org/jaxen/expr/MultiplicativeExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/MultiplicativeExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/MultiplicativeExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/09 16:21:05 $
  *
  * ====================================================================
  *
@@ -42,10 +42,28 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: MultiplicativeExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: MultiplicativeExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
  */
 package org.jaxen.expr;
 
-public interface MultiplicativeExpr extends BinaryExpr{
-    public String getOperator();
+/**
+ * Represents an XPath multiplicative expression. This is production 26 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-UnionExpr">XPath 1.0 specification</a>:
+ * 
+ * <table><tr valign="baseline">
+ * <td><a name="NT-MultiplicativeExpr"></a>[26]   </td><td>MultiplicativeExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-UnaryExpr">UnaryExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-MultiplicativeExpr">MultiplicativeExpr</a> <a href="http://www.w3.org/TR/xpath#NT-MultiplyOperator">MultiplyOperator</a> <a href="http://www.w3.org/TR/xpath#NT-UnaryExpr">UnaryExpr</a></td><td></td>
+ * 
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-MultiplicativeExpr">MultiplicativeExpr</a> 'div' <a href="http://www.w3.org/TR/xpath#NT-UnaryExpr">UnaryExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-MultiplicativeExpr">MultiplicativeExpr</a> 'mod' <a href="http://www.w3.org/TR/xpath#NT-UnaryExpr">UnaryExpr</a></td><td></td>
+ * </tr></table>
+ * 
+ */
+public interface MultiplicativeExpr extends BinaryExpr {
 }
diff --git a/src/java/main/org/jaxen/expr/NameStep.java b/src/java/main/org/jaxen/expr/NameStep.java
index 030d281..aee4587 100644
--- a/src/java/main/org/jaxen/expr/NameStep.java
+++ b/src/java/main/org/jaxen/expr/NameStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/NameStep.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/NameStep.java,v 1.5 2006/11/08 17:10:02 elharo Exp $
+ * $Revision: 1.5 $
+ * $Date: 2006/11/08 17:10:02 $
  *
  * ====================================================================
  *
@@ -42,13 +42,34 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: NameStep.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: NameStep.java,v 1.5 2006/11/08 17:10:02 elharo Exp $
  */
 package org.jaxen.expr;
 
-//public interface Step extends Predicated, Expr
+/**
+ * Represents an XPath name test such as <code>para</code> or 
+ * <code>svg:rect</code>. This is production 37 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-NameTest">XPath 1.0 specification</a>:
+ * 
+ * <pre>[37] NameTest ::=  '*' 
+ *                | NCName ':' '*'    
+ *                | QName</pre>
+ * 
+ */
 public interface NameStep extends Step
 {
+    
+    /**
+     * Returns the namespace prefix of the matched node. This is the empty
+     * string for nodes in the default namespace. 
+     * 
+     * @return the namespace prefix of the natched node
+     */
     public String getPrefix();
-    public String getLocalName();
-}
+    
+    /**
+     * Returns the local name of the matched node 
+     * 
+     * @return the local name of the test
+     */
+    public String getLocalName();}
diff --git a/src/java/main/org/jaxen/expr/NumberExpr.java b/src/java/main/org/jaxen/expr/NumberExpr.java
index 503ee2e..fff78f4 100644
--- a/src/java/main/org/jaxen/expr/NumberExpr.java
+++ b/src/java/main/org/jaxen/expr/NumberExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/NumberExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/NumberExpr.java,v 1.8 2006/11/08 17:17:32 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/08 17:17:32 $
  *
  * ====================================================================
  *
@@ -43,11 +43,26 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: NumberExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: NumberExpr.java,v 1.8 2006/11/08 17:17:32 elharo Exp $
  */
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath floating point literal. This is production 30 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-Number">XPath 1.0 specification</a>:
+ * 
+ * <pre>[30] Number ::=  Digits ('.' Digits?)?   
+ *              | '.' Digits</pre>
+ * 
+ */
 public interface NumberExpr extends Expr
 {
+    
+    
+    /**
+     * Returns a <code>java.lang.Double</code> representing the number.
+     * 
+     * @return a <code>java.lang.Double</code> representing the number
+     */
     public Number getNumber();
 }
diff --git a/src/java/main/org/jaxen/expr/PathExpr.java b/src/java/main/org/jaxen/expr/PathExpr.java
index 4332a67..b912fdb 100644
--- a/src/java/main/org/jaxen/expr/PathExpr.java
+++ b/src/java/main/org/jaxen/expr/PathExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/PathExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/PathExpr.java,v 1.9 2007/05/02 14:26:41 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2007/05/02 14:26:41 $
  *
  * ====================================================================
  *
@@ -42,17 +42,47 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: PathExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: PathExpr.java,v 1.9 2007/05/02 14:26:41 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath path expression.
+ * This is production 19 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-PathExpr">XPath 1.0 specification</a>:
+ * 
+ * <pre>[19] PathExpr ::= LocationPath    
+ *                | FilterExpr    
+ *                | FilterExpr '/' RelativeLocationPath   
+ *                | FilterExpr '//' RelativeLocationPath  </pre>
+ * 
+ */
 public interface PathExpr extends Expr
 {
+    
+    /**
+     * Returns the filter expression that starts the path expression.
+     * 
+     * @return the filter expression that starts the path expression
+     */
     Expr getFilterExpr();
+    
+    
+    /**
+     * Changes the expression's filter expression.
+     * 
+     * @param filterExpr the new filter expression
+     */
     void setFilterExpr(Expr filterExpr);
 
+    /**
+     * Returns the location path part of this path expression.
+     * 
+     * @return the location path part of this expression
+     */
     LocationPath getLocationPath();
+    
 }
diff --git a/src/java/main/org/jaxen/expr/Predicate.java b/src/java/main/org/jaxen/expr/Predicate.java
index c6497da..3742ba0 100644
--- a/src/java/main/org/jaxen/expr/Predicate.java
+++ b/src/java/main/org/jaxen/expr/Predicate.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Predicate.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.10 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Predicate.java,v 1.14 2007/05/02 14:27:46 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2007/05/02 14:27:46 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: Predicate.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
+ * $Id: Predicate.java,v 1.14 2007/05/02 14:27:46 elharo Exp $
  */
 
 
@@ -53,15 +53,61 @@ import java.io.Serializable;
 import org.jaxen.Context;
 import org.jaxen.JaxenException;
 
-public interface Predicate extends Serializable, Visitable
+
+/**
+ * Represents an XPath predicate such as <code>[position() = last()]</code>.
+ * This is production 8 and 9 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-Predicate">XPath 1.0 specification</a>:
+ * 
+ * <pre> [8] Predicate     ::= '[' PredicateExpr ']'   
+ * [9] PredicateExpr ::= Expr</pre>
+ * 
+ */
+public interface Predicate extends Serializable
 {
+    /**
+     * Returns the expression in this predicate.
+     * 
+     * @return the expression between the brackets
+     */
     Expr getExpr();
+    
+    /**
+     * Change the expression used by this predicate.
+     * 
+     * @param expr the new expression
+     */
     void setExpr(Expr expr);
 
+    /**
+     * Simplify the expression in this predicate.
+     * 
+     * @see Expr#simplify()
+     */
     void simplify();
 
+    /**
+     * Returns the string form of the predicate, 
+     * including the square brackets.
+     * 
+     * @return the bracketed form of this predicate
+     */
     String getText();
 
+    /**
+     * Evaluates this predicate's expression and returns the result.
+     * The result will be a <code>java.lang.Double</code> for expressions that 
+     * return a number, a <code>java.lang.String</code> for expressions that 
+     * return a string, a <code>java.lang.Boolean</code> for expressions that 
+     * return a boolean, and a <code>java.util.List</code> for expressions that
+     * return a node-set. In the latter case, the elements of the list are 
+     * the actual objects from the source document model. Copies are not made.
+     *
+     * @param context the context in which the expression is evaluated
+     * @return an object representing the result of the evaluation
+     * @throws JaxenException
+     * @see Expr#evaluate(Context)
+     */
     Object evaluate(Context context) throws JaxenException;
 
 }
diff --git a/src/java/main/org/jaxen/expr/PredicateSet.java b/src/java/main/org/jaxen/expr/PredicateSet.java
index 06aded1..f2e06c8 100644
--- a/src/java/main/org/jaxen/expr/PredicateSet.java
+++ b/src/java/main/org/jaxen/expr/PredicateSet.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/PredicateSet.java,v 1.22 2006/09/15 21:03:23 elharo Exp $
- * $Revision: 1.22 $
- * $Date: 2006/09/15 21:03:23 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/PredicateSet.java,v 1.23 2006/11/13 22:38:17 elharo Exp $
+ * $Revision: 1.23 $
+ * $Date: 2006/11/13 22:38:17 $
  *
  * ====================================================================
  *
@@ -43,7 +43,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: PredicateSet.java,v 1.22 2006/09/15 21:03:23 elharo Exp $
+ * $Id: PredicateSet.java,v 1.23 2006/11/13 22:38:17 elharo Exp $
  */
 
 
@@ -60,6 +60,19 @@ import org.jaxen.ContextSupport;
 import org.jaxen.JaxenException;
 import org.jaxen.function.BooleanFunction;
 
+/**
+ * <p>
+ * Represents the collection of predicates that follow the node-test in a
+ * location path. 
+ * </p>
+ * 
+ * <p>
+ * There is no rule that the same predicate may not 
+ * appear twice in an XPath expression, nor does this class enforce any such rule.
+ * This is implemented more as a list than a set. However, adding the swme predicate 
+ * twice should have no effect on the final result other than slowing it down.
+ * </p>
+ */
 public class PredicateSet implements Serializable
 {
 
@@ -67,11 +80,19 @@ public class PredicateSet implements Serializable
     
     private List predicates;
 
+    /**
+     * Create a new empty predicate set.
+     */
     public PredicateSet()
     {
         this.predicates = Collections.EMPTY_LIST;
     }
 
+    /**
+     * Add a predicate to the set.
+     * 
+     * @param predicate the predicate to be inserted
+     */
     public void addPredicate(Predicate predicate)
     {
         if ( this.predicates == Collections.EMPTY_LIST )
@@ -82,11 +103,20 @@ public class PredicateSet implements Serializable
         this.predicates.add( predicate );
     }
 
+    /**
+     * Returns the list containing the predicates.
+     * This list is live, not a copy.
+     * 
+     * @return a live list of predicates
+     */
     public List getPredicates()
     {
         return this.predicates;
     }
 
+    /**
+     * Simplify each of the predicates in the list.
+     */
     public void simplify()
     {
         Iterator  predIter = this.predicates.iterator();
@@ -99,6 +129,11 @@ public class PredicateSet implements Serializable
         }
     }
 
+    /**
+     * Returns the XPath string containing each of the predicates.
+     * 
+     * @return the XPath string containing each of the predicates
+     */
     public String getText()
     {
         StringBuffer buf = new StringBuffer();
@@ -115,6 +150,17 @@ public class PredicateSet implements Serializable
         return buf.toString();
     }
 
+    /**
+     * <p>Returns true if any of the supplied nodes satisfy 
+     * all the predicates in the set. Returns false if none of the supplied
+     * nodes matches all the predicates in the set. Returns false if the 
+     * node-set is empty.</p>
+     * 
+     * @param contextNodeSet the nodes to test against these predicates
+     * @param support ????
+     * @return true if any node in the contextNodeSet matches all the predicates
+     * @throws JaxenException
+     */
     protected boolean evaluateAsBoolean(List contextNodeSet,
                                       ContextSupport support) throws JaxenException
     {
@@ -174,6 +220,15 @@ public class PredicateSet implements Serializable
     
     
     
+   /**
+    * <p>Returns all of the supplied nodes that satisfy 
+    * all the predicates in the set. </p>
+    * 
+    * @param contextNodeSet the nodes to test against these predicates
+    * @param support ????
+    * @return all the nodes that match each of the predicates
+    * @throws JaxenException
+    */
    protected List evaluatePredicates(List contextNodeSet, ContextSupport support)
             throws JaxenException {
         // Easy way out (necessary)
@@ -231,4 +286,5 @@ public class PredicateSet implements Serializable
         }
         return filteredNodes;
     }
+    
 }
diff --git a/src/java/main/org/jaxen/expr/Predicated.java b/src/java/main/org/jaxen/expr/Predicated.java
index 5c09b5e..f2e5a2b 100644
--- a/src/java/main/org/jaxen/expr/Predicated.java
+++ b/src/java/main/org/jaxen/expr/Predicated.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Predicated.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.8 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Predicated.java,v 1.9 2006/11/08 18:07:25 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2006/11/08 18:07:25 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: Predicated.java,v 1.8 2006/02/05 21:47:40 elharo Exp $
+ * $Id: Predicated.java,v 1.9 2006/11/08 18:07:25 elharo Exp $
  */
 
 
@@ -52,9 +52,32 @@ package org.jaxen.expr;
 import java.io.Serializable;
 import java.util.List;
 
+/**
+ * Interface for objects which can have one or more predicates.
+ *
+ */
 public interface Predicated extends Serializable
 {
+    /**
+     * Add an additional predicate to this object.
+     * 
+     * @param predicate the predicate to add
+     */
     void addPredicate(Predicate predicate);
+    
+    
+    /**
+     * Returns a possibly empty list of predicates.
+     * 
+     * @return the list of predicates
+     */
     List getPredicates();
+    
+    
+    /**
+     * Returns a possibly empty set of predicates.
+     * 
+     * @return the set of predicates
+     */
     PredicateSet getPredicateSet();
 }
diff --git a/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java b/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java
index ae928b2..9b2def9 100644
--- a/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java
+++ b/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/ProcessingInstructionNodeStep.java,v 1.5 2006/11/08 15:44:33 elharo Exp $
+ * $Revision: 1.5 $
+ * $Date: 2006/11/08 15:44:33 $
  *
  * ====================================================================
  *
@@ -42,11 +42,20 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: ProcessingInstructionNodeStep.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: ProcessingInstructionNodeStep.java,v 1.5 2006/11/08 15:44:33 elharo Exp $
  */
 package org.jaxen.expr;
 
+/**
+ * Represents the XPath node-test <code>processing-instruction()</code>.
+ * 
+ */
 public interface ProcessingInstructionNodeStep extends Step
 {
+    /**
+     * Returns the target matched by this processing instruction node-step. 
+     * 
+     * @return the target of the processing instruction
+     */
     public String getName();
 }
diff --git a/src/java/main/org/jaxen/expr/RelationalExpr.java b/src/java/main/org/jaxen/expr/RelationalExpr.java
index 68c13c9..f927314 100644
--- a/src/java/main/org/jaxen/expr/RelationalExpr.java
+++ b/src/java/main/org/jaxen/expr/RelationalExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/RelationalExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/RelationalExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/09 16:21:05 $
  *
  * ====================================================================
  *
@@ -42,9 +42,28 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: RelationalExpr.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
+ * $Id: RelationalExpr.java,v 1.6 2006/11/09 16:21:05 elharo Exp $
  */
 package org.jaxen.expr; 
-public interface RelationalExpr extends BinaryExpr{
-    public String getOperator();
+
+/**
+ * Represents an XPath relational expression such as 
+ * <code>count(//p) > count(//div)</code>. 
+ * This is production 24 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">XPath 1.0 specification</a>:
+ *
+ *<table><tr valign="baseline"><td><a name="NT-RelationalExpr"></a>[24]   </td><td>RelationalExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a></td><td></td>
+ *</tr><tr valign="baseline">
+ *<td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a> '<' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a></td><td></td>
+ *</tr><tr valign="baseline">
+ *<td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a> '>' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a></td><td></td>
+ *</tr>
+ *<tr valign="baseline">
+ *<td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a> '<=' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a></td><td></td>
+ * </tr>
+ * <tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-RelationalExpr">RelationalExpr</a> '>=' <a href="http://www.w3.org/TR/xpath#NT-AdditiveExpr">AdditiveExpr</a></td><td></td>v * </tr></table>
+ * 
+ */
+public interface RelationalExpr extends BinaryExpr {
 }
diff --git a/src/java/main/org/jaxen/expr/Step.java b/src/java/main/org/jaxen/expr/Step.java
index 1e71584..e3ba1f6 100644
--- a/src/java/main/org/jaxen/expr/Step.java
+++ b/src/java/main/org/jaxen/expr/Step.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Step.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.10 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Step.java,v 1.13 2006/12/10 15:32:14 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/12/10 15:32:14 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: Step.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
+ * $Id: Step.java,v 1.13 2006/12/10 15:32:14 elharo Exp $
  */
 
 package org.jaxen.expr;
@@ -56,44 +56,67 @@ import org.jaxen.JaxenException;
 import org.jaxen.UnsupportedAxisException;
 
 /**
- * A Step represents a location step in a LocationPath. The node-set selected by 
+ * <p>Represents a location step in a LocationPath. The node-set selected by 
  * the location step is the node-set that results from generating an initial 
  * node-set from the axis and node-test, and then filtering that node-set by 
- * each of the predicates in turn.
+ * each of the predicates in turn.</p>
  * 
+ * <p>
  * The initial node-set consists of the nodes having the relationship to the 
  * context node specified by the axis, and having the node type and expanded-name 
- * specified by the node test.
+ * specified by the node test.</p>
  */
-public interface Step extends Predicated, Visitable
+public interface Step extends Predicated
 {
 
     /**
      * Performs the node-test part of evaluating the step for the given node
      * (which must be on the axis).
+     * 
+     * @return true if the node matches this step; false if it doesn't
      */    
     boolean matches(Object node,
                     ContextSupport contextSupport) throws JaxenException;
 
+    /**
+     * Returns a <code>String</code> containing the XPath expression.
+     * 
+     * @return the text form of this step
+     */
     String getText();
 
+    /**
+     * Simplifies the XPath step. In practice, this is usually a noop.
+     * Jaxen does not currently perform any simplification.
+     */
     void simplify();
 
     /**
      * Get an identifier for the current axis.
+     * 
+     * @return the axis identifier
      * @see org.jaxen.saxpath.Axis
      */
     public int getAxis();
 
     /**
      * Get an Iterator for the current axis starting in the given contextNode.
-     */    
+     * 
+     * @param contextNode the node from which to follow this step
+     * @param support the remaining context for the traversal
+     * @return an iterator over the nodes along the axis
+     * @throws UnsupportedAxisException if the navigator does not support this step's axis
+     * 
+     */
     Iterator axisIterator(Object contextNode,
                           ContextSupport support) throws UnsupportedAxisException;
+    
 
     /**
      * For each node in the given context calls matches() for every node on the
      * axis, then filters the result by each of the predicates.
+     * 
+     * @return a list of matching nodes
      */
     List evaluate(Context context) throws JaxenException;
 
diff --git a/src/java/main/org/jaxen/expr/TextNodeStep.java b/src/java/main/org/jaxen/expr/TextNodeStep.java
index a584ecf..63643dd 100644
--- a/src/java/main/org/jaxen/expr/TextNodeStep.java
+++ b/src/java/main/org/jaxen/expr/TextNodeStep.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/TextNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.5 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/TextNodeStep.java,v 1.6 2006/11/08 18:52:02 elharo Exp $
+ * $Revision: 1.6 $
+ * $Date: 2006/11/08 18:52:02 $
  *
  * ====================================================================
  *
@@ -42,10 +42,14 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: TextNodeStep.java,v 1.5 2006/02/05 21:47:40 elharo Exp $
+ * $Id: TextNodeStep.java,v 1.6 2006/11/08 18:52:02 elharo Exp $
  */
 package org.jaxen.expr;
 
+/**
+ * Represents the XPath node-test <code>text()</code>.
+ * 
+ */
 public interface TextNodeStep extends Step
 {
 }
diff --git a/src/java/main/org/jaxen/expr/UnaryExpr.java b/src/java/main/org/jaxen/expr/UnaryExpr.java
index d47ac8b..e6fb3dc 100644
--- a/src/java/main/org/jaxen/expr/UnaryExpr.java
+++ b/src/java/main/org/jaxen/expr/UnaryExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/UnaryExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/UnaryExpr.java,v 1.7 2006/11/08 19:06:30 elharo Exp $
+ * $Revision: 1.7 $
+ * $Date: 2006/11/08 19:06:30 $
  *
  * ====================================================================
  *
@@ -42,14 +42,29 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: UnaryExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: UnaryExpr.java,v 1.7 2006/11/08 19:06:30 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath unary expression such as <code>-78</code>.
+ * This is production 27 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-UnaryExpr">XPath 1.0 specification</a>:
+ * 
+ * <pre>[27] UnaryExpr ::= UnionExpr | '-' UnaryExpr</pre>
+ * 
+ */
 public interface UnaryExpr extends Expr
 {
+    
+    /**
+     * Returns the expression following the minus sign.
+     * 
+     * @return the expression following the minus sign
+     */
     Expr getExpr();
+    
 }
diff --git a/src/java/main/org/jaxen/expr/UnionExpr.java b/src/java/main/org/jaxen/expr/UnionExpr.java
index 8738b75..28bae38 100644
--- a/src/java/main/org/jaxen/expr/UnionExpr.java
+++ b/src/java/main/org/jaxen/expr/UnionExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/UnionExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/UnionExpr.java,v 1.7 2006/11/08 15:57:20 elharo Exp $
+ * $Revision: 1.7 $
+ * $Date: 2006/11/08 15:57:20 $
  *
  * ====================================================================
  *
@@ -42,13 +42,24 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: UnionExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: UnionExpr.java,v 1.7 2006/11/08 15:57:20 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath union expression. This is production 18 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-UnionExpr">XPath 1.0 specification</a>:
+ * 
+ * <table><tr valign="baseline">
+ * <td><a name="NT-UnionExpr"></a>[18]   </td><td>UnionExpr</td><td>   ::=   </td><td><a href="http://www.w3.org/TR/xpath#NT-PathExpr">PathExpr</a></td><td></td>
+ * </tr><tr valign="baseline">
+ * <td></td><td></td><td></td><td>| <a href="http://www.w3.org/TR/xpath#NT-UnionExpr">UnionExpr</a> '|' <a href="http://www.w3.org/TR/xpath#NT-PathExpr">PathExpr</a>
+ * </tr></table>
+ * 
+ */
 public interface UnionExpr extends BinaryExpr
 {
 }
diff --git a/src/java/main/org/jaxen/expr/VariableReferenceExpr.java b/src/java/main/org/jaxen/expr/VariableReferenceExpr.java
index 7b77838..d0f9f03 100644
--- a/src/java/main/org/jaxen/expr/VariableReferenceExpr.java
+++ b/src/java/main/org/jaxen/expr/VariableReferenceExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/VariableReferenceExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/VariableReferenceExpr.java,v 1.8 2006/11/08 19:20:29 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/08 19:20:29 $
  *
  * ====================================================================
  *
@@ -42,15 +42,35 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: VariableReferenceExpr.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: VariableReferenceExpr.java,v 1.8 2006/11/08 19:20:29 elharo Exp $
  */
 
 
 
 package org.jaxen.expr;
 
+/**
+ * Represents an XPath variable reference. This is production 36 in the 
+ * <a href="http://www.w3.org/TR/xpath#NT-VariableReference">XPath 1.0 specification</a>:
+ * 
+ * <pre>[36] VariableReference ::= '$' QName</pre>
+ * 
+ */
 public interface VariableReferenceExpr extends Expr
 {
+    /**
+     * Returns the namespace prefix of the variable. This is the empty
+     * string for variables with no namespace prefix. 
+     * 
+     * @return the namespace prefix of the variable
+     */
     public String getPrefix();
+    
+    /**
+     * Returns the local name of the variable. 
+     * 
+     * @return the local name of the variable
+     */
     public String getVariableName();
+
 }
diff --git a/src/java/main/org/jaxen/expr/Visitable.java b/src/java/main/org/jaxen/expr/Visitable.java
deleted file mode 100644
index 74efd12..0000000
--- a/src/java/main/org/jaxen/expr/Visitable.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Visitable.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
- *
- * ====================================================================
- *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- *   * Neither the name of the Jaxen Project nor the names of its
- *     contributors may be used to endorse or promote products derived 
- *     from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- * This software consists of voluntary contributions made by many 
- * individuals on behalf of the Jaxen Project and was originally 
- * created by bob mcwhirter <bob at werken.com> and 
- * James Strachan <jstrachan at apache.org>.  For more information on the 
- * Jaxen Project, please see <http://www.jaxen.org/>.
- * 
- * $Id: Visitable.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- */
-package org.jaxen.expr;
-public interface Visitable {
-    public void accept(Visitor visitor);
-}
diff --git a/src/java/main/org/jaxen/expr/Visitor.java b/src/java/main/org/jaxen/expr/Visitor.java
deleted file mode 100644
index 0654d64..0000000
--- a/src/java/main/org/jaxen/expr/Visitor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/Visitor.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
- *
- * ====================================================================
- *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- *   * Neither the name of the Jaxen Project nor the names of its
- *     contributors may be used to endorse or promote products derived 
- *     from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- * This software consists of voluntary contributions made by many 
- * individuals on behalf of the Jaxen Project and was originally 
- * created by bob mcwhirter <bob at werken.com> and 
- * James Strachan <jstrachan at apache.org>.  For more information on the 
- * Jaxen Project, please see <http://www.jaxen.org/>.
- * 
- * $Id: Visitor.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- */
-package org.jaxen.expr;
-
-public interface Visitor {
-    public void visit(PathExpr path);
-    public void visit(LocationPath path);
-    public void visit(LogicalExpr expr);
-    public void visit(EqualityExpr expr);
-    public void visit(FilterExpr expr);
-    public void visit(RelationalExpr expr);
-    public void visit(AdditiveExpr expr);
-    public void visit(MultiplicativeExpr expr);
-    public void visit(UnaryExpr expr);
-    public void visit(UnionExpr expr);
-    public void visit(NumberExpr expr);
-    public void visit(LiteralExpr expr);
-    public void visit(VariableReferenceExpr expr);
-    public void visit(FunctionCallExpr expr);
-    // Steps
-    public void visit(NameStep step);
-    public void visit(ProcessingInstructionNodeStep step);
-    public void visit(AllNodeStep step);
-    public void visit(TextNodeStep step);
-    public void visit(CommentNodeStep step);
-    public void visit(Predicate predicate);
-}
diff --git a/src/java/main/org/jaxen/expr/VisitorSupport.java b/src/java/main/org/jaxen/expr/VisitorSupport.java
deleted file mode 100644
index c202e5c..0000000
--- a/src/java/main/org/jaxen/expr/VisitorSupport.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/VisitorSupport.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.4 $
- * $Date: 2006/02/05 21:47:40 $
- *
- * ====================================================================
- *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- *   * Neither the name of the Jaxen Project nor the names of its
- *     contributors may be used to endorse or promote products derived 
- *     from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- * This software consists of voluntary contributions made by many 
- * individuals on behalf of the Jaxen Project and was originally 
- * created by bob mcwhirter <bob at werken.com> and 
- * James Strachan <jstrachan at apache.org>.  For more information on the 
- * Jaxen Project, please see <http://www.jaxen.org/>.
- * 
- * $Id: VisitorSupport.java,v 1.4 2006/02/05 21:47:40 elharo Exp $
- */
-package org.jaxen.expr;
-public class VisitorSupport implements Visitor {
-    public void visit(PathExpr path) {
-    }
-    public void visit(LocationPath path) {
-    }
-    public void visit(LogicalExpr expr) {
-    }
-    public void visit(EqualityExpr expr) {
-    }
-    public void visit(FilterExpr expr) {
-    }
-    public void visit(RelationalExpr expr) {
-    }
-    public void visit(AdditiveExpr expr) {
-    }
-    public void visit(MultiplicativeExpr expr) {
-    }
-    public void visit(UnaryExpr expr) {
-    }
-    public void visit(UnionExpr expr) {
-    }
-    public void visit(NumberExpr expr) {
-    }
-    public void visit(LiteralExpr expr) {
-    }
-    public void visit(VariableReferenceExpr expr) {
-    }
-    public void visit(FunctionCallExpr expr) {
-    }
-    public void visit(NameStep step){
-    }
-    public void visit(ProcessingInstructionNodeStep step){
-    }
-    public void visit(AllNodeStep step){
-    }
-    public void visit(TextNodeStep step){
-    }
-    public void visit(CommentNodeStep step){
-    }
-    public void visit(Predicate predicate){
-    }
-}
diff --git a/src/java/main/org/jaxen/expr/XPathExpr.java b/src/java/main/org/jaxen/expr/XPathExpr.java
index 38b6150..b10fc7b 100644
--- a/src/java/main/org/jaxen/expr/XPathExpr.java
+++ b/src/java/main/org/jaxen/expr/XPathExpr.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/XPathExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/XPathExpr.java,v 1.9 2007/05/02 15:04:46 elharo Exp $
+ * $Revision: 1.9 $
+ * $Date: 2007/05/02 15:04:46 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: XPathExpr.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: XPathExpr.java,v 1.9 2007/05/02 15:04:46 elharo Exp $
  */
 
 
@@ -55,13 +55,54 @@ import java.util.List;
 import org.jaxen.Context;
 import org.jaxen.JaxenException;
 
+
+/**
+ * A wrapper around an XPath expression. 
+ * 
+ */
 public interface XPathExpr extends Serializable
 {
+    
+    /**
+     * Returns the wrapped expression object.
+     * 
+     * @return the wrapped Expr object
+     */
     Expr getRootExpr();
+    
+    
+    /**
+     * Changes the wrapped expression object.
+     * 
+     * @param rootExpr the new expression object to wrap
+     */
     void setRootExpr(Expr rootExpr);
+    
+    /**
+     * Returns a String containing the XPath expression.
+     * 
+     * @return the text form of this XPath expression
+     */
     String getText();
-    void simplify();
-
+    
+    /**
+     * Simplifies the XPath expression. For example, the expression
+     * <code>//para[1 = 1]</code> could be simplified to 
+     * <code>//para</code>. In practice, this is usually a noop.
+     * Jaxen does not currently perform any simplification.
+     */
+    void   simplify();
+    
+    
+    /**
+     * Evaluates the expression and returns a list cintaing the resulting nodes,
+     * or a singleton list containing a <code>Double</code>, <code>String</code>, 
+     * or <code>Boolean</code>. 
+     * 
+     * @param context the context in which to evaluate this expression
+     * @return a list
+     * @throws JaxenException
+     */
     List asList(Context context) throws JaxenException;
 
 }
diff --git a/src/java/main/org/jaxen/expr/XPathFactory.java b/src/java/main/org/jaxen/expr/XPathFactory.java
index c7db5ee..d18946c 100644
--- a/src/java/main/org/jaxen/expr/XPathFactory.java
+++ b/src/java/main/org/jaxen/expr/XPathFactory.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/XPathFactory.java,v 1.11 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.11 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/expr/XPathFactory.java,v 1.13 2007/05/02 14:32:38 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2007/05/02 14:32:38 $
  *
  * ====================================================================
  *
@@ -43,79 +43,282 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: XPathFactory.java,v 1.11 2006/02/05 21:47:40 elharo Exp $
+ * $Id: XPathFactory.java,v 1.13 2007/05/02 14:32:38 elharo Exp $
  */
 package org.jaxen.expr;
 
 import org.jaxen.JaxenException;
+import org.jaxen.saxpath.Operator;
 
+/**
+ * An abstract factory used to create individual path component objects.
+ *
+ */
 public interface XPathFactory
 {
+    
+    /**
+     * Create a new <code>XPathExpr</code> from an <code>Expr</code>.
+     * 
+     * @param rootExpr the expression wrapped by the resuolting XPathExpr
+     * @return an XPathExpr wrapping the root expression
+     * @throws JaxenException
+     */
     XPathExpr createXPath( Expr rootExpr ) throws JaxenException;
 
+    /**
+     * Create a new path expression.
+     * 
+     * @param filterExpr the filter expression that starts the path expression
+     * @param locationPath the location path that follows the filter expression
+     * @return a path expression formed by concatenating the two arguments
+     * @throws JaxenException
+     */
     PathExpr createPathExpr( FilterExpr filterExpr,
                              LocationPath locationPath ) throws JaxenException;
 
+    /**
+     * Create a new empty relative location path.
+     * 
+     * @return an empty relative location path
+     * @throws JaxenException
+     */
     LocationPath createRelativeLocationPath() throws JaxenException;
 
+    /**
+     * Create a new empty absolute location path.
+     * 
+     * @return an empty absolute location path
+     * @throws JaxenException
+     */
     LocationPath createAbsoluteLocationPath() throws JaxenException;
 
+    /**
+     * Returns a new XPath Or expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @return <code><i>lhs</i> or <i>rhs</i></code>
+     * @throws JaxenException
+     */
     BinaryExpr createOrExpr( Expr lhs,
                              Expr rhs ) throws JaxenException;
 
+    /**
+     * Returns a new XPath And expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @return <code><i>lhs</i> and <i>rhs</i></code>
+     * @throws JaxenException
+     */
     BinaryExpr createAndExpr( Expr lhs,
                               Expr rhs ) throws JaxenException;
 
+    /**
+     * Returns a new XPath equality expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @param equalityOperator <code>Operator.EQUALS</code> or <code>Operator.NOT_EQUALS</code>
+     * @return <code><i>lhs</i> = <i>rhs</i></code> or <code><i>lhs</i> != <i>rhs</i></code>
+     * @throws JaxenException if the third argument is not 
+     *                        <code>Operator.EQUALS</code> or <code>Operator.NOT_EQUALS</code>
+     */
     BinaryExpr createEqualityExpr( Expr lhs,
                                    Expr rhs,
                                    int equalityOperator ) throws JaxenException;
 
+    /**
+     * Returns a new XPath relational expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @param relationalOperator <code>Operator.LESS_THAN</code>, <code>Operator.GREATER_THAN</code>, 
+     *                           <code>Operator.LESS_THAN_EQUALS</code>, or <code>Operator.GREATER_THAN_EQUALS</code>
+     * @return <code><i>lhs</i> <i>relationalOperator</i> <i>rhs</i></code> or <code><i>lhs</i> != <i>rhs</i></code>
+     * @throws JaxenException if the third argument is not a relational operator constant
+     */
     BinaryExpr createRelationalExpr( Expr lhs,
                                      Expr rhs,
                                      int relationalOperator ) throws JaxenException;
 
+    /**
+     * Returns a new XPath additive expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @param additiveOperator <code>Operator.ADD</code> or <code>Operator.SUBTRACT</code>
+     * @return <code><i>lhs</i> + <i>rhs</i></code> or <code><i>lhs</i> - <i>rhs</i></code>
+     * @throws JaxenException if the third argument is not 
+     *                        <code>Operator.ADD</code> or <code>Operator.SUBTRACT</code>
+     */
     BinaryExpr createAdditiveExpr( Expr lhs,
                                    Expr rhs,
                                    int additiveOperator ) throws JaxenException;
 
+    /**
+     * Returns a new XPath multiplicative expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @param multiplicativeOperator <code>Operator.MULTIPLY</code>, 
+     *        <code>Operator.DIV</code>, or <code>Operator.MOD</code>
+     * @return <code><i>lhs</i> * <i>rhs</i></code>, <code><i>lhs</i> div <i>rhs</i></code>,
+     *         or <code><i>lhs</i> mod <i>rhs</i></code>
+     * @throws JaxenException if the third argument is not a multiplicative operator constant
+     */
     BinaryExpr createMultiplicativeExpr( Expr lhs,
                                          Expr rhs,
                                          int multiplicativeOperator ) throws JaxenException;
 
+    /**
+     * Returns a new XPath unary expression.  
+     * 
+     * @param expr the expression to be negated
+     * @param unaryOperator <code>Operator.NEGATIVE</code>
+     * @return <code>- <i>expr</i></code> or <code><i>expr</i></code>
+     * @throws JaxenException
+     */
     Expr createUnaryExpr( Expr expr,
                           int unaryOperator ) throws JaxenException;
 
+    /**
+     * Returns a new XPath union expression.  
+     * 
+     * @param lhs the left hand side of the expression
+     * @param rhs the right hand side of the expression
+     * @return <code><i>lhs</i> | <i>rhs</i></code></code>
+     * @throws JaxenException
+     */
     UnionExpr createUnionExpr( Expr lhs,
                                Expr rhs ) throws JaxenException;
 
+    /**
+     * Returns a new XPath filter expression.  
+     * 
+     * @param expr the basic expression to which the predicate will be added
+     * @return the expression with an empty predicate set
+     * @throws JaxenException
+     */
     FilterExpr createFilterExpr( Expr expr ) throws JaxenException;
 
+    
+    /**
+     * Create a new function call expression.
+     * 
+     * @param prefix the namespace prefix of the function
+     * @param functionName the local name of the function 
+     * @return a function with an empty argument list
+     * @throws JaxenException
+     */
     FunctionCallExpr createFunctionCallExpr( String prefix,
                                              String functionName ) throws JaxenException;
 
+    /**
+     * Create a number expression.
+     * 
+     * @param number the value
+     * @return a number expression wrapping that value
+     * @throws JaxenException
+     */
     NumberExpr createNumberExpr( int number ) throws JaxenException;
 
+    /**
+     * Create a number expression.
+     * 
+     * @param number the value
+     * @return a number expression wrapping that value
+     * @throws JaxenException
+     */
     NumberExpr createNumberExpr( double number ) throws JaxenException;
 
+    /**
+     * Create a string literal expression.
+     * 
+     * @param literal the value
+     * @return a literal expression wrapping that value
+     * @throws JaxenException
+     */
     LiteralExpr createLiteralExpr( String literal ) throws JaxenException;
 
+    /**
+     * Create a new variable reference expression.
+     * 
+     * @param prefix the namespace prefix of the variable
+     * @param variableName the local name of the variable 
+     * @return a variable expression
+     * @throws JaxenException
+     */
     VariableReferenceExpr createVariableReferenceExpr( String prefix,
                                                        String variableName ) throws JaxenException;
 
+    /**
+     * Create a step with a named node-test.
+     * 
+     * @param axis the axis to create the name-test on
+     * @param prefix the namespace prefix for the test
+     * @param localName the local name for the test
+     * @return a name step
+     * @throws JaxenException if <code>axis</code> is not one of the axis constants????
+     */
     Step createNameStep( int axis,
                          String prefix,
                          String localName ) throws JaxenException;
 
+    /**
+     * Create a step with a node() node-test.
+     * 
+     * @param axis the axis to create the node-test on
+     * @return an all node step
+     * @throws JaxenException if <code>axis</code> is not one of the axis constants????
+     */
     Step createAllNodeStep( int axis ) throws JaxenException;
 
+    /**
+     * Create a step with a <code>comment()</code> node-test.
+     * 
+     * @param axis the axis to create the <code>comment()</code> node-test on
+     * @return a comment node step
+     * @throws JaxenException if <code>axis</code> is not one of the axis constants????
+     */
     Step createCommentNodeStep( int axis ) throws JaxenException;
 
+    /**
+     * Create a step with a <code>text()</code> node-test.
+     * 
+     * @param axis the axis to create the <code>text()</code> node-test on
+     * @return a text node step
+     * @throws JaxenException if <code>axis</code> is not one of the axis constants????
+     */
     Step createTextNodeStep( int axis ) throws JaxenException;
 
+    /**
+     * Create a step with a <code>processing-instruction()</code> node-test.
+     * 
+     * @param axis the axis to create the <code>processing-instruction()</code> node-test on
+     * @param name the target to match, may be empty
+     * @return a processing instruction node step
+     * @throws JaxenException if <code>axis</code> is not one of the axis constants????
+     */
     Step createProcessingInstructionNodeStep( int axis,
                                               String name ) throws JaxenException;
 
+    /**
+     * Create from the supplied expression.
+     * 
+     * @param predicateExpr the expression to evaluate in the predicate
+     * @return a predicate
+     * @throws JaxenException
+     */
     Predicate createPredicate( Expr predicateExpr ) throws JaxenException;
 
+    /**
+     * Create an empty predicate set. 
+     * 
+     * @return an empty predicate set
+     * @throws JaxenException
+     */
     PredicateSet createPredicateSet() throws JaxenException;
+    
 }
diff --git a/src/java/main/org/jaxen/function/ext/MatrixConcatFunction.java b/src/java/main/org/jaxen/function/ext/MatrixConcatFunction.java
deleted file mode 100644
index 1cc62ba..0000000
--- a/src/java/main/org/jaxen/function/ext/MatrixConcatFunction.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/function/ext/MatrixConcatFunction.java,v 1.6 2006/02/05 21:47:42 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:42 $
- *
- * ====================================================================
- *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- *   * Neither the name of the Jaxen Project nor the names of its
- *     contributors may be used to endorse or promote products derived 
- *     from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- * This software consists of voluntary contributions made by many 
- * individuals on behalf of the Jaxen Project and was originally 
- * created by bob mcwhirter <bob at werken.com> and 
- * James Strachan <jstrachan at apache.org>.  For more information on the 
- * Jaxen Project, please see <http://www.jaxen.org/>.
- * 
- * $Id: MatrixConcatFunction.java,v 1.6 2006/02/05 21:47:42 elharo Exp $
- */
-
-package org.jaxen.function.ext;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jaxen.Context;
-import org.jaxen.Function;
-import org.jaxen.Navigator;
-import org.jaxen.function.StringFunction;
-
-/** <p><b>Extension Function</b> <code><i>boolean</i> matrix-concat(<i>nodeSet</i>,<i>nodeSet</i>,<i>nodeSet*</i>)</code> 
-  * 
-  * @author James Pereira (JPereira at CT.BBD.CO.ZA)
-  */
-
-public class MatrixConcatFunction implements Function {
-    
-    public Object call(Context context, List args) {
-        if ( args.size() >= 2 ) {
-            return evaluate(args, context.getNavigator());
-        }
-        return null;
-    }
-    
-    public static Object evaluate(List list, Navigator nav) {        
-        ArrayList matrix = new ArrayList();       
-        
-        Iterator argIter = list.iterator();
-
-        while (argIter.hasNext()) {
-            ArrayList v = new ArrayList();
-            Object obj = argIter.next();
-            if (obj instanceof List) {
-                List args = (List) obj;
-                for ( int i = 0, size = args.size(); i < size; i++ ) {
-                    v.add( StringFunction.evaluate( args.get(i), nav ) );
-                }
-            }
-            else {
-                v.add( StringFunction.evaluate( obj, nav ) );
-            }
-            matrix.add(v);
-        }
-        
-        ArrayList result = new ArrayList();
-        Enumeration elemList = new MatrixEnum( matrix );
-        while (elemList.hasMoreElements()) {
-            Object obj = elemList.nextElement();
-            if (obj instanceof List) {
-                StringBuffer text = new StringBuffer(127);
-                List args = (List) obj;
-                for (Iterator it = args.iterator(); it.hasNext(); ) {
-                    text.append(it.next());
-                }
-                result.add( text.toString() );
-            }
-            else {
-                result.add( obj );
-            }
-        }
-        return result;
-    }
-    
-    public static class MatrixEnum implements Enumeration {
-        private ArrayList m_source;
-        private int m_maxSize = 0;
-        private int m_currIdx = -1;
-        
-        public MatrixEnum (ArrayList _source) {
-            m_source = _source;
-            
-            for ( Iterator iter = m_source.iterator(); iter.hasNext(); ) {
-                ArrayList element = (ArrayList) iter.next();
-                int size = element.size();
-                if (size > m_maxSize) {
-                    m_maxSize = size;
-                }
-            }
-        }
-        
-        public MatrixEnum (ArrayList _source, int _maxSize) {
-            m_source = _source;
-            m_maxSize = _maxSize;
-        }
-        
-        public boolean hasMoreElements() {
-            if ((m_maxSize != 0) && (++m_currIdx < m_maxSize)) {
-                return true;
-            }
-            else {
-                return false;
-            }
-        }
-        
-        public Object nextElement() {
-            ArrayList result = new ArrayList();
-            for ( Iterator iter = m_source.iterator(); iter.hasNext(); ) {
-                ArrayList element = (ArrayList) iter.next();
-                int size = element.size();
-                if ( m_currIdx < size ) {
-                    result.add( element.get( m_currIdx ) );
-                }
-                else {
-                    if ( size > 0 ) {
-                        result.add( element.get( size - 1 ) );
-                    }
-                    else {
-                        // XXXX: what to do now?
-                        result.add( "" );
-                    }
-                }
-            }
-            return result;
-        }
-    }
-}
diff --git a/src/java/main/org/jaxen/pantry/Test.java b/src/java/main/org/jaxen/pantry/Test.java
deleted file mode 100644
index 9bcd4c8..0000000
--- a/src/java/main/org/jaxen/pantry/Test.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.jaxen.pantry;
-
-import java.io.StringReader;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.jaxen.Context;
-import org.jaxen.ContextSupport;
-import org.jaxen.dom.DocumentNavigator;
-import org.jaxen.pattern.Pattern;
-import org.jaxen.pattern.PatternParser;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-
-public class Test {
-
-static Node elem;
-static Context context;
-static {
-try {
-InputSource is = new InputSource( new StringReader( "<root> <a/><!-- --><b/><?pi ip?><b foo='bar'/></root>" ) );
-Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( is );
-elem = doc.getDocumentElement().getLastChild();
-System.out.println( "Current node is the last <"+ elem.getNodeName() +">" );
-context = new Context( new ContextSupport( null, null, null, new DocumentNavigator() ) );
-} catch (Exception e) { System.out.println("boo boo");}
-}
-
-    public static void main( String[] args ) throws Exception {
-    
-        // the troubles come here
-        test("/root/b[1]");
-        test("/root/b[2]");
-        test("/root/*[1]");
-        test("/root/*[2]");
-        test("/root/*[3]");
-        test("/root/node()[1]");
-        test("/root/node()[5]");
-        test("/root/node()[6]");
-    }
-    
-    private static void test( String pattern ) throws Exception {
-        Pattern p = PatternParser.parse( pattern );
-        boolean b = p.matches( elem, context );
-        System.out.println( b + " " + pattern );
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/main/org/jaxen/util/AncestorAxisIterator.java b/src/java/main/org/jaxen/util/AncestorAxisIterator.java
index 67bb99c..ba3e991 100644
--- a/src/java/main/org/jaxen/util/AncestorAxisIterator.java
+++ b/src/java/main/org/jaxen/util/AncestorAxisIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/AncestorAxisIterator.java,v 1.13 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/AncestorAxisIterator.java,v 1.14 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: AncestorAxisIterator.java,v 1.13 2006/02/05 21:47:40 elharo Exp $
+ * $Id: AncestorAxisIterator.java,v 1.14 2006/11/09 18:20:12 elharo Exp $
  */
 
 
@@ -52,8 +52,24 @@ package org.jaxen.util;
 
 import org.jaxen.Navigator;
 
+/**
+ * Represents the XPath <code>ancestor</code> axis. 
+ * The "<code>ancestor</code> axis contains the ancestors of the context node; 
+ * the ancestors of the context node consist of the parent of context node and 
+ * the parent's parent and so on; thus, the ancestor axis will always include 
+ * the root node, unless the context node is the root node."
+ * 
+ * @version 1.2b12
+ */
 public class AncestorAxisIterator extends AncestorOrSelfAxisIterator
 {
+
+    /**
+     * Create a new ancestor axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public AncestorAxisIterator(Object contextNode,
                                 Navigator navigator)
     {
@@ -61,4 +77,5 @@ public class AncestorAxisIterator extends AncestorOrSelfAxisIterator
                navigator );
         next();
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java b/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java
index 8168a94..8b58911 100644
--- a/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java
+++ b/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java
@@ -1,9 +1,9 @@
 package org.jaxen.util;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java,v 1.13 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.13 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java,v 1.14 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.14 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -45,7 +45,7 @@ package org.jaxen.util;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: AncestorOrSelfAxisIterator.java,v 1.13 2006/02/05 21:47:40 elharo Exp $
+ * $Id: AncestorOrSelfAxisIterator.java,v 1.14 2006/11/09 18:20:12 elharo Exp $
 */
 
 import java.util.Iterator;
@@ -55,11 +55,28 @@ import org.jaxen.Navigator;
 import org.jaxen.UnsupportedAxisException;
 import org.jaxen.JaxenRuntimeException;
 
+/**
+ * <p>
+ * Represents the XPath <code>ancestor-or-self</code> axis. 
+ * The "<code>ancestor-or-self</code> axis contains the context node and 
+ * the ancestors of the context node; thus, the ancestor axis will 
+ * always include the root node."
+ * </p>
+ * 
+ * @version 1.2b12
+ */
 public class AncestorOrSelfAxisIterator implements Iterator
 {
+    
     private Object    contextNode;
     private Navigator navigator;
 
+    /**
+     * Create a new <code>ancestor-or-self</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public AncestorOrSelfAxisIterator(Object contextNode,
                                       Navigator navigator)
     {
@@ -68,11 +85,28 @@ public class AncestorOrSelfAxisIterator implements Iterator
         this.navigator = navigator;
     }
 
+    /**
+     * Returns true if there are any nodes remaining 
+     * on the ancestor-or-self axis; false otherwise.
+     * 
+     * @return true if any ancestors or self remain
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         return contextNode != null;
     }
 
+    /**
+     * Returns the next ancestor-or-self node.
+     * 
+     * @return the next ancestor-or-self node
+     * 
+     * @throws NoSuchElementException if no ancestors remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next()
     {
         try
@@ -90,8 +124,14 @@ public class AncestorOrSelfAxisIterator implements Iterator
         }
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove()
     {
         throw new UnsupportedOperationException();
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/DescendantAxisIterator.java b/src/java/main/org/jaxen/util/DescendantAxisIterator.java
index 1714775..8eaf741 100644
--- a/src/java/main/org/jaxen/util/DescendantAxisIterator.java
+++ b/src/java/main/org/jaxen/util/DescendantAxisIterator.java
@@ -1,9 +1,9 @@
 package org.jaxen.util;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/DescendantAxisIterator.java,v 1.12 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.12 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/DescendantAxisIterator.java,v 1.13 2006/11/09 18:20:11 elharo Exp $
+ * $Revision: 1.13 $
+ * $Date: 2006/11/09 18:20:11 $
  *
  * ====================================================================
  *
@@ -45,7 +45,7 @@ package org.jaxen.util;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DescendantAxisIterator.java,v 1.12 2006/02/05 21:47:40 elharo Exp $
+ * $Id: DescendantAxisIterator.java,v 1.13 2006/11/09 18:20:11 elharo Exp $
 */
 
 import org.jaxen.Navigator;
@@ -56,6 +56,14 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.ArrayList;
 
+/**
+ * Represents the XPath <code>descendant</code> axis. 
+ * The "<code>descendant</code> axis contains the descendants of the context node; 
+ * a descendant is a child or a child of a child and so on; thus 
+ * the descendant axis never contains attribute or namespace nodes."
+ * 
+ * @version 1.2b12
+ */
 public class DescendantAxisIterator implements Iterator
 {
 
@@ -63,6 +71,12 @@ public class DescendantAxisIterator implements Iterator
     private Iterator children;
     private Navigator navigator;
 
+    /**
+     * Create a new <code>descendant</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public DescendantAxisIterator(Object contextNode,
                                   Navigator navigator) throws UnsupportedAxisException
     {
@@ -76,7 +90,13 @@ public class DescendantAxisIterator implements Iterator
         this.children = iterator;
     }
 
-    public boolean hasNext()
+    /**
+     * Returns true if there are any descendants remaining; false otherwise.
+     * 
+     * @return true if any descendants remain; false otherwise
+     * 
+     * @see java.util.Iterator#hasNext()
+     */    public boolean hasNext()
     {
         while (!children.hasNext())
         {
@@ -89,6 +109,15 @@ public class DescendantAxisIterator implements Iterator
         return true;
     }
 
+    /**
+     * Returns the next descendant node.
+     * 
+     * @return the next descendant node
+     * 
+     * @throws NoSuchElementException if no descendants remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next()
     {
         try
@@ -108,6 +137,11 @@ public class DescendantAxisIterator implements Iterator
         }
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove()
     {
         throw new UnsupportedOperationException();
diff --git a/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java b/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java
index 62ae17a..1af5e5c 100644
--- a/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java
+++ b/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java
@@ -1,9 +1,9 @@
 package org.jaxen.util;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.10 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/DescendantOrSelfAxisIterator.java,v 1.11 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.11 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -45,16 +45,31 @@ package org.jaxen.util;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: DescendantOrSelfAxisIterator.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
+ * $Id: DescendantOrSelfAxisIterator.java,v 1.11 2006/11/09 18:20:12 elharo Exp $
 */
 
 import org.jaxen.Navigator;
 
+/**
+ * Represents the XPath <code>descendant-or-self</code> axis. 
+ * The "<code>descendant-or-self</code> axis contains the context node
+ * and the descendants of the context node."
+ * 
+ * @version 1.2b12
+ */
 public class DescendantOrSelfAxisIterator extends DescendantAxisIterator
 {
+
+    /**
+     * Create a new <code>desscendant-or-self</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public DescendantOrSelfAxisIterator(Object contextNode,
                                         Navigator navigator)
     {
         super(navigator, new SingleObjectIterator(contextNode));
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/FollowingAxisIterator.java b/src/java/main/org/jaxen/util/FollowingAxisIterator.java
index 71a6f1e..f080744 100644
--- a/src/java/main/org/jaxen/util/FollowingAxisIterator.java
+++ b/src/java/main/org/jaxen/util/FollowingAxisIterator.java
@@ -1,9 +1,9 @@
 package org.jaxen.util;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/FollowingAxisIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/FollowingAxisIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -45,7 +45,7 @@ package org.jaxen.util;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: FollowingAxisIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: FollowingAxisIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
 */
 
 import java.util.Iterator;
@@ -56,6 +56,14 @@ import org.jaxen.UnsupportedAxisException;
 import org.jaxen.JaxenRuntimeException;
 import org.jaxen.JaxenConstants;
 
+/**
+ * Represents the XPath <code>following</code> axis. 
+ * The "<code>following</code> axis contains all nodes in the same document as the context 
+ * node that are after the context node in document order, excluding any descendants 
+ * and excluding attribute nodes and namespace nodes."
+ * 
+ * @version 1.2b12
+ */
 public class FollowingAxisIterator implements Iterator
 {
     private Object contextNode;
@@ -66,6 +74,12 @@ public class FollowingAxisIterator implements Iterator
 
     private Iterator currentSibling;
 
+    /**
+     * Create a new <code>following</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public FollowingAxisIterator(Object contextNode,
                                  Navigator navigator) throws UnsupportedAxisException
     {
@@ -123,6 +137,14 @@ public class FollowingAxisIterator implements Iterator
         }
     }
 
+    /**
+     * Returns true if there are any following nodes remaining; 
+     * false otherwise.
+     * 
+     * @return true if any following nodes remain
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         while ( ! currentSibling.hasNext() )
@@ -136,6 +158,15 @@ public class FollowingAxisIterator implements Iterator
         return true;
     }
 
+    /**
+     * Returns the next following node.
+     * 
+     * @return the next following node
+     * 
+     * @throws NoSuchElementException if no following nodes remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next() throws NoSuchElementException
     {
         if ( ! hasNext() )
@@ -146,6 +177,11 @@ public class FollowingAxisIterator implements Iterator
         return currentSibling.next();
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove() throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException();
diff --git a/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java b/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java
index 98f19af..cbcd3e7 100644
--- a/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java
+++ b/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.10 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/FollowingSiblingAxisIterator.java,v 1.11 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.11 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: FollowingSiblingAxisIterator.java,v 1.10 2006/02/05 21:47:40 elharo Exp $
+ * $Id: FollowingSiblingAxisIterator.java,v 1.11 2006/11/09 18:20:12 elharo Exp $
  */
 
 
@@ -56,12 +56,29 @@ import org.jaxen.JaxenConstants;
 import org.jaxen.Navigator;
 import org.jaxen.UnsupportedAxisException;
 
+/**
+ * 
+ * Represents the XPath <code>following-sibling</code> axis. 
+ * The "<code>following-sibling</code> axis contains all the
+ * folowing siblings of the context node; if the context node is an
+ * attribute node or namespace node, the <code>following-sibling</code>
+ * axis is empty."
+ * 
+ * @version 1.2b12
+ *
+ */
 public class FollowingSiblingAxisIterator implements Iterator
 {
     private Object    contextNode;
     private Navigator navigator;
     private Iterator  siblingIter;
 
+    /**
+     * Create a new <code>following-sibling</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public FollowingSiblingAxisIterator(Object contextNode,
                                         Navigator navigator) throws UnsupportedAxisException
     {
@@ -89,17 +106,38 @@ public class FollowingSiblingAxisIterator implements Iterator
         }
 
     }
-
+    
+    /**
+     * Returns true if there are any following siblings remain; false otherwise.
+     * 
+     * @return true if any following siblings remain; false otherwise
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         return siblingIter.hasNext();
     }
 
+    /**
+     * Returns the next following sibling.
+     * 
+     * @return the next following sibling
+     * 
+     * @throws NoSuchElementException if no following siblings remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next() throws NoSuchElementException
     {
         return siblingIter.next();
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove() throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException();
diff --git a/src/java/main/org/jaxen/util/LinkedIterator.java b/src/java/main/org/jaxen/util/LinkedIterator.java
index 29b9c8f..71317a9 100644
--- a/src/java/main/org/jaxen/util/LinkedIterator.java
+++ b/src/java/main/org/jaxen/util/LinkedIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/LinkedIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/LinkedIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: LinkedIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: LinkedIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
  */
 
 
@@ -54,7 +54,7 @@ import java.util.List;
 import java.util.NoSuchElementException;
 
 /**
- * @deprecated elharo this class is undocumented and untested.
+ * @deprecated This class is undocumented and untested.
  *     It will be removed in a future release.
  */
 public class LinkedIterator implements Iterator
@@ -107,6 +107,11 @@ public class LinkedIterator implements Iterator
         return ((Iterator)this.iterators.get( this.cur )).next();
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException
+     */
     public void remove()
     {
         throw new UnsupportedOperationException();
diff --git a/src/java/main/org/jaxen/util/PrecedingAxisIterator.java b/src/java/main/org/jaxen/util/PrecedingAxisIterator.java
index 519d77b..8341bda 100644
--- a/src/java/main/org/jaxen/util/PrecedingAxisIterator.java
+++ b/src/java/main/org/jaxen/util/PrecedingAxisIterator.java
@@ -1,9 +1,9 @@
 package org.jaxen.util;
 
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/PrecedingAxisIterator.java,v 1.9 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.9 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/PrecedingAxisIterator.java,v 1.11 2006/11/13 22:10:09 elharo Exp $
+ * $Revision: 1.11 $
+ * $Date: 2006/11/13 22:10:09 $
  *
  * ====================================================================
  *
@@ -45,7 +45,7 @@ package org.jaxen.util;
  * James Strachan <jstrachan at apache.org>.  For more information on the
  * Jaxen Project, please see <http://www.jaxen.org/>.
  *
- * $Id: PrecedingAxisIterator.java,v 1.9 2006/02/05 21:47:40 elharo Exp $
+ * $Id: PrecedingAxisIterator.java,v 1.11 2006/11/13 22:10:09 elharo Exp $
 */
 
 import org.jaxen.JaxenConstants;
@@ -59,21 +59,34 @@ import java.util.ListIterator;
 import java.util.NoSuchElementException;
 
 /**
- * This implementation of 'preceding' works like so:
- * the preceding axis includes preceding-siblings of this node and their
- * descendants. Also, for each ancestor node of this node, it includes
- * all preceding-siblings of that ancestor, and their descendants. Finally, it
+ * <p>
+ * Represents the XPath <code>preceding</code> axis. 
+ * The "<code>preceding</code> axis contains all nodes in the same document as the context 
+ * node that are before the context node in document order, excluding any ancestors 
+ * and excluding attribute nodes and namespace nodes."
+ * 
+ * <p>
+ * This implementation of '<code>preceding</code>' works like so:
+ * the <code>preceding</code> axis includes preceding siblings of this node and 
+ * their descendants. Also, for each ancestor node of this node, it includes
+ * all preceding siblings of that ancestor, and their descendants. Finally, it
  * includes the ancestor nodes themselves.
- * <p/>
- * The reversed descendant-or-self axes that are required are calculated using a
+ * </p>
+ * 
+ * <p>
+ * The reversed <code>descendant-or-self</code> axes that are required are calculated using a
  * stack of reversed 'child-or-self' axes. When asked for a node, it is always taken
  * from a child-or-self axis. If it was the last node on that axis, the node is returned.
  * Otherwise, this axis is pushed on the stack, and the process is repeated with the child-or-self
  * of the node. Eventually this recurses down to the last descendant of any node, then works
  * back up to the root.
- * <p/>
- * I reckon most object models could provide a faster implementation of the reversed
- * 'children-or-self' used here.
+ * </p>
+ * 
+ * <p>
+ * Most object models could provide a faster implementation of the reversed
+ * 'children-or-self' used here.</p>
+ * 
+ * @version 1.2b12
  */
 public class PrecedingAxisIterator implements Iterator
 {
@@ -84,6 +97,12 @@ public class PrecedingAxisIterator implements Iterator
 
     private Navigator navigator;
 
+    /**
+     * Create a new <code>preceding</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public PrecedingAxisIterator(Object contextNode,
                                  Navigator navigator) throws UnsupportedAxisException
     {
@@ -95,6 +114,13 @@ public class PrecedingAxisIterator implements Iterator
     }
 
 
+    /**
+     * Returns true if there are any preceding nodes remaining; false otherwise.
+     * 
+     * @return true if any preceding nodes remain; false otherwise
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         try
@@ -150,6 +176,15 @@ public class PrecedingAxisIterator implements Iterator
         }
     }
 
+    /**
+     * Returns the next preceding node.
+     * 
+     * @return the next preceding node
+     * 
+     * @throws NoSuchElementException if no preceding nodes remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next() throws NoSuchElementException
     {
         if (!hasNext())
@@ -171,8 +206,14 @@ public class PrecedingAxisIterator implements Iterator
     }
 
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove() throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException();
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java b/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java
index 77bd83d..3752ba4 100644
--- a/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java
+++ b/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java,v 1.14 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.14 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/PrecedingSiblingAxisIterator.java,v 1.16 2006/11/13 22:10:09 elharo Exp $
+ * $Revision: 1.16 $
+ * $Date: 2006/11/13 22:10:09 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: PrecedingSiblingAxisIterator.java,v 1.14 2006/02/05 21:47:40 elharo Exp $
+ * $Id: PrecedingSiblingAxisIterator.java,v 1.16 2006/11/13 22:10:09 elharo Exp $
  */
 
 
@@ -57,6 +57,17 @@ import org.jaxen.JaxenConstants;
 import org.jaxen.Navigator;
 import org.jaxen.UnsupportedAxisException;
 
+/**
+ * 
+ * Represents the XPath <code>preceding-sibling</code> axis. 
+ * The "<code>preceding-sibling</code> axis contains all the
+ * preceding siblings of the context node; if the context node is an
+ * attribute node or namespace node, the <code>preceding-sibling</code>
+ * axis is empty."
+ * 
+ * @version 1.2b12
+ *
+ */
 public class PrecedingSiblingAxisIterator implements Iterator
 {
     private Object    contextNode;
@@ -65,6 +76,12 @@ public class PrecedingSiblingAxisIterator implements Iterator
     private Iterator  siblingIter;
     private Object    nextObj;
 
+    /**
+     * Create a new <code>preceding-sibling</code> axis iterator.
+     * 
+     * @param contextNode the node to start from
+     * @param navigator the object model specific navigator
+     */
     public PrecedingSiblingAxisIterator(Object contextNode,
                                         Navigator navigator) throws UnsupportedAxisException
     {
@@ -107,11 +124,27 @@ public class PrecedingSiblingAxisIterator implements Iterator
         
     }
 
+    /**
+     * Returns true if there are any preceding siblings remaining; false otherwise.
+     * 
+     * @return true if any preceding siblings remain; false otherwise
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         return ( this.nextObj != null );
     }
 
+    /**
+     * Returns the next preceding sibling.
+     * 
+     * @return the next preceding sibling
+     * 
+     * @throws NoSuchElementException if no preceding siblings remain
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next() throws NoSuchElementException
     {
         if ( ! hasNext() )
@@ -130,6 +163,11 @@ public class PrecedingSiblingAxisIterator implements Iterator
         return obj;
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException
+     */
     public void remove() throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException();
diff --git a/src/java/main/org/jaxen/util/SelfAxisIterator.java b/src/java/main/org/jaxen/util/SelfAxisIterator.java
index 0f64df7..f41ee25 100644
--- a/src/java/main/org/jaxen/util/SelfAxisIterator.java
+++ b/src/java/main/org/jaxen/util/SelfAxisIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SelfAxisIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.7 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SelfAxisIterator.java,v 1.10 2007/05/02 14:33:29 elharo Exp $
+ * $Revision: 1.10 $
+ * $Date: 2007/05/02 14:33:29 $
  *
  * ====================================================================
  *
@@ -42,16 +42,29 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: SelfAxisIterator.java,v 1.7 2006/02/05 21:47:40 elharo Exp $
+ * $Id: SelfAxisIterator.java,v 1.10 2007/05/02 14:33:29 elharo Exp $
  */
 
 
 
 package org.jaxen.util;
 
+/**
+ * 
+ * Represents the XPath <code>self</code> axis. The "<code>self</code> axis contains 
+ * just the context node itself."
+ * 
+ * @version 1.1.1
+ *
+ */
 public class SelfAxisIterator extends SingleObjectIterator
 {
 
+    /**
+     * Create a new <code>self</code> axis iterator.
+     * 
+     * @param node the node to start from
+     */
     public SelfAxisIterator(Object node)
     {
         super(node);
diff --git a/src/java/main/org/jaxen/util/SingleObjectIterator.java b/src/java/main/org/jaxen/util/SingleObjectIterator.java
index c6bc876..ad6a52c 100644
--- a/src/java/main/org/jaxen/util/SingleObjectIterator.java
+++ b/src/java/main/org/jaxen/util/SingleObjectIterator.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SingleObjectIterator.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.6 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SingleObjectIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
+ * $Revision: 1.8 $
+ * $Date: 2006/11/09 18:20:12 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: SingleObjectIterator.java,v 1.6 2006/02/05 21:47:40 elharo Exp $
+ * $Id: SingleObjectIterator.java,v 1.8 2006/11/09 18:20:12 elharo Exp $
  */
 
 
@@ -58,20 +58,44 @@ import java.util.NoSuchElementException;
  */
 public class SingleObjectIterator implements Iterator
 {
+    
     private Object  object;
     private boolean seen;
 
+    /**
+     * Creates a new single object iterator.
+     * 
+     * @param object the object to iterate over
+     */
     public SingleObjectIterator(Object object)
     {
         this.object = object;
         this.seen   = false;
     }
 
+
+    /**
+     * Returns true if this iterator's element has not yet been seen; false if it has.
+     * 
+     * @return true if this iterator has another element; false if it doesn't
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
     public boolean hasNext()
     {
         return ! this.seen;
     }
 
+    /**
+     * Returns the single element in this iterator if it has not yet
+     * been seen. 
+     * 
+     * @return the next element in this iterator
+     * 
+     * @throws NoSuchElementException if the element has already been seen
+     * 
+     * @see java.util.Iterator#next()
+     */
     public Object next()
     {
         if ( hasNext() )
@@ -83,8 +107,14 @@ public class SingleObjectIterator implements Iterator
         throw new NoSuchElementException();
     }
 
+    /**
+     * This operation is not supported.
+     * 
+     * @throws UnsupportedOperationException always
+     */
     public void remove()
     {
         throw new UnsupportedOperationException();
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/SingletonList.java b/src/java/main/org/jaxen/util/SingletonList.java
index b15c63c..a48bd06 100644
--- a/src/java/main/org/jaxen/util/SingletonList.java
+++ b/src/java/main/org/jaxen/util/SingletonList.java
@@ -1,7 +1,7 @@
 /*
- * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SingletonList.java,v 1.3 2006/02/05 21:47:40 elharo Exp $
- * $Revision: 1.3 $
- * $Date: 2006/02/05 21:47:40 $
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/util/SingletonList.java,v 1.4 2006/11/09 16:39:19 elharo Exp $
+ * $Revision: 1.4 $
+ * $Date: 2006/11/09 16:39:19 $
  *
  * ====================================================================
  *
@@ -42,7 +42,7 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id: SingletonList.java,v 1.3 2006/02/05 21:47:40 elharo Exp $
+ * $Id: SingletonList.java,v 1.4 2006/11/09 16:39:19 elharo Exp $
  */
 
 
@@ -53,25 +53,49 @@ import java.util.AbstractList;
 
 /**
  * A utility class that implements singleton lists
- * (to avoid dependency on JDK 1.3).
- * @version $Id: SingletonList.java,v 1.3 2006/02/05 21:47:40 elharo Exp $
+ * (to avoid dependency on JDK 1.3). Many operations 
+ * including <code>add()</code> and <code>remove()</code> throw
+ * UnsupportedOperationExceptions. 
+ * 
+ * @version 1.2b12
  * @author Attila Szegedi
+ * 
  */
 public class SingletonList extends AbstractList {
+    
     private final Object element;
     
+    /**
+     * Creates a new singleton list. 
+     * 
+     * @param element the single member of the list
+     */
     public SingletonList(Object element) {
         this.element = element;
     }
     
+    /** 
+     * Returns 1.
+     * 
+     * @return 1
+     */
     public int size() {
         return 1;
     }
 
+    /**
+     * Returns the single element in the list.
+     * 
+     * @return the only element in the list
+     * 
+     * @throws IndexOutOfBoundsException if index is not 0
+     * 
+     */
     public Object get(int index) {
         if(index == 0) {
             return element;
         }
         throw new IndexOutOfBoundsException(index + " != 0");
     }
+    
 }
diff --git a/src/java/main/org/jaxen/util/XPath2XMLVisitor.java b/src/java/main/org/jaxen/util/XPath2XMLVisitor.java
deleted file mode 100644
index 1c04439..0000000
--- a/src/java/main/org/jaxen/util/XPath2XMLVisitor.java
+++ /dev/null
@@ -1,237 +0,0 @@
-package org.jaxen.util;
-
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jaxen.expr.AdditiveExpr;
-import org.jaxen.expr.AllNodeStep;
-import org.jaxen.expr.CommentNodeStep;
-import org.jaxen.expr.EqualityExpr;
-import org.jaxen.expr.Expr;
-import org.jaxen.expr.FilterExpr;
-import org.jaxen.expr.FunctionCallExpr;
-import org.jaxen.expr.LiteralExpr;
-import org.jaxen.expr.LocationPath;
-import org.jaxen.expr.LogicalExpr;
-import org.jaxen.expr.MultiplicativeExpr;
-import org.jaxen.expr.NameStep;
-import org.jaxen.expr.NumberExpr;
-import org.jaxen.expr.PathExpr;
-import org.jaxen.expr.Predicate;
-import org.jaxen.expr.ProcessingInstructionNodeStep;
-import org.jaxen.expr.RelationalExpr;
-import org.jaxen.expr.Step;
-import org.jaxen.expr.TextNodeStep;
-import org.jaxen.expr.UnaryExpr;
-import org.jaxen.expr.UnionExpr;
-import org.jaxen.expr.VariableReferenceExpr;
-import org.jaxen.expr.Visitor;
-
-public class XPath2XMLVisitor implements Visitor {
-    
-    protected PrintWriter printer;
-    protected int tabIndex;
-
-    public XPath2XMLVisitor() {
-        this.printer = new PrintWriter(System.out);
-    }
-
-    public XPath2XMLVisitor(PrintWriter printer) {
-        this.printer = printer;
-    }
-
-    public void visit(PathExpr expr) {
-        printLn("<PathExpr>");
-        if (expr.getFilterExpr() != null){
-            expr.getFilterExpr().accept(this);
-        }
-        if (expr.getLocationPath() != null){
-            expr.getLocationPath().accept(this);
-        }
-        printLn("</PathExpr>");
-    }
-    
-    public void visit(LocationPath expr) {
-        printLn("<LocationPath absolute=\"" + expr.isAbsolute() + "\">");
-        Iterator steps = expr.getSteps().iterator();
-
-        while (steps.hasNext()){
-            Step step = (Step)steps.next();
-            step.accept(this);
-        }
-        printLn("</LocationPath>");
-    }
-    
-    public void visit(LogicalExpr expr) {
-        printLn("<LogicalExpr operator=\""+ expr.getOperator() + "\">");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</LogicalExpr>");
-    }
-
-    void printLhsRhs(Expr lhs, Expr rhs){
-        tabIndex++;
-        printLn("<lhsExpr>");
-        lhs.accept(this);
-        printLn("</lhsExpr>");
-        printLn("<rhsExpr>");
-        rhs.accept(this);
-        printLn("</rhsExpr>");
-        tabIndex--;
-    }
-    
-    public void visit(EqualityExpr expr) {
-        printLn("<EqualityExpr operator=\""+ expr.getOperator() + "\">");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</EqualityExpr>");
-    }
-    
-    public void visit(FilterExpr expr) {
-        printLn("<FilterExpr>");
-        tabIndex++;
-        if (expr.getExpr() != null){
-            expr.getExpr().accept(this);
-        }
-        Iterator iter = expr.getPredicates().iterator();
-        while (iter.hasNext()){
-            ((Predicate)iter.next()).getExpr().accept(this);
-        }
-        tabIndex--;
-        printLn("</FilterExpr>");
-    }
-    
-    public void visit(RelationalExpr expr) {
-        printLn("<RelationalExpr operator=\""+ expr.getOperator() + "\">");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</RelationalExpr>");
-    }
-    
-    public void visit(AdditiveExpr expr) {
-        printLn("<AdditiveExpr operator=\""+ expr.getOperator() + "\">");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</AdditiveExpr>");
-    }
-    
-    public void visit(MultiplicativeExpr expr) {
-        printLn("<MultiplicativeExpr operator=\""+ expr.getOperator() + "\">");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</MultiplicativeExpr>");
-    }
-    
-    public void visit(UnaryExpr expr) {
-        printLn("<UnaryExpr>");
-        expr.getExpr().accept(this);
-        printLn("</UnaryExpr>");
-    }
-    
-    public void visit(UnionExpr expr) {
-        printLn("<UnionExpr>");
-        printLhsRhs(expr.getLHS(), expr.getRHS());
-        printLn("</UnionExpr>");
-    }
-    
-    public void visit(NumberExpr expr) {
-        printLn("<NumberExpr>");
-        printLn(expr.getNumber().toString());
-        printLn("</NumberExpr>");
-    }
-    
-    public void visit(LiteralExpr expr) {
-        printLn("<LiteralExpr literal=\"" + expr.getLiteral() + "\"/>");
-    }
-
-    public void visit(VariableReferenceExpr expr) {
-        printLn("<VariableReferenceExpr name=\"" + expr.getVariableName() + "\"/>");
-    }
-    
-    public void visit(FunctionCallExpr expr){
-        printLn("<FunctionCallExpr prefix=\"" + expr.getPrefix() +
-        "\" functionName=\"" + expr.getFunctionName() + "\">");
-
-        Iterator iterator = expr.getParameters().iterator();
-        tabIndex++;
-        printLn("<Args>");
-        while (iterator.hasNext()){
-            ((Expr)iterator.next()).accept(this);
-        }
-        printLn("</Args>");
-        tabIndex--;
-        printLn("</FunctionCallExpr>");
-    }
-
-    public void visit(NameStep step){
-        printLn("<NameStep prefix=\"" + step.getPrefix()+
-            "\" localName=\"" + step.getLocalName() + "\">");
-        Iterator iter = step.getPredicates().iterator();
-        tabIndex++;
-        while(iter.hasNext()){
-            Predicate predicate = (Predicate)iter.next();
-            predicate.accept(this);
-        }
-        tabIndex--;
-        printLn("</NameStep>");
-    }
-    
-    public void visit(ProcessingInstructionNodeStep step){
-        printLn("<ProcessingInstructionNodeStep name=\"" + step.getName() +
-            "\" axis=\"" + step.getAxis() + ">");
-
-        tabIndex++;
-        handlePredicates(step.getPredicates());
-        tabIndex--;
-        printLn("</ProcessingInstructionNodeStep>");
-    }
-    
-    public void visit(AllNodeStep step){
-        printLn("<AllNodeStep>");
-        tabIndex++;
-        handlePredicates(step.getPredicates());
-        tabIndex--;
-        printLn("</AllNodeStep>");
-    }
-    
-    public void visit(TextNodeStep step){
-        printLn("<TextNodeStep>");
-        tabIndex++;
-        handlePredicates(step.getPredicates());
-        tabIndex--;
-        printLn("</TextNodeStep>");
-    }
-    
-    public void visit(CommentNodeStep step){
-        printLn("<CommentNodeStep>");
-        tabIndex++;
-        handlePredicates(step.getPredicates());
-        tabIndex--;
-        printLn("</CommentNodeStep>");
-    }
-    
-    public void visit(Predicate predicate){
-        printLn("<Predicate>");
-        tabIndex++;
-        predicate.getExpr().accept(this);
-        tabIndex--;
-        printLn("</Predicate>");
-    }
-
-    //---------------------------------------------------------------
-    protected void printLn(String str){
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < tabIndex; i++) {
-            buffer.append("\t");
-        }
-        buffer.append(str);
-
-        printer.println(buffer.toString());
-    }
-
-    protected void handlePredicates(List predicates){
-        if (predicates != null){
-            Iterator iter = predicates.iterator();
-            while(iter.hasNext()){
-                ((Predicate)iter.next()).accept(this);
-            }
-        }
-    }
-    
-}
diff --git a/src/java/main/org/jaxen/xom/package.html b/src/java/main/org/jaxen/xom/package.html
new file mode 100644
index 0000000..d60432f
--- /dev/null
+++ b/src/java/main/org/jaxen/xom/package.html
@@ -0,0 +1,16 @@
+<html>
+	<head>
+		<title>
+			org.jaxen.xom.*
+		</title>
+	</head>
+
+	<body>
+		<p>
+			Navigation for <a href="http://www.xom.nu/">XOM</a> trees.
+			Note that XOM includes its own navigator which is likely
+			faster and less buggy than this one, though it doesn't
+			provide access to the full Jaxen API.
+		</p>
+	</body>
+</html>
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/BinaryExprTest.java
similarity index 65%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/BinaryExprTest.java
index 6d472db..658d13f 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/BinaryExprTest.java
@@ -1,11 +1,11 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/BinaryExprTest.java,v 1.2 2007/01/05 18:25:26 elharo Exp $
+ * $Revision: 1.2 $
+ * $Date: 2007/01/05 18:25:26 $
  *
  * ====================================================================
  *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
+ * Copyright 2007 bob mcwhirter & James Strachan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,49 +42,49 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: BinaryExprTest.java,v 1.2 2007/01/05 18:25:26 elharo Exp $
  */
 
 
 
 package org.jaxen.test;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.jaxen.JaxenException;
 import org.jaxen.dom.DOMXPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 import junit.framework.TestCase;
 
 /**
  * <p>
- *  Test for function context.
+ *  Test for various kinds of binary expressions.
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1.1
  *
  */
-public class ModTest extends TestCase
+public class BinaryExprTest extends TestCase
 {
 
-    public void testModofNonIntegers() 
-      throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
-        
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
-        
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
+    public void testBooleanPrecedence() 
+     throws JaxenException, ParserConfigurationException {
+      
+        // Note how the parentheses change the precedence and the result
+        DOMXPath xpath1 = new DOMXPath("false() and (false() or true())");
+        Boolean result1 = (Boolean) xpath1.evaluate(null);
+        assertFalse(result1.booleanValue());
+        DOMXPath xpath2 = new DOMXPath("false() and false() or true()");
+        Boolean result2 = (Boolean) xpath2.evaluate(null);
+        assertTrue(result2.booleanValue());
         
+        String expr = xpath1.getRootExpr().getText();
+        DOMXPath xpath3 = new DOMXPath(expr);
+        Boolean result3 = (Boolean) xpath3.evaluate(null);
+        assertEquals(expr, result1, result3);
+        assertFalse(expr, result3.booleanValue());
+      
     }
- 
-}
+
+}
\ No newline at end of file
diff --git a/src/java/test/org/jaxen/test/ContextTest.java b/src/java/test/org/jaxen/test/ContextTest.java
index 4378d0b..1d18730 100644
--- a/src/java/test/org/jaxen/test/ContextTest.java
+++ b/src/java/test/org/jaxen/test/ContextTest.java
@@ -96,6 +96,29 @@ public class ContextTest extends TestCase
         this.nodeSet = null;
     }
 
+    public void testSetNodeSet()
+    {
+        Context original = new Context( this.support );
+        assertEquals(0, original.getNodeSet().size() );
+        original.setNodeSet( this.nodeSet );
+        assertEquals(4, original.getNodeSet().size() );
+    }
+    
+    public void testShrinkNodeSet()
+    {
+        
+        Context original = new Context( this.support );
+        original.setNodeSet( this.nodeSet );
+        original.setPosition(3);
+        ArrayList list = new ArrayList();
+        list.add("1");
+        list.add("2");
+        list.add("3");
+        original.setNodeSet(list);
+        assertEquals(0, original.getPosition());
+        
+    }
+    
     public void testDuplicate()
     {
         Context original = new Context( this.support );
@@ -107,6 +130,9 @@ public class ContextTest extends TestCase
 
         Context dupe = original.duplicate();
 
+        assertEquals(2, dupe.getPosition());
+        assertEquals(4, dupe.getSize());
+        
         assertTrue( original != dupe );
 
         List dupeNodeSet = dupe.getNodeSet();
@@ -139,7 +165,8 @@ public class ContextTest extends TestCase
 
         assertEquals( 2,
                       original.getPosition() );
-    }
+    }    
+    
 
     public void testXMLPrefixIsAlwaysBound() 
       throws ParserConfigurationException, SAXException, IOException, JaxenException
diff --git a/src/java/test/org/jaxen/test/CoreTests.java b/src/java/test/org/jaxen/test/CoreTests.java
index 2ec7b75..9ac8005 100644
--- a/src/java/test/org/jaxen/test/CoreTests.java
+++ b/src/java/test/org/jaxen/test/CoreTests.java
@@ -58,7 +58,7 @@ import junit.framework.TestSuite;
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1b12
  *
  */
 public class CoreTests extends TestCase {
@@ -87,6 +87,8 @@ public class CoreTests extends TestCase {
         result.addTest(new TestSuite(UnsupportedAxisExceptionTest.class));
         result.addTest(new TestSuite(JaxenExceptionTest.class));
         result.addTest(new TestSuite(ArithmeticTest.class));
+        result.addTest(new TestSuite(IterableAxisTest.class));
+        result.addTest(new TestSuite(DefaultXPathFactoryTest.class));
         return result;
         
     }
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/DefaultNamestepTest.java
similarity index 58%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/DefaultNamestepTest.java
index 6d472db..f148243 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/DefaultNamestepTest.java
@@ -1,11 +1,11 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/DefaultNamestepTest.java,v 1.1 2007/04/16 15:56:54 elharo Exp $
+ * $Revision: 1.1 $
+ * $Date: 2007/04/16 15:56:54 $
  *
  * ====================================================================
  *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
+ * Copyright 2007 Elliotte Rusty Harold
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,49 +42,72 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: DefaultNamestepTest.java,v 1.1 2007/04/16 15:56:54 elharo Exp $
  */
 
-
-
 package org.jaxen.test;
 
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import junit.framework.TestCase;
+
 import org.jaxen.JaxenException;
+import org.jaxen.XPath;
 import org.jaxen.dom.DOMXPath;
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import junit.framework.TestCase;
 
 /**
- * <p>
- *  Test for function context.
- * </p>
- * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
  *
  */
-public class ModTest extends TestCase
-{
+public class DefaultNamestepTest extends TestCase {
 
-    public void testModofNonIntegers() 
-      throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
-        
+    private Document doc;
+    
+    public void setUp() throws ParserConfigurationException
+    {
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
+        DocumentBuilder builder = factory.newDocumentBuilder();
+        doc = builder.newDocument();
+    }
+
+
+    public DefaultNamestepTest(String name) {
+        super(name);
+    }
+
+
+    public void testIdentitySetUsageInDefaultNameStep() 
+      throws JaxenException {
+        
+        XPath xpath = new DOMXPath("/a/x/preceding-sibling::x[last()]");
+        org.w3c.dom.Element a = doc.createElementNS("", "a");
+        doc.appendChild(a);
+        org.w3c.dom.Element x1 = doc.createElementNS("", "x");
+        org.w3c.dom.Element x2 = doc.createElementNS("", "x");
+        org.w3c.dom.Element x3 = doc.createElementNS("", "x");
+        org.w3c.dom.Element x4 = doc.createElementNS("", "x");
+        org.w3c.dom.Element x5 = doc.createElementNS("", "x");
+        a.appendChild(x1);
+        a.appendChild(x2);
+        a.appendChild(x3);
+        a.appendChild(x4);
+        a.appendChild(x5);
+        x1.appendChild(doc.createTextNode("1"));
+        x2.appendChild(doc.createTextNode("2"));
+        x3.appendChild(doc.createTextNode("3"));
+        x4.appendChild(doc.createTextNode("4"));
+        x5.appendChild(doc.createTextNode("5"));
         
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
+        List result = xpath.selectNodes(doc);
+        assertEquals(1, result.size());
+        assertEquals(x1, result.get(0));
         
     }
- 
+    
 }
diff --git a/src/java/test/org/jaxen/test/DefaultXPathExprTest.java b/src/java/test/org/jaxen/test/DefaultXPathExprTest.java
index 65eebb5..94a8041 100644
--- a/src/java/test/org/jaxen/test/DefaultXPathExprTest.java
+++ b/src/java/test/org/jaxen/test/DefaultXPathExprTest.java
@@ -57,7 +57,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import org.jaxen.JaxenException;
 import org.jaxen.dom.DOMXPath;
 import org.jaxen.expr.Expr;
-import org.jaxen.expr.PathExpr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -69,7 +68,7 @@ import junit.framework.TestCase;
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b11
+ * @version 1.1b12
  *
  */
 public class DefaultXPathExprTest extends TestCase
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/DefaultXPathFactoryTest.java
similarity index 72%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/DefaultXPathFactoryTest.java
index 6d472db..b7e310a 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/DefaultXPathFactoryTest.java
@@ -1,7 +1,7 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/DefaultXPathFactoryTest.java,v 1.1 2006/11/09 16:11:10 elharo Exp $
+ * $Revision: 1.1 $
+ * $Date: 2006/11/09 16:11:10 $
  *
  * ====================================================================
  *
@@ -42,20 +42,15 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: DefaultXPathFactoryTest.java,v 1.1 2006/11/09 16:11:10 elharo Exp $
  */
 
 
 
 package org.jaxen.test;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
 import org.jaxen.JaxenException;
-import org.jaxen.dom.DOMXPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
+import org.jaxen.expr.*;
 
 import junit.framework.TestCase;
 
@@ -65,26 +60,21 @@ import junit.framework.TestCase;
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1b12
  *
  */
-public class ModTest extends TestCase
-{
+public class DefaultXPathFactoryTest extends TestCase {
 
-    public void testModofNonIntegers() 
-      throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
-        
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
-        
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
-        
+    public void testBadAxis() throws JaxenException {
+      
+      DefaultXPathFactory factory = new DefaultXPathFactory();
+      try {
+        factory.createAllNodeStep(123434);
+        fail("Allowed bad axis");
+      }
+      catch (JaxenException ex) {
+        assertNotNull(ex.getMessage());
+      }
     }
- 
+
 }
diff --git a/src/java/test/org/jaxen/test/ExprComparator.java b/src/java/test/org/jaxen/test/ExprComparator.java
new file mode 100644
index 0000000..1c65edf
--- /dev/null
+++ b/src/java/test/org/jaxen/test/ExprComparator.java
@@ -0,0 +1,461 @@
+/*
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/ExprComparator.java,v 1.1 2007/01/06 15:48:58 elharo Exp $
+ * $Revision: 1.1 $
+ * $Date: 2007/01/06 15:48:58 $
+ *
+ * ====================================================================
+ *
+ * Copyright 2007 Ryan Gustafson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 
+ *   * Neither the name of the Jaxen Project nor the names of its
+ *     contributors may be used to endorse or promote products derived 
+ *     from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ * This software consists of voluntary contributions made by many 
+ * individuals on behalf of the Jaxen Project and was originally 
+ * created by bob mcwhirter <bob at werken.com> and 
+ * James Strachan <jstrachan at apache.org>.  For more information on the 
+ * Jaxen Project, please see <http://www.jaxen.org/>.
+ * 
+ * $Id: ExprComparator.java,v 1.1 2007/01/06 15:48:58 elharo Exp $
+ */
+
+package org.jaxen.test;
+
+import java.util.Comparator;
+import java.util.List;
+
+import org.jaxen.expr.AdditiveExpr;
+import org.jaxen.expr.AllNodeStep;
+import org.jaxen.expr.CommentNodeStep;
+import org.jaxen.expr.EqualityExpr;
+import org.jaxen.expr.FilterExpr;
+import org.jaxen.expr.FunctionCallExpr;
+import org.jaxen.expr.LiteralExpr;
+import org.jaxen.expr.LocationPath;
+import org.jaxen.expr.LogicalExpr;
+import org.jaxen.expr.MultiplicativeExpr;
+import org.jaxen.expr.NameStep;
+import org.jaxen.expr.NumberExpr;
+import org.jaxen.expr.PathExpr;
+import org.jaxen.expr.Predicate;
+import org.jaxen.expr.ProcessingInstructionNodeStep;
+import org.jaxen.expr.RelationalExpr;
+import org.jaxen.expr.TextNodeStep;
+import org.jaxen.expr.UnaryExpr;
+import org.jaxen.expr.UnionExpr;
+import org.jaxen.expr.VariableReferenceExpr;
+
+
+class ExprComparator implements Comparator {
+
+    public static final Comparator EXPR_COMPARATOR = new ExprComparator();
+
+	private static final int TYPE_ADDITIVE_EXPR = 1;
+	private static final int TYPE_ALL_NODE_STEP = 2;
+	private static final int TYPE_COMMENT_NODE_STEP = 3;
+	private static final int TYPE_EQUALITY_EXPR = 4;
+	private static final int TYPE_FILTER_EXPR = 5;
+	private static final int TYPE_FUNCTION_CALL_EXPR = 6;
+	private static final int TYPE_LITERAL_EXPR = 7;
+	private static final int TYPE_LOCATION_PATH = 8;
+	private static final int TYPE_LOGICAL_EXP = 9;
+	private static final int TYPE_MULTIPLICATIVE_EXPR = 10;
+	private static final int TYPE_NAME_STEP = 11;
+	private static final int TYPE_NUMBER_EXPR = 12;
+	private static final int TYPE_PATH_EXPR = 13;
+	private static final int TYPE_PREDICATE = 14;
+	private static final int TYPE_PROCESSING_INSTRUCTION_NODE_STEP = 15;
+	private static final int TYPE_RELATIONAL_EXPR = 16;
+	private static final int TYPE_TEXT_NODE_STEP = 17;
+	private static final int TYPE_UNARY_EXPR = 18;
+	private static final int TYPE_UNION_EXPR = 19;
+	private static final int TYPE_VARIABLE_REFERENCE_EXPR = 20;
+
+	private ExprComparator()
+	{
+	}
+
+	public int compare(Object o1, Object o2)
+	{
+		int type1 = getType(o1);
+		int type2 = getType(o2);
+
+		int cmp;
+		if (type1 == type2)
+		{
+			switch (type1)
+			{
+				case TYPE_ADDITIVE_EXPR:
+					AdditiveExpr additiveExpr1 = (AdditiveExpr)o1;
+					AdditiveExpr additiveExpr2 = (AdditiveExpr)o2;
+					cmp = additiveExpr1.getOperator().compareTo(additiveExpr2.getOperator());
+					if (cmp == 0)
+					{
+						cmp = compare(additiveExpr1.getLHS(), additiveExpr2.getLHS());
+						if (cmp == 0)
+						{
+							cmp = compare(additiveExpr1.getRHS(), additiveExpr2.getRHS());
+						}
+					}
+					break;
+				case TYPE_ALL_NODE_STEP:
+					AllNodeStep allNodeStep1 = (AllNodeStep)o1;
+					AllNodeStep allNodeStep2 = (AllNodeStep)o2;
+					cmp = allNodeStep1.getAxis() - allNodeStep2.getAxis();
+					if (cmp == 0)
+					{
+						cmp = compareLists(allNodeStep1.getPredicates(), allNodeStep2.getPredicates());
+					}
+					break;
+				case TYPE_COMMENT_NODE_STEP:
+					CommentNodeStep commentNodeStep1 = (CommentNodeStep)o1;
+					CommentNodeStep commentNodeStep2 = (CommentNodeStep)o2;
+					cmp = commentNodeStep1.getAxis() - commentNodeStep2.getAxis();
+					if (cmp == 0)
+					{
+						cmp = compareLists(commentNodeStep1.getPredicates(), commentNodeStep2.getPredicates());
+					}
+					break;
+				case TYPE_EQUALITY_EXPR:
+					EqualityExpr equalityExpr1 = (EqualityExpr)o1;
+					EqualityExpr equalityExpr2 = (EqualityExpr)o2;
+					cmp = equalityExpr1.getOperator().compareTo(equalityExpr2.getOperator());
+					if (cmp == 0)
+					{
+						cmp = compare(equalityExpr1.getLHS(), equalityExpr1.getLHS());
+						if (cmp == 0)
+						{
+							cmp = compare(equalityExpr1.getRHS(), equalityExpr1.getRHS());
+						}
+					}
+					break;
+				case TYPE_FILTER_EXPR:
+					if (true)
+						throw new RuntimeException("Not yet implemented!");
+					break;
+				case TYPE_FUNCTION_CALL_EXPR:
+					FunctionCallExpr functionCallExpr1 = (FunctionCallExpr)o1;
+					FunctionCallExpr functionCallExpr2 = (FunctionCallExpr)o2;
+					cmp = compareStrings(functionCallExpr1.getPrefix(), functionCallExpr2.getPrefix());
+					if (cmp == 0)
+					{
+						cmp = functionCallExpr1.getFunctionName().compareTo(functionCallExpr2.getFunctionName());
+						if (cmp == 0)
+						{
+							cmp = compareLists(functionCallExpr1.getParameters(), functionCallExpr2.getParameters());
+						}
+					}
+					break;
+				case TYPE_LITERAL_EXPR:
+					LiteralExpr literalExpr1 = (LiteralExpr)o1;
+					LiteralExpr literalExpr2 = (LiteralExpr)o2;
+					cmp = literalExpr1.getLiteral().compareTo(literalExpr2.getLiteral());
+					break;
+				case TYPE_LOCATION_PATH:
+					LocationPath locationPath1 = (LocationPath)o1;
+					LocationPath locationPath2 = (LocationPath)o2;
+					if (locationPath1.isAbsolute() == locationPath2.isAbsolute())
+					{
+						cmp = compareLists(locationPath1.getSteps(), locationPath2.getSteps());
+					}
+					else if (locationPath1.isAbsolute())
+					{
+						cmp = 1;
+					}
+					else
+					{
+						cmp = -1;
+					}
+					break;
+				case TYPE_LOGICAL_EXP:
+					LogicalExpr logicalExpr1 = (LogicalExpr)o1;
+					LogicalExpr logicalExpr2 = (LogicalExpr)o2;
+					cmp = logicalExpr1.getOperator().compareTo(logicalExpr2.getOperator());
+					if (cmp == 0)
+					{
+						cmp = compare(logicalExpr1.getLHS(), logicalExpr2.getLHS());
+						if (cmp == 0)
+						{
+							cmp = compare(logicalExpr1.getRHS(), logicalExpr2.getRHS());
+						}
+					}
+					break;
+				case TYPE_MULTIPLICATIVE_EXPR:
+					MultiplicativeExpr multiplicativeExpr1 = (MultiplicativeExpr)o1;
+					MultiplicativeExpr multiplicativeExpr2 = (MultiplicativeExpr)o2;
+					cmp = multiplicativeExpr1.getOperator().compareTo(multiplicativeExpr2.getOperator());
+					if (cmp == 0)
+					{
+						cmp = compare(multiplicativeExpr1.getLHS(), multiplicativeExpr2.getLHS());
+						if (cmp == 0)
+						{
+							cmp = compare(multiplicativeExpr1.getRHS(), multiplicativeExpr2.getRHS());
+						}
+					}
+					break;
+				case TYPE_NAME_STEP:
+					NameStep nameStep1 = (NameStep)o1;
+					NameStep nameStep2 = (NameStep)o2;
+					cmp = nameStep1.getAxis() - nameStep2.getAxis();
+					if (cmp == 0)
+					{
+						cmp = compareStrings(nameStep1.getPrefix(), nameStep2.getPrefix());
+
+						if (cmp == 0)
+						{
+							cmp = nameStep1.getLocalName().compareTo(nameStep2.getLocalName());
+							if (cmp == 0)
+							{
+								cmp = compareLists(nameStep1.getPredicates(), nameStep2.getPredicates());
+							}
+						}
+					}
+					break;
+				case TYPE_NUMBER_EXPR:
+					NumberExpr numberExpr1 = (NumberExpr)o1;
+					NumberExpr numberExpr2 = (NumberExpr)o2;
+					cmp = new Double(numberExpr1.getNumber().doubleValue()).compareTo(new Double(numberExpr2.getNumber().doubleValue()));
+					break;
+				case TYPE_PATH_EXPR:
+					PathExpr pathExpr1 = (PathExpr)o1;
+					PathExpr pathExpr2 = (PathExpr)o2;
+					cmp = compare(pathExpr1.getLocationPath(), pathExpr2.getLocationPath());
+					if (cmp == 0)
+					{
+						cmp = compare(pathExpr1.getFilterExpr(), pathExpr2.getFilterExpr());
+					}
+					break;
+				case TYPE_PREDICATE:
+					Predicate predicate1 = (Predicate)o1;
+					Predicate predicate2 = (Predicate)o2;
+					cmp = compare(predicate1.getExpr(), predicate2.getExpr());
+					break;
+				case TYPE_PROCESSING_INSTRUCTION_NODE_STEP:
+					ProcessingInstructionNodeStep processingInstructionNodeStep1 = (ProcessingInstructionNodeStep)o1;
+					ProcessingInstructionNodeStep processingInstructionNodeStep2 = (ProcessingInstructionNodeStep)o2;
+					cmp = processingInstructionNodeStep1.getAxis() - processingInstructionNodeStep2.getAxis();
+					if (cmp == 0)
+					{
+						cmp = compareStrings(processingInstructionNodeStep1.getName(), processingInstructionNodeStep2.getName());
+						if (cmp == 0)
+						{
+							cmp = compareLists(processingInstructionNodeStep1.getPredicates(), processingInstructionNodeStep2.getPredicates());
+						}
+					}
+					break;
+				case TYPE_RELATIONAL_EXPR:
+					RelationalExpr relationalExpr1 = (RelationalExpr)o1;
+					RelationalExpr relationalExpr2 = (RelationalExpr)o2;
+					cmp = relationalExpr1.getOperator().compareTo(relationalExpr2.getOperator());
+					if (cmp == 0)
+					{
+						cmp = compare(relationalExpr1.getLHS(), relationalExpr2.getLHS());
+						if (cmp == 0)
+						{
+							cmp = compare(relationalExpr1.getRHS(), relationalExpr2.getRHS());
+						}
+					}
+					break;
+				case TYPE_TEXT_NODE_STEP:
+					TextNodeStep textNodeStep1 = (TextNodeStep)o1;
+					TextNodeStep textNodeStep2 = (TextNodeStep)o2;
+					cmp = textNodeStep1.getAxis() - textNodeStep2.getAxis();
+					if (cmp == 0)
+					{
+						cmp = compareLists(textNodeStep1.getPredicates(), textNodeStep2.getPredicates());
+					}
+					break;
+				case TYPE_UNARY_EXPR:
+					UnaryExpr unaryExpr1 = (UnaryExpr)o1;
+					UnaryExpr unaryExpr2 = (UnaryExpr)o2;
+					cmp = compare(unaryExpr1.getExpr(), unaryExpr2.getExpr());
+					break;
+				case TYPE_UNION_EXPR:
+					if (true)
+						throw new RuntimeException("Not yet implemented!");
+					break;
+				case TYPE_VARIABLE_REFERENCE_EXPR:
+					VariableReferenceExpr variableReferenceExpr1 = (VariableReferenceExpr)o1;
+					VariableReferenceExpr variableReferenceExpr2 = (VariableReferenceExpr)o2;
+					cmp = compareStrings(variableReferenceExpr1.getPrefix(), variableReferenceExpr2.getPrefix());
+					if (cmp == 0)
+					{
+						cmp = variableReferenceExpr1.getVariableName().compareTo(variableReferenceExpr2.getVariableName());
+					}
+					break;
+				default:
+					throw new IllegalArgumentException("Unhandled type: " + type1);
+			}
+		}
+		else
+		{
+			cmp = type1 - type2;
+		}
+		return cmp;
+	}
+
+	private int compareStrings(String s1, String s2)
+	{
+		int cmp;
+		if (s1 == s2)
+		{
+			cmp = 0;
+		}
+		else if (s1 == null)
+		{
+			cmp = -1;
+		}
+		else if (s2 == null)
+		{
+			cmp = 1;
+		}
+		else
+		{
+			cmp = s1.compareTo(s2);
+		}
+		return cmp;
+	}
+
+	private int compareLists(List list1, List list2)
+	{
+		int cmp;
+		if (list1 == list2)
+		{
+			cmp = 0;
+		}
+		else if (list1 == null)
+		{
+			cmp = -1;
+		}
+		else if (list2 == null)
+		{
+			cmp = 1;
+		}
+		else
+		{
+			cmp = list1.size() - list2.size();
+			if (cmp == 0)
+			{
+				for (int i = 0; i < list1.size() && cmp == 0; i++)
+				{
+					cmp = compare(list1.get(i), list2.get(i));
+				}
+			}
+		}
+		return cmp;
+	}
+
+	private int getType(Object node)
+	{
+		if (node instanceof AdditiveExpr)
+		{
+			return TYPE_ADDITIVE_EXPR;
+		}
+		else if (node instanceof AllNodeStep)
+		{
+			return TYPE_ALL_NODE_STEP;
+		}
+		else if (node instanceof CommentNodeStep)
+		{
+			return TYPE_COMMENT_NODE_STEP;
+		}
+		else if (node instanceof EqualityExpr)
+		{
+			return TYPE_EQUALITY_EXPR;
+		}
+		else if (node instanceof FilterExpr)
+		{
+			return TYPE_FILTER_EXPR;
+		}
+		else if (node instanceof FunctionCallExpr)
+		{
+			return TYPE_FUNCTION_CALL_EXPR;
+		}
+		else if (node instanceof LiteralExpr)
+		{
+			return TYPE_LITERAL_EXPR;
+		}
+		else if (node instanceof LocationPath)
+		{
+			return TYPE_LOCATION_PATH;
+		}
+		else if (node instanceof LogicalExpr)
+		{
+			return TYPE_LOGICAL_EXP;
+		}
+		else if (node instanceof MultiplicativeExpr)
+		{
+			return TYPE_MULTIPLICATIVE_EXPR;
+		}
+		else if (node instanceof NameStep)
+		{
+			return TYPE_NAME_STEP;
+		}
+		else if (node instanceof NumberExpr)
+		{
+			return TYPE_NUMBER_EXPR;
+		}
+		else if (node instanceof PathExpr)
+		{
+			return TYPE_PATH_EXPR;
+		}
+		else if (node instanceof Predicate)
+		{
+			return TYPE_PREDICATE;
+		}
+		else if (node instanceof ProcessingInstructionNodeStep)
+		{
+			return TYPE_PROCESSING_INSTRUCTION_NODE_STEP;
+		}
+		else if (node instanceof RelationalExpr)
+		{
+			return TYPE_RELATIONAL_EXPR;
+		}
+		else if (node instanceof TextNodeStep)
+		{
+			return TYPE_TEXT_NODE_STEP;
+		}
+		else if (node instanceof UnaryExpr)
+		{
+			return TYPE_UNARY_EXPR;
+		}
+		else if (node instanceof UnionExpr)
+		{
+			return TYPE_UNION_EXPR;
+		}
+		else if (node instanceof VariableReferenceExpr)
+		{
+			return TYPE_VARIABLE_REFERENCE_EXPR;
+		}
+		else
+		{
+			throw new IllegalArgumentException("Unknown Jaxen AST node type: " + node);
+		}
+	}
+}
diff --git a/src/java/test/org/jaxen/test/ExprTests.java b/src/java/test/org/jaxen/test/ExprTests.java
index ac1aeae..9a964d9 100644
--- a/src/java/test/org/jaxen/test/ExprTests.java
+++ b/src/java/test/org/jaxen/test/ExprTests.java
@@ -57,7 +57,7 @@ import junit.framework.TestSuite;
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1.1
  *
  */
 public class ExprTests {
@@ -67,8 +67,12 @@ public class ExprTests {
         
         TestSuite result = new TestSuite();
         result.addTest(new TestSuite(DefaultXPathExprTest.class));
+        result.addTest(new TestSuite(DefaultNamestepTest.class));
         result.addTest(new TestSuite(ModTest.class));
         result.addTest(new TestSuite(EqualsTest.class));
+        result.addTest(new TestSuite(LiteralExprTest.class));
+        result.addTest(new TestSuite(BinaryExprTest.class));
+        result.addTest(new TestSuite(ProcessingInstructionNodeTest.class));
         return result;
         
     }
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/IterableAxisTest.java
similarity index 69%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/IterableAxisTest.java
index 6d472db..1be089b 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/IterableAxisTest.java
@@ -1,11 +1,11 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/IterableAxisTest.java,v 1.1 2006/10/11 21:57:12 elharo Exp $
+ * $Revision: 1.1 $
+ * $Date: 2006/10/11 21:57:12 $
  *
  * ====================================================================
  *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
+ * Copyright 2006 Elliotte Rusty Harold
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,49 +42,37 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: IterableAxisTest.java,v 1.1 2006/10/11 21:57:12 elharo Exp $
  */
 
-
-
 package org.jaxen.test;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
+import junit.framework.TestCase;
 
 import org.jaxen.JaxenException;
-import org.jaxen.dom.DOMXPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import junit.framework.TestCase;
+import org.jaxen.expr.iter.IterableAxis;
+import org.jaxen.expr.iter.IterableSelfAxis;
+import org.xml.sax.SAXException;
 
 /**
- * <p>
- *  Test for function context.
- * </p>
- * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
- *
+ * @version 1.1b12
+ * 
  */
-public class ModTest extends TestCase
-{
+public class IterableAxisTest extends TestCase {
 
-    public void testModofNonIntegers() 
-      throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
+    public void testIterableSelfNamedAxis() 
+      throws JaxenException, SAXException {
         
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
-        
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
-        
-    }
- 
+        IterableAxis axis = new IterableSelfAxis(0);
+        try {
+            axis.namedAccessIterator(null, null, "name", "pre", "http://www.example.org/");
+            fail("should not support operation");
+        }
+        catch (UnsupportedOperationException ex) {
+            assertEquals("Named access unsupported", ex.getMessage());
+        }
+         
+    }    
+
 }
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/LiteralExprTest.java
similarity index 63%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/LiteralExprTest.java
index 6d472db..dab2aa5 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/LiteralExprTest.java
@@ -1,11 +1,11 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/LiteralExprTest.java,v 1.2 2007/01/05 18:25:09 elharo Exp $
+ * $Revision: 1.2 $
+ * $Date: 2007/01/05 18:25:09 $
  *
  * ====================================================================
  *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
+ * Copyright 2006 bob mcwhirter & James Strachan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,49 +42,60 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: LiteralExprTest.java,v 1.2 2007/01/05 18:25:09 elharo Exp $
  */
 
 
 
 package org.jaxen.test;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.jaxen.BaseXPath;
 import org.jaxen.JaxenException;
 import org.jaxen.dom.DOMXPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 import junit.framework.TestCase;
 
 /**
  * <p>
- *  Test for function context.
+ *  Test for various kinds of literals.
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1.1
  *
  */
-public class ModTest extends TestCase
+public class LiteralExprTest extends TestCase
 {
 
-    public void testModofNonIntegers() 
+    public void testStringLiteralContainsDoubleQuote() 
+     throws JaxenException, ParserConfigurationException {
+      
+        DOMXPath xpath = new DOMXPath("'\"'");
+        String expr = xpath.getRootExpr().getText();
+        assertEquals("'\"'", expr);
+      
+    }
+
+    public void testStringLiteralContainsSingleQuote() 
       throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
-        
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
-        
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
+    
+        DOMXPath xpath = new DOMXPath("\"'\"");
+        String expr = xpath.getRootExpr().getText();
+        assertEquals("\"'\"", expr);
+    
+    }
+  
+    public void testJaxen177() 
+      throws JaxenException, ParserConfigurationException {
+    
+        BaseXPath baseXPath = new BaseXPath("//Name[@Attribute = '\"']", null);
+        BaseXPath baseXPath2 = new BaseXPath(baseXPath.getRootExpr().getText(), null);
+        assertEquals(
+          "/descendant-or-self::node()/child::Name[(attribute::Attribute = '\"')]",
+          baseXPath2.getRootExpr().getText());
         
     }
- 
-}
+
+}
\ No newline at end of file
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/ModTest.java
index 6d472db..a38fc28 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/ModTest.java
@@ -61,11 +61,11 @@ import junit.framework.TestCase;
 
 /**
  * <p>
- *  Test for function context.
+ *  Test for the remainder function.
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1.1
  *
  */
 public class ModTest extends TestCase
diff --git a/src/java/test/org/jaxen/test/ModTest.java b/src/java/test/org/jaxen/test/ProcessingInstructionNodeTest.java
similarity index 63%
copy from src/java/test/org/jaxen/test/ModTest.java
copy to src/java/test/org/jaxen/test/ProcessingInstructionNodeTest.java
index 6d472db..2f5750e 100644
--- a/src/java/test/org/jaxen/test/ModTest.java
+++ b/src/java/test/org/jaxen/test/ProcessingInstructionNodeTest.java
@@ -1,11 +1,11 @@
 /*
- * $Header$
- * $Revision$
- * $Date$
+ * $Header: /home/projects/jaxen/scm/jaxen/src/java/test/org/jaxen/test/ProcessingInstructionNodeTest.java,v 1.2 2007/01/06 15:39:50 elharo Exp $
+ * $Revision: 1.2 $
+ * $Date: 2007/01/06 15:39:50 $
  *
  * ====================================================================
  *
- * Copyright 2000-2002 bob mcwhirter & James Strachan.
+ * Copyright 2007 Elliotte Rusty Harold
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,49 +42,56 @@
  * James Strachan <jstrachan at apache.org>.  For more information on the 
  * Jaxen Project, please see <http://www.jaxen.org/>.
  * 
- * $Id$
+ * $Id: ProcessingInstructionNodeTest.java,v 1.2 2007/01/06 15:39:50 elharo Exp $
  */
 
 
 
 package org.jaxen.test;
 
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.jaxen.JaxenException;
 import org.jaxen.dom.DOMXPath;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 import junit.framework.TestCase;
 
 /**
  * <p>
- *  Test for function context.
+ *  Test for processing instruction node-steps.
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b9
+ * @version 1.1.1
  *
  */
-public class ModTest extends TestCase
-{
+public class ProcessingInstructionNodeTest extends TestCase {
 
-    public void testModofNonIntegers() 
+    public void testGetText() 
       throws JaxenException, ParserConfigurationException {
-        
-        DOMXPath xpath = new DOMXPath("5.5 mod 2.5");
-        
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        Document doc = factory.newDocumentBuilder().newDocument();
-        Element root = doc.createElement("root");
-        doc.appendChild(root);
-        
-        Double result = (Double) xpath.evaluate(doc);
-        assertEquals(0.5, result.doubleValue(), 0.000001);
-        
-    }
- 
-}
+     
+         DOMXPath xpath = new DOMXPath("processing-instruction()");
+         String expr = xpath.getRootExpr().getText();
+         assertEquals("child::processing-instruction()", expr);
+     
+   }
+
+    public void testGetTextWithName() 
+      throws JaxenException, ParserConfigurationException {
+     
+        DOMXPath xpath = new DOMXPath("processing-instruction('foo')");
+        String expr = xpath.getRootExpr().getText();
+        assertEquals("child::processing-instruction('foo')", expr);
+     
+   }
+    
+   public void testGetTextWithPredicate() 
+     throws JaxenException, ParserConfigurationException {
+   
+       DOMXPath xpath = new DOMXPath("processing-instruction('foo')[1 = 1]");
+       String expr = xpath.getRootExpr().getText();
+       assertEquals("child::processing-instruction('foo')[(1.0 = 1.0)]", expr);
+   
+   } 
+    
+}
\ No newline at end of file
diff --git a/src/java/test/org/jaxen/test/SimpleVariableContextTest.java b/src/java/test/org/jaxen/test/SimpleVariableContextTest.java
index c001517..ceaaa6f 100644
--- a/src/java/test/org/jaxen/test/SimpleVariableContextTest.java
+++ b/src/java/test/org/jaxen/test/SimpleVariableContextTest.java
@@ -69,7 +69,7 @@ import junit.framework.TestCase;
  * </p>
  * 
  * @author Elliotte Rusty Harold
- * @version 1.1b10
+ * @version 1.1b12
  *
  */
 public class SimpleVariableContextTest extends TestCase
@@ -99,7 +99,7 @@ public class SimpleVariableContextTest extends TestCase
         
         // test the result
         assertEquals("String Value", copy.getVariableValue("", "", "s"));
-        assertEquals(Double.valueOf(3.1415292), copy.getVariableValue("", "", "x"));
+        assertEquals(new Double(3.1415292), copy.getVariableValue("", "", "x"));
         assertEquals(Boolean.TRUE, copy.getVariableValue("", "", "b"));
         assertEquals("", "");
         
@@ -116,7 +116,7 @@ public class SimpleVariableContextTest extends TestCase
         
         // test the result
         assertEquals("String Value", context.getVariableValue("", "", "s"));
-        assertEquals(Double.valueOf(3.1415292), context.getVariableValue("", "", "x"));
+        assertEquals(new Double(3.1415292), context.getVariableValue("", "", "x"));
         assertEquals(Boolean.TRUE, context.getVariableValue("", "", "b"));
         assertEquals("", "");
         
diff --git a/src/java/test/org/jaxen/test/XPathTestBase.java b/src/java/test/org/jaxen/test/XPathTestBase.java
index 0a27fda..1f677e4 100644
--- a/src/java/test/org/jaxen/test/XPathTestBase.java
+++ b/src/java/test/org/jaxen/test/XPathTestBase.java
@@ -125,6 +125,7 @@ public abstract class XPathTestBase extends TestCase
         assertEquals(xpathStr,
                 expectedSize,
                 results.size());
+        assertExprGetTextIdempotent(xpath);
         if (expectedSize > 0)
         {
             return results.get(0);
@@ -172,8 +173,15 @@ public abstract class XPathTestBase extends TestCase
             assertEquals(xpathStr,
                     expected,
                     result);
+            assertExprGetTextIdempotent(xpath);
         }
 
+    private void assertExprGetTextIdempotent(BaseXPath xpath) throws JaxenException
+    {
+    	assertEquals(0, ExprComparator.EXPR_COMPARATOR.compare(xpath.getRootExpr(), 
+          new BaseXPath(xpath.getRootExpr().getText(), null).getRootExpr()));
+    }
+    
     private Context getContext(Object contextNode)
     {
         Context context = new Context(getContextSupport());
diff --git a/src/javadoc/j2se/package-list b/src/javadoc/j2se/package-list
deleted file mode 100644
index 7f582f0..0000000
--- a/src/javadoc/j2se/package-list
+++ /dev/null
@@ -1,76 +0,0 @@
-java.applet
-java.awt
-java.awt.color
-java.awt.datatransfer
-java.awt.dnd
-java.awt.event
-java.awt.font
-java.awt.geom
-java.awt.im
-java.awt.im.spi
-java.awt.image
-java.awt.image.renderable
-java.awt.print
-java.beans
-java.beans.beancontext
-java.io
-java.lang
-java.lang.ref
-java.lang.reflect
-java.math
-java.net
-java.rmi
-java.rmi.activation
-java.rmi.dgc
-java.rmi.registry
-java.rmi.server
-java.security
-java.security.acl
-java.security.cert
-java.security.interfaces
-java.security.spec
-java.sql
-java.text
-java.util
-java.util.jar
-java.util.zip
-javax.accessibility
-javax.naming
-javax.naming.directory
-javax.naming.event
-javax.naming.ldap
-javax.naming.spi
-javax.rmi
-javax.rmi.CORBA
-javax.sound.midi
-javax.sound.midi.spi
-javax.sound.sampled
-javax.sound.sampled.spi
-javax.swing
-javax.swing.border
-javax.swing.colorchooser
-javax.swing.event
-javax.swing.filechooser
-javax.swing.plaf
-javax.swing.plaf.basic
-javax.swing.plaf.metal
-javax.swing.plaf.multi
-javax.swing.table
-javax.swing.text
-javax.swing.text.html
-javax.swing.text.html.parser
-javax.swing.text.rtf
-javax.swing.tree
-javax.swing.undo
-javax.transaction
-org.omg.CORBA
-org.omg.CORBA_2_3
-org.omg.CORBA_2_3.portable
-org.omg.CORBA.DynAnyPackage
-org.omg.CORBA.ORBPackage
-org.omg.CORBA.portable
-org.omg.CORBA.TypeCodePackage
-org.omg.CosNaming
-org.omg.CosNaming.NamingContextPackage
-org.omg.SendingContext
-org.omg.stub.java.rmi
diff --git a/src/javadoc/jaxp/package-list b/src/javadoc/jaxp/package-list
deleted file mode 100644
index 2922c08..0000000
--- a/src/javadoc/jaxp/package-list
+++ /dev/null
@@ -1,9 +0,0 @@
-javax.xml.parsers
-javax.xml.transform
-javax.xml.transform.dom
-javax.xml.transform.sax
-javax.xml.transform.stream
-org.w3c.dom
-org.xml.sax
-org.xml.sax.ext
-org.xml.sax.helpers

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libjaxen-java.git



More information about the pkg-java-commits mailing list