mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
Allow attributes on descendant-or-self axis
If the context node is an attribute, the attribute itself is on the descendant-or-self axis. The principal node type of this axis is element, so the only node test that can return the attribute is "node()". In other words, "@attr/descendant-or-self::node()" is equivalent to "@attr". This matches the behavior of Saxon-CE.
This commit is contained in:
@@ -5,5 +5,6 @@
|
||||
/child::EXAMPLE/child::head/child::title
|
||||
/child::EXAMPLE/child::head/child::title/child::text()
|
||||
/child::EXAMPLE/child::head/node()
|
||||
/child::EXAMPLE/attribute::prop1/descendant-or-self::node()
|
||||
/descendant::title
|
||||
/descendant::p/ancestor::chapter
|
||||
|
||||
Reference in New Issue
Block a user