Re: [xml] RFE: support for function here() in XPath
- From: Aleksey Sanin <aleksey aleksey com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] RFE: support for function here() in XPath
- Date: Sat, 09 Mar 2002 07:30:21 -0800
Cool! Thanks!!!
Aleksey.
Daniel Veillard wrote:
On Sat, Mar 09, 2002 at 06:49:41AM -0800, Aleksey Sanin wrote:
Daniel,
I am working on XMLDSig implementation and I need some help from you.
A new XPath function here() was introduced by this standard:
http://www.w3.org/TR/xmldsig-core/#sec-XPath
Will it be possible to add this function to libxml2?
It is there, as part of XPointer, but you need to do a bit of work:
- you need to register it in your XPath context
xmlXPathContextPtr ctxt;
xmlXPathRegisterFunc(ctxt, (xmlChar *)"here",
xmlXPtrHereFunction);
- you need to provide a pointer to the node within the context:
ctxt->here = here;
Both are done in xmlXPtrNewContext() in xpointer.c f you want to have a look,
the implementation of here() itself is trivial, this should work as is without
need for a patch.
It's funny for me to see this, for historical reasons based on my previous
work in the W3C XML Linking WG.
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]