You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by pi...@netcourrier.com on 2003/03/03 17:38:19 UTC

[JXPath] extend JXPath

Hi,

We'd like to extend JXPath to navigate through our objects. Basically, we need to redefine how to process each token, but we want to keep the benefits of predicates handling, etc...
Is there a best way to achieve this...? We were thinking of 2 solutions :
- creating specific functions and try to call them successively in our path.
- implement interface DynamicPropertyHandler and define our behaviour in getProperty method.
Does anybody know which is the best way, or is there another solution ?
Also, we would like to know if it's possible to define some custom prefixes like in "/child::AAA" in xpath.

Thanks a lot,
pikepoke.

-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,15 € TTC/min)


Re: [JXPath] extend JXPath

Posted by Dmitri Plotnikov <dp...@yahoo.com>.
pikepoke,


--- pikepoke@netcourrier.com wrote:
> Hi,
> 
> We'd like to extend JXPath to navigate through our objects.
> Basically, we need to redefine how to process each token, but we want
> to keep the benefits of predicates handling, etc...
> Is there a best way to achieve this...? We were thinking of 2
> solutions :
> - creating specific functions and try to call them successively in
> our path.
> - implement interface DynamicPropertyHandler and define our behaviour
> in getProperty method.

If you can achieve your goal by implementing DynamicPropertyHandler,
that's the way to go - there is nothing easier.  Let me know if you run
into problems with this approach.

> Does anybody know which is the best way, or is there another solution
> ?
> Also, we would like to know if it's possible to define some custom
> prefixes like in "/child::AAA" in xpath.
Unfortunately, that is not possible without breaking the XPath
standard. The prefixes defined by the standard are hardcoded in the
implementation of JXPath, so extending that list would technically also
be a challenge.

> 
> Thanks a lot,
> pikepoke.

Regards,

- Dmitri Plotnikov
dmitri@apache.org

> 
> -------------------------------------------------------------
> NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs,
> Toolbar...
> Web/Wap : www.netcourrier.com
> T�l�phone/Fax : 08 92 69 00 21 (0,34 � TTC/min)
> Minitel: 3615 NETCOURRIER (0,15 � TTC/min)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/