Instead of using "descendant-or-self" Oga will use "descendant". This ensures that expressions such as "foo *" don't return a set also including the "foo" element. Nokogiri solves this problem in a somewhat different way by using //foo//* for the CSS expression "foo *". While this works in Nokogiri the expression "descendant-or-self::node()" is slow as a snail in Oga (due to its nature of retrieving _all_ nodes first). By using "descendant" we can work around this problem. |
||
---|---|---|
.. | ||
oga | ||
support | ||
spec_helper.rb |