saxonica.com

fn:zero-or-one

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

Function signature

$srcval

item() *

Result

item() ?

Tests whether $srcval contains zero or one items; fails if it contains multiple items.

XPath 2.0 Specification