Hi Hallvard. That sounds interesting. You can call a function and navigate through its results already. e.g.
document( 'foo.xml' )//bar[@x='123']/xyz I'm just wondering why you think that a custom location step is requried. e.g. your example could be reworked a little as follows... ext:related-thing(thing)[@color='red'] Or further location steps can be appended as needed such as ext:related-thing(thing)[@color='red']/foo/bar Without having to change the XPath grammar etc. Would that do what you need? James ----- Original Message ----- From: "Hallvard Trętteberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 3:00 PM Subject: [Jaxen] Custom location step functions Hi, I've managed to add custom location step functions to jaxen, to allow xpath expressions like thing/ext:related-thing()[@color='red']. The idea is that a function may generate the elements in a step, e.g. to support navigating across idref's or increase speed. Main features of the implementation: - add support for this in the XPathHandler interface - make the saxpath parser recognize the new syntax - add support in XPathFactory, DefaultXPathFactory and JaxenHandler - add new DefaultFunctionStep class, extending DefaultStep which uses the custom function to generate elements to iterate over (the axis is ignored) Any interest in adding this to Jaxen? Anyone care to validate the implementation? Hallvard Trętteberg, stipendiat ved IDI, NTNU http://www.idi.ntnu.no/~hal, mailto:[EMAIL PROTECTED], phone:+47 7359 3443 _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest