// has no namespace part.
nsuri = XMLUtils.NULL_NS_URI;
} else {
final String prefix = qnameStr.substring(0, pos - 1);
Item secondItem = argv.getItem(1);
XQNode element = (XQNode) secondItem;
nsuri = NamespaceUriForPrefix.resolveNamespaceUri(element, prefix);
if(nsuri == null) {
// If the $qname has a prefix and if there is no namespace binding for $element
// that matches this prefix, then an error is raised [err:FONS0004].
throw new DynamicError("err:FONS0004", "Namespace for the prefix `" + qnameStr