_xsltc.setStylesheet((Stylesheet)node);
}
checkForSuperfluousAttributes(node, attributes);
}
catch (ClassNotFoundException e) {
ErrorMsg err = new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, node);
reportError(ERROR, err);
}
catch (Exception e) {
ErrorMsg err = new ErrorMsg(ErrorMsg.INTERNAL_ERR,
e.getMessage(), node);
reportError(FATAL, err);
}
}
else {
if (uri != null) {
// Check if the element belongs in our namespace
if (uri.equals(XSLT_URI)) {
node = new UnsupportedElement(uri, prefix, local, false);
UnsupportedElement element = (UnsupportedElement)node;
ErrorMsg msg = new ErrorMsg(ErrorMsg.UNSUPPORTED_XSL_ERR,
getLineNumber(),local);
element.setErrorMessage(msg);
if (versionIsOne) {
reportError(UNSUPPORTED,msg);
}
}
// Check if this is an XSLTC extension element
else if (uri.equals(TRANSLET_URI)) {
node = new UnsupportedElement(uri, prefix, local, true);
UnsupportedElement element = (UnsupportedElement)node;
ErrorMsg msg = new ErrorMsg(ErrorMsg.UNSUPPORTED_EXT_ERR,
getLineNumber(),local);
element.setErrorMessage(msg);
}
// Check if this is an extension of some other XSLT processor
else {
Stylesheet sheet = _xsltc.getStylesheet();
if ((sheet != null) && (sheet.isExtension(uri))) {
if (sheet != (SyntaxTreeNode)_parentStack.peek()) {
node = new UnsupportedElement(uri, prefix, local, true);
UnsupportedElement elem = (UnsupportedElement)node;
ErrorMsg msg =
new ErrorMsg(ErrorMsg.UNSUPPORTED_EXT_ERR,
getLineNumber(),
prefix+":"+local);
elem.setErrorMessage(msg);
}
}