Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 22178 invoked from network); 3 Nov 2005 03:10:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Nov 2005 03:10:59 -0000 Received: (qmail 14214 invoked by uid 500); 3 Nov 2005 03:10:55 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 14137 invoked by uid 500); 3 Nov 2005 03:10:55 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 14126 invoked by uid 500); 3 Nov 2005 03:10:55 -0000 Received: (qmail 14123 invoked by uid 99); 3 Nov 2005 03:10:54 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 02 Nov 2005 19:10:54 -0800 Received: (qmail 22055 invoked by uid 65534); 3 Nov 2005 03:10:34 -0000 Message-ID: <20051103031034.22054.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commons-cvs@jakarta.apache.org From: dmitri@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 @@ - + 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 @@ jdom - b9 + 1.0 http://www.jdom.org 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