descendantssuch
Descendantssuch is a conceptual operator in query languages for hierarchical data such as trees and graphs. It returns the set of descendant nodes of a given context node that satisfy a specified predicate. The operator is used to filter subtrees without enumerating nodes manually.
Semantics of descendantssuch vary by language, but common behavior includes returning all proper descendants (not the
Syntax examples are often expressed in pseudocode. For instance, descendantssuch(root, n => n.type = 'employee' && n.status = 'active') selects
Relation to other concepts places descendantssuch alongside existing subtree filtering mechanisms. It generalizes the descendant axis
Applications include filtering subtrees in XML/JSON processing, user interface component trees, and hierarchical access-control models, where