Nokigiri (Ruby) and XPath

Does Nokogiri only support XPath 1.0? I am trying to do a simple replacement of the lines in a value cell, for example (where element contains something like "* My line (useless text)")

 <xsl:value-of select="replace(element,'^\*\ (.+)\ \(.*\)$','\\1')"> 

Is it a poorly formed XSL? Or is there a limitation with Nokogiri?

+6
xpath xslt nokogiri
source share
1 answer

The replace() function is defined only in XPath 2.0 (and XPath 2.x only supports XSLT 2.x, not XSLT 1.0)

Nokogiri uses libxml2 , which only supports XPath 1.0 / XSLT1.0

+6
source share

All Articles