Re: [xml] RFE: support for function here() in XPath
- From: Daniel Veillard <veillard redhat com>
- To: Aleksey Sanin <aleksey aleksey com>
- Cc: xml gnome org
- Subject: Re: [xml] RFE: support for function here() in XPath
- Date: Sat, 9 Mar 2002 10:06:05 -0500
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
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]