The for and if expressions
XPath 2.0 adds a “for” expression:
for $bib in blist/bibl
[contains($bib/orgname, 'W3C')]
return $bib
N.B. This is in XPath, not the host language (XSLT or XQuery).
Simiilarly, an if
/
then
/
else expression:
if ($part/@discounted)
then $part/wholesale
else $part/retail