// per ogni Transformer
List<org.salamandra.web.core.config.digester.Transformer> lstTrans = definitions.getTransformers();
for (Iterator<org.salamandra.web.core.config.digester.Transformer> iter = lstTrans.iterator(); iter.hasNext();) {
org.salamandra.web.core.config.digester.Transformer trans = iter.next();
Transformer transformer = createTransformerInstance(servletContext, trans, beanFactory);
// Ottengo le proprety del Transformer
List<ISetProperty> lstProp = trans.getSetProperties();
for (Iterator<ISetProperty> iterator = lstProp.iterator(); iterator.hasNext();) {
ISetProperty prop = (ISetProperty) iterator.next();
transformer.addInitParameter( prop.getProperty(), prop.getValue() );
}
// ottengo la struttura del nodo
Structure structure = trans.getStructure();
XmlBindingFactory bindFactory = null;
if (structure!=null) {
// assegno il nome al nodo
transformer.getStructure().setName(trans.getStructure().getName());
//
List<AddNode> listNode = structure.getAddNodes();
for (Iterator<AddNode> iterator = listNode.iterator(); iterator.hasNext();) {
AddNode node = iterator.next();
String nameNode = node.getName();
String typeNode = node.getType();
if ((node.getBinder()!=null) &&
hshBinds.containsKey(node.getBinder())) {
bindFactory = (XmlBindingFactory) hshBinds.get(node.getBinder());
}
transformer.getStructure().addNode(nameNode, typeNode, bindFactory);
}
} else {
SingleNode singleNode = trans.getSingleNode();
if (singleNode!=null) {
String typeNode = singleNode.getType();
if ((singleNode.getBinder()!=null) &&
hshBinds.containsKey(singleNode.getBinder())) {
bindFactory = (XmlBindingFactory) hshBinds.get(singleNode.getBinder());
}
transformer.setSingleNode(typeNode, bindFactory);
}
}
if ((bindFactory!=null) &&
(transformer instanceof SAXTransformer)) {