XPath function

168 views
Skip to first unread message

Mitchell Harris

unread,
Oct 13, 2011, 1:48:23 PM10/13/11
to libx...@googlegroups.com
Is there a way to get at the XPath functions as defined on w3schols?
The following code:
}
var elems = doc.find("//item[fn:lower-case(ns1:duration)='2:00']",ns);

Reports the following error.
function lower-case not found
XPath error : Unregistered function

Marco Rogers

unread,
Oct 18, 2011, 4:42:02 PM10/18/11
to libx...@googlegroups.com
Do you know if libxml2 supports XPath functions? I can't find the appropriate documentation. If it's supported by libxml2 I'll try to add support to libxmljs.

:Marco

Nicolas Morel

unread,
Oct 19, 2011, 4:50:46 AM10/19/11
to libx...@googlegroups.com
Hello,

It seems some functions are defined in libxml2 but not lower-case.
They are listed here (everything ending with function I guess) and you have the corresponding sources here.
You could also register new functions to fill the gaps but that should definitely belong to libxml2.

-- Marsup
Reply all
Reply to author
Forward
0 new messages