return node;
}
private void checkPrefixAndUri(String prefix, String uri, XPathContext context) throws XPathException {
if (prefix.equals("xml") != uri.equals(NamespaceConstant.XML)) {
XPathException err = new XPathException("Namespace prefix 'xml' and namespace uri " + NamespaceConstant.XML +
" must only be used together", this);
err.setErrorCode("XTDE0925");
err.setXPathContext(context);
throw dynamicError(this, err, context);
}
if (uri.length() == 0) {
XPathException err = new XPathException("Namespace URI is an empty string", this);
err.setErrorCode("XTDE0930");
err.setXPathContext(context);
//context.getController().recoverableError(err);
throw dynamicError(this, err, context);
}
if (!AnyURIValue.isValidURI(uri)) {
XPathException de = new XPathException("The string value of the constructed namespace node must be a valid URI");
de.setErrorCode("XTDE0905");
de.setXPathContext(context);
de.setLocator(this);
throw de;
}
}