I don't know how to correctly represent this but Expr >>> FilterExpr Predicate
:
Expr > OrExpr > AndExpr > EqualityExpr > RelationalExpr > AdditiveExpr > MultiplicativeExpr > UnaryExpr > UnionExpr > PathExpr > FilterExpr > FilterExpr Predicate
gives you the 2 parts:
- the filter
(//attribute::name | //attribute::id)
- and the predicate
[starts-with(string(self::node()), "be") or starts-with(string(self::node()), "1")]
(//attribute::name | //attribute::id)
FilterExpr > PrimaryExpr > '(' Expr ')'
Expr > OrExpr > AndExpr > EqualityExpr > RelationalExpr > AdditiveExpr > MultiplicativeExpr > UnaryExpr > UnionExpr > UnionExpr '|' PathExpr
gives you //attribute::name
and //attribute::id
//attribute::name
and //attribute::id
PathExpr > LocationPath > AbsoluteLocationPath > AbbreviatedAbsoluteLocationPath > '//' RelativeLocationPath
RelativeLocationPath > Step > AxisSpecifier NodeTest Predicate*
- AxisSpecifier > AxisName '::'
- AxisName > 'attribute'
- NodeTest > NameTest
NameTest
being name
and id
Predicate [starts-with(string(self::node()), "be") or starts-with(string(self::node()), "1")]
Predicate > '[' PredicateExpr ']' > Expr > OrExpr > OrExpr 'or' AndExpr
- OrExpr > AndExpr
- AndExpr > EqualityExpr > RelationalExpr > AdditiveExpr > MultiplicativeExpr > UnaryExpr > UnionExpr > PathExpr > FilterExpr > PrimaryExpr > FunctionCall > FunctionName '(' ( Argument ( ',' Argument )* )? ')'
Argument > Expr
FunctionName
being starts-with
, first argument being another FunctionCall
(string
function), second argument being Literal
s (via PathExpr > FilterExpr > PrimaryExpr
), "be" and "1".
Finally, self::node() comes from:
RelativeLocationPath > Step > AxisSpecifier NodeTest Predicate*
- AxisSpecifier > AxisName '::'
- AxisName > 'attribute'
- NodeTest > NodeType '(' ')'
NodeType
being 'node'