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 CaseJXPathBindingBuilder extends JXPathBindingBuilderBase { 37 38 public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant) 39 throws BindingException { 40 try { 41 String widgetId = DomHelper.getAttribute(bindingElm, "id"); 42 CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm); 43 String xpath = DomHelper.getAttribute(bindingElm, "path"); 44 45 JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm); 46 47 CaseJXPathBinding caseBinding = new CaseJXPathBinding(commonAtts, widgetId, xpath, childBindings); 48 return caseBinding; 49 } catch (BindingException e) { 50 throw e; 51 } catch (Exception e) { 52 throw new BindingException("Error building case binding defined at " + DomHelper.getLocation(bindingElm), e); 53 } 54 } 55 } 56 | Popular Tags |