s[1] = new FunctionSignature(getName(), new Type[] { TypeRegistry.safeGet("node()?") });
return s;
}
public Sequence eval(Sequence<? extends Item> contextSeq, ValueSequence argv, DynamicContext dynEnv) throws XQueryException {
final QualifiedName nodeName;
if (argv == null) {
// If the argument is omitted, it defaults to the context node.
Item contextItem = dynEnv.contextItem();
if (contextItem == null) {
throw new DynamicError("err:XPDY0002", "ContextItem is not set");