commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject svn commit: r330424 - in /jakarta/commons/proper/jxpath/trunk: build.xml project.xml src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
Date Thu, 03 Nov 2005 03:10:33 GMT
Author: dmitri
Date: Wed Nov  2 19:10:30 2005
New Revision: 330424

URL: http://svn.apache.org/viewcvs?rev=330424&view=rev
Log:
Upgraded to JDOM 1.0

Modified:
    jakarta/commons/proper/jxpath/trunk/build.xml
    jakarta/commons/proper/jxpath/trunk/project.xml
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java

Modified: jakarta/commons/proper/jxpath/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jxpath/trunk/build.xml?rev=330424&r1=330423&r2=330424&view=diff
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/build.xml (original)
+++ jakarta/commons/proper/jxpath/trunk/build.xml Wed Nov  2 19:10:30 2005
@@ -161,7 +161,7 @@
     </get>
     <get dest="${libdir}/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-2.0.2.jar">
     </get>
-    <get dest="${libdir}/jdom-b9.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jdom/jars/jdom-b9.jar">
+    <get dest="${libdir}/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar">
     </get>
     <get dest="${libdir}/commons-beanutils-1.4.jar" usetimestamp="true" ignoreerrors="true"
src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.4.jar">
     </get>

Modified: jakarta/commons/proper/jxpath/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jxpath/trunk/project.xml?rev=330424&r1=330423&r2=330424&view=diff
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/project.xml (original)
+++ jakarta/commons/proper/jxpath/trunk/project.xml Wed Nov  2 19:10:30 2005
@@ -114,7 +114,7 @@
     </dependency>
     <dependency>
       <id>jdom</id>
-      <version>b9</version>
+      <version>1.0</version>
       <url>http://www.jdom.org</url> 
     </dependency>
     <dependency> 

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java?rev=330424&r1=330423&r2=330424&view=diff
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
Wed Nov  2 19:10:30 2005
@@ -668,11 +668,17 @@
     }
     
     private int getRelativePositionOfElement() {
-        Element parent = (Element) ((Element) node).getParent();
+        Object parent = ((Element) node).getParent();
         if (parent == null) {
             return 1;
         }
-        List children = parent.getContent();
+        List children;
+        if (parent instanceof Element) {
+            children = ((Element) parent).getContent();
+        }
+        else {
+            children = ((Document) parent).getContent();
+        }
         int count = 0;
         for (int i = 0; i < children.size(); i++) {
             Object child = children.get(i);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message