if (lang.equals("javaclass") && (scriptSrc != null))
throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_ELEM_CONTENT_NOT_ALLOWED, new Object[]{scriptSrc})); //"Element content not allowed for lang=javaclass "
//+ scriptSrc);
XPathContext liaison = ((XPathContext) transformer.getXPathContext());
ExtensionsTable etable = liaison.getExtensionsTable();
ExtensionHandler nsh = etable.get(declNamespace);
// If we have no prior ExtensionHandler for this namespace, we need to
// create one.
// If the script element is for javaclass, this is our special compiled java.
// Element content is not supported for this so we throw an exception if
// it is provided. Otherwise, we look up the srcURL to see if we already have
// an ExtensionHandler.
if (null == nsh)
{
if (lang.equals("javaclass"))
{
if (null == srcURL)
{
nsh = etable.makeJavaNamespace(declNamespace);
}
else
{
nsh = etable.get(srcURL);
if (null == nsh)
{
nsh = etable.makeJavaNamespace(srcURL);
}
}
}
else // not java
{
nsh = new ExtensionHandlerGeneral(declNamespace, this.m_elements,
this.m_functions, lang, srcURL,
scriptSrc, getSystemId());
// System.out.println("Adding NS Handler: declNamespace = "+
// declNamespace+", lang = "+lang+", srcURL = "+
// srcURL+", scriptSrc="+scriptSrc);
}
etable.addExtensionNamespace(declNamespace, nsh);
}
}