Re: [xml] XPath functions ignoring their name

On Tue, May 22, 2001 at 05:37:06PM +0200, Thomas Broyer wrote:

Le 22/05/01 08:21:08, Daniel Veillard a écrit :
Not exactly. If I use, e.g., the EXSLT set:distinct() function, the
callback should be able to retrieve the local-name ("distinct') and
namespace URI ("";) of the function.
Have a look to the example of func:function in the libxslt list to see
why I need this.

  I'm pretty sure this can be found in the current OP evaluated in the 
XPath module.

We can find the local name and the prefix. The prefix is resolved to the
namespace URI in xmlXPathCompOpEval. If the function can only access the
current OP, it must re-resolve the prefix into URI...

Extending the context is certainly cleaner at this point.

OK, something to keep in memory for libxml3 ...

I'll add two xmlChar* into xmlXPathParserContext (one for the local name,
the other for the namespace URI),

  well the function can be cached in op->cache ...
I added op->cacheURI and ctxt->context->function/functionURI

patch enclosed,


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

Attachment: functions.diff
Description: Text document

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]