Let Expressions

XPath 3.0 allows let expressions, previously available only in XQuery. For example the expression let $x := . return //a[@status=$x] binds the variable $x to the context item, and then evaluates the expression //a[@status=$x] which makes use of this variable.