mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-27 12:15:34 +03:00
Consolidate code paths evaluating XPath predicates and filters. Don't push context node on stack when evaluating predicates. I have no idea why this was done. It seems completely useless and trying to pop the context node from a corrupted stack has already caused security issues. Filter nodesets in-place and don't create node sets with NULL gaps which allows to simplify merging a great deal. Simply move matched nodes backward and create a compact node set. Merge xmlXPathCompOpEvalPositionalPredicate into xmlXPathCompOpEvalPredicate.
18 lines
455 B
Plaintext
18 lines
455 B
Plaintext
/child::EXAMPLE
|
|
/child::*
|
|
/child::EXAMPLE/child::head
|
|
/child::EXAMPLE/child::*
|
|
/child::EXAMPLE/child::head/child::title
|
|
/child::EXAMPLE/child::head/child::title/child::text()
|
|
/child::EXAMPLE/child::head/node()
|
|
/descendant::title
|
|
/descendant::p/ancestor::chapter
|
|
//p[1]
|
|
//p[0 div 0]
|
|
//p[100000000000000000000]
|
|
//p[-100000000000000000000]
|
|
//chapter[true()][position() mod 2 = 1][true()][2]
|
|
//chapter[true()][2][true()]
|
|
//node()[false()]
|
|
(//node())[false()]
|