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 34 public class ContextJXPathBindingBuilder extends JXPathBindingBuilderBase { 35 36 40 public JXPathBindingBase buildBinding(Element bindingElm, 41 JXPathBindingManager.Assistant assistant) throws BindingException { 42 43 try { 44 CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm); 45 String xpath = DomHelper.getAttribute(bindingElm, "path"); 46 47 JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm); 48 49 ContextJXPathBinding contextBinding = new ContextJXPathBinding(commonAtts, xpath, childBindings); 50 return contextBinding; 51 } catch (BindingException e) { 52 throw e; 53 } catch (Exception e) { 54 throw new BindingException("Error building context binding defined at " + DomHelper.getLocation(bindingElm), e); 55 } 56 } 57 } 58 | Popular Tags |