saxonica.com

fn:exactly-one

fn:exactly-one($srcval as item*) as item?

Function signature

$srcval

item() *

Result

item() ?

Checks whether $srcval contains exactly one item; fails if it is empty or contains multiple items.

XPath 2.0 Specification

Next