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 ClassJXPathBindingBuilder 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 45 JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm); 46 47 ClassJXPathBinding classBinding = 48 new ClassJXPathBinding(commonAtts, widgetId, childBindings); 49 return classBinding; 50 } catch (BindingException e) { 51 throw e; 52 } catch (Exception e) { 53 throw new BindingException("Error building class binding defined at " + DomHelper.getLocation(bindingElm), e); 54 } 55 } 56 } 57 | Popular Tags |