digester.addSetNext("*/componentElement", "addElement", JRDesignElement.class.getName());
Collection components = ComponentsEnvironment.getComponentBundles();
for (Iterator it = components.iterator(); it.hasNext();)
{
ComponentsBundle componentsBundle = (ComponentsBundle) it.next();
ComponentsXmlParser xmlParser = componentsBundle.getXmlParser();
digester.setRuleNamespaceURI(xmlParser.getNamespace());
XmlDigesterConfigurer configurer = xmlParser.getDigesterConfigurer();
if (configurer != null)
{
configurer.configureDigester(digester);
}
for (Iterator namesIt = componentsBundle.getComponentNames().iterator();
namesIt.hasNext();)
{
String componentName = (String) namesIt.next();
digester.addRule("*/componentElement/" + componentName,
JRComponentRule.newInstance());