String localName = null;
try {
prefix = QName.extractPrefix(param);
localName = QName.extractLocalName(param);
} catch (final IllegalArgumentException e) {
final ValueSequence argsSeq = new ValueSequence(args[0]);
argsSeq.addAll(args[1]);
throw new XPathException(this, ErrorCodes.FOCA0002, "Invalid lexical form of either prefix or local name.", argsSeq);
}
if ((prefix != null && prefix.length() > 0) && (namespace == null || namespace.length() == 0)){
final ValueSequence argsSeq = new ValueSequence(args[0]);
argsSeq.addAll(args[1]);
throw new XPathException(this, ErrorCodes.FOCA0002, "Non-empty namespace prefix with empty namespace URI", argsSeq);
}
if (namespace != null) {
if (namespace.equalsIgnoreCase(Namespaces.XMLNS_NS))