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 33 public class SetAttributeJXPathBindingBuilder 34 extends JXPathBindingBuilderBase { 35 36 37 41 public JXPathBindingBase buildBinding(Element bindingElm, 42 JXPathBindingManager.Assistant assistant) throws BindingException { 43 44 try { 45 CommonAttributes commonAtts = 46 JXPathBindingBuilderBase.getCommonAttributes(bindingElm); 47 48 String attName = DomHelper.getAttribute(bindingElm, "name"); 49 String attValue = DomHelper.getAttribute(bindingElm, "value"); 50 51 SetAttributeJXPathBinding attBinding = 52 new SetAttributeJXPathBinding(commonAtts, attName, attValue); 53 return attBinding; 54 } catch (BindingException e) { 55 throw e; 56 } catch (Exception e) { 57 throw new BindingException( 58 "Error building set-attribute binding defined at " + 59 DomHelper.getLocation(bindingElm), e); 60 } 61 } 62 } 63 | Popular Tags |