Method Matches(IExchange)

Assembly: redb.Route.dll

Evaluates the expression in a condition position.

public bool Matches(IExchange exchange)

Remarks

A node-set answers whether the path matched: XPath 1.0 reads a node-set as true exactly
when it is non-empty, and the content of the matched nodes never enters the question. So
Filter(XPath("/order/discount")) passes a message whose discount is 0, and an
empty <vip/> counts as a match.


A scalar — from string(...), count(...) > 0, or an explicit
— is a value like any other and goes through the single DSL
truthiness rule, so "0" is false there. To read a node's content as a
boolean instead, ask for the CLR type: XPath<bool>("/order/flag").