XPath 2.0?

42 views
Skip to first unread message

Harm

unread,
Nov 7, 2009, 4:05:50 PM11/7/09
to nokogiri-talk
I'm exceptionally new to XML and XPath and I'm really enjoying
Nokogiri so far. Today I wanted to do something more advanced and I
tried the function 'starts_with' as defined in the XPath 2.0
specifcication. That resulted in a RuntimeError:
RuntimeError: xmlXPathCompOpEval: function starts_with not found

To what extend does Nokogiri support XPath 1|2.0?

Aaron Patterson

unread,
Nov 7, 2009, 4:16:53 PM11/7/09
to nokogi...@googlegroups.com
On Sat, Nov 7, 2009 at 1:05 PM, Harm <harm...@gmail.com> wrote:
>
> I'm exceptionally new to XML and XPath and I'm really enjoying
> Nokogiri so far. Today I wanted to do something more advanced and I
> tried the function 'starts_with' as defined in the XPath 2.0
> specifcication. That resulted in a RuntimeError:
> RuntimeError: xmlXPathCompOpEval: function starts_with not found

starts-with() is actually an XPath 1.0 function. It looks like you're
using an underscore instead of a dash:

http://www.w3.org/TR/xpath#function-starts-with

> To what extend does Nokogiri support XPath 1|2.0?

We leverage the XPath implementation inside libxml2. libxml2 supports
XPath 1.0.

Hope that helps!

--
Aaron Patterson
http://tenderlovemaking.com/

Harm

unread,
Nov 12, 2009, 2:56:30 PM11/12/09
to nokogiri-talk
>_<
And there I was searching hi and lo. Thank you very much.

On Nov 7, 10:16 pm, Aaron Patterson <aaron.patter...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages