log.debug("Invoking dynamic tag with attributes: " + attributes);
}
attributes.put("org.apache.commons.jelly.body", getBody());
// create new context based on current attributes
JellyContext newJellyContext = context.newJellyContext(attributes);
Map attrMap = new HashMap();
for ( Iterator keyIter = this.attributes.keySet().iterator();
keyIter.hasNext();) {
String key = (String) keyIter.next();
if ( key.endsWith( "Attr" ) ) {
Object value = this.attributes.get( key );
attrMap.put( key, value );
attrMap.put( key.substring( 0, key.length()-4 ), value );
}
}
newJellyContext.setVariable( "attrs", attrMap );
getTemplate().run(newJellyContext, output);
}