1 16 package org.apache.cocoon.woody.binding; 17 18 import org.apache.cocoon.woody.util.DomHelper; 19 import org.w3c.dom.Element ; 20 21 36 public class StructJXPathBindingBuilder 37 extends JXPathBindingBuilderBase { 38 39 public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant) 40 throws BindingException { 41 try { 42 String widgetId = DomHelper.getAttribute(bindingElm, "id"); 43 CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm); 44 String xpath = DomHelper.getAttribute(bindingElm, "path"); 45 46 JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm); 47 48 StructJXPathBinding structBinding = 49 new StructJXPathBinding(commonAtts, widgetId, xpath, childBindings); 50 return structBinding; 51 } catch (BindingException e) { 52 throw e; 53 } catch (Exception e) { 54 throw new BindingException("Error building struct binding defined at " + DomHelper.getLocation(bindingElm), e); 55 } 56 } 57 } 58 | Popular Tags |