String localName,
Attributes list)
throws SAXException {
try {
// use the URI to load a taglib
TagLibrary taglib = context.getTagLibrary(namespaceURI);
if (taglib == null) {
if (namespaceURI != null && namespaceURI.startsWith("jelly:")) {
String uri = namespaceURI.substring(6);
// try to find the class on the claspath
try {
Class taglibClass = getClassLoader().loadClass(uri);
taglib = (TagLibrary) taglibClass.newInstance();
context.registerTagLibrary(namespaceURI, taglib);
}
catch (ClassNotFoundException e) {
log.warn("Could not load class: " + uri + " so disabling the taglib");
}
}
}
if (taglib != null) {
TagScript script = taglib.createTagScript(localName, list);
if ( script != null ) {
// now iterate through through the expressions
int size = list.getLength();
for (int i = 0; i < size; i++) {
String attributeName = list.getLocalName(i);
String attributeValue = list.getValue(i);
Expression expression =
taglib.createExpression(
getExpressionFactory(),
localName,
attributeName,
attributeValue);
if (expression == null) {