Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 7503 invoked from network); 15 Aug 2007 20:11:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2007 20:11:01 -0000 Received: (qmail 85013 invoked by uid 500); 15 Aug 2007 20:10:55 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 84942 invoked by uid 500); 15 Aug 2007 20:10:55 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 84933 invoked by uid 99); 15 Aug 2007 20:10:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 13:10:55 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vlsergey@gmail.com designates 64.233.184.238 as permitted sender) Received: from [64.233.184.238] (HELO wr-out-0506.google.com) (64.233.184.238) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 20:10:53 +0000 Received: by wr-out-0506.google.com with SMTP id c46so24181wra for ; Wed, 15 Aug 2007 13:10:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=izPJsd/ptgA5bMotnlw2yaGd+kI3qoin/m9DBPuIsxQXeptfiMJBmfMKG/bObsbWomgJ/UR5Jjm7QOb36uSnYMqZIhWLZGBSi0D742WrQJ0rdbNBKwDrxut5fyYEP6KE0MHKj/X+Zz22mqQ9VLLaC42jNdrz3/fqrZTY215faNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eACWkx43PN7VpVXqiwjjsdrRxAQvqgB7ryeu0HCXzFAT9lEL5Em7vzKuA8OjZp54pxhW+5/s56zR4RQDllp4KXF9chrMlPu6EvfIc1gbDVDvk7Bb7H0EDDoe9zivyBvvMJZdcKfQctP0+sePpqhGr7kCn+osyVRowUHRFOrfFtI= Received: by 10.90.34.3 with SMTP id h3mr1340121agh.1187208626237; Wed, 15 Aug 2007 13:10:26 -0700 (PDT) Received: by 10.100.38.10 with HTTP; Wed, 15 Aug 2007 13:10:25 -0700 (PDT) Message-ID: <18e049e20708151310kbf9ed2ax17dc89df6b82f7c@mail.gmail.com> Date: Thu, 16 Aug 2007 00:10:25 +0400 From: "Sergey Vladimirov" To: "Jakarta Commons Users List" Subject: Re: JXPath: Does not understand ancestor:: and descendant::? In-Reply-To: <46C35331.2040704@hp.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_79467_18140759.1187208625628" References: <46C35331.2040704@hp.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_79467_18140759.1187208625628 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Carsten, As for every axis, node test should be specified: - "parent::*" - "ancestor::*" - "descendant::somenodename" Hope this'll help, Sergey 2007/8/15, Carsten Schlipf : > > Hello, > > on the JXPath user's guide I have read that the axes "parent::" and > "ancestor::" may be used. However in my code I get JXPathExceptions: > > JXPathContext context = JXPathContext.newContext(object); > context.getValue("ancestor::"); > > The call to getValue(String) throws the JXPathException with the > following message: > > Invalid XPath: 'ancestor::'. Syntax error after: 'a'. > > A similar exception is thrown for 'descendant::' and 'parent::'. Am I > missing something? Do I have to set a special mode or register the > DescendantContext, AncestorContext and ParentContext classes as > functions somehow? I tried the later but didn't succeed. > > Thank you very much for help! > > Carsten > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > -- Sergey Vladimirov ------=_Part_79467_18140759.1187208625628--