public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { count(executionContext, new Fragment(element)); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { count(executionContext, new Fragment(element)); }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(isAttribute) { bindValue(DomUtils.getAttributeValue(element, valueAttributeName), executionContext, new Fragment(element)); } }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(isAttribute) { bindValue(DomUtils.getAttributeValue(element, valueAttributeName), executionContext, new Fragment(element)); } }
public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException { if(!isAttribute) { bindValue(DomUtils.getAllText(element, false), executionContext, new Fragment(element)); } }
public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(!isAttribute) { bindValue(element.getTextContent(), executionContext, new Fragment(element)); } }
public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException { if(!isAttribute) { bindValue(DomUtils.getAllText(element, false), executionContext, new Fragment(element)); } }
public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(!isAttribute) { bindValue(element.getTextContent(), executionContext, new Fragment(element)); } }
public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException { if(!isAttribute) { bindValue(DomUtils.getAllText(element, false), executionContext, new Fragment(element)); } }
public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(!isAttribute) { bindValue(element.getTextContent(), executionContext, new Fragment(element)); } }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(isAttribute) { bindValue(DomUtils.getAttributeValue(element, valueAttributeName), executionContext, new Fragment(element)); } }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(!beanExists(executionContext)) { logger.debug("Cannot bind data onto bean '" + beanId + "' as bean does not exist in BeanContext."); return; } if(isBeanWiring) { bindBeanValue(executionContext, new Fragment(element)); } else if(isAttribute) { // Bind attribute (i.e. selectors with '@' prefix) values on the visitBefore... bindDomDataValue(element, executionContext); } }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(!beanExists(executionContext)) { logger.debug("Cannot bind data onto bean '" + beanId + "' as bean does not exist in BeanContext."); return; } if(isBeanWiring) { bindBeanValue(executionContext, new Fragment(element)); } else if(isAttribute) { // Bind attribute (i.e. selectors with '@' prefix) values on the visitBefore... bindDomDataValue(element, executionContext); } }
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { if(!beanExists(executionContext)) { logger.debug("Cannot bind data onto bean '" + beanId + "' as bean does not exist in BeanContext."); return; } if(isBeanWiring) { bindBeanValue(executionContext, new Fragment(element)); } else if(isAttribute) { // Bind attribute (i.e. selectors with '@' prefix) values on the visitBefore... bindDomDataValue(element, executionContext); } }
public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException { String serializedFragment; if(childContentOnly) { serializedFragment = XmlUtil.serialize(element.getChildNodes(), false); } else { serializedFragment = XmlUtil.serialize(element, true); } if(!omitXMLDeclaration) { serializedFragment = "<?xml version=\"1.0\"?>\n" + serializedFragment; } executionContext.getBeanContext().addBean(bindTo, serializedFragment, new Fragment(element)); }
public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException { String serializedFragment; if(childContentOnly) { serializedFragment = XmlUtil.serialize(element.getChildNodes(), false); } else { serializedFragment = XmlUtil.serialize(element, true); } if(!omitXMLDeclaration) { serializedFragment = "<?xml version=\"1.0\"?>\n" + serializedFragment; } executionContext.getBeanContext().addBean(bindTo, serializedFragment, new Fragment(element)); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(isAttribute) { bindValue(SAXUtil.getAttribute(valueAttributeName, element.getAttributes()), executionContext, new Fragment(element)); } else { // Turn on Text Accumulation... element.accumulateText(); } }
private void applyTemplate(Template template, SAXElement element, ExecutionContext executionContext) throws SmooksException { if (getAction() == Action.BIND_TO) { Writer writer = new StringWriter(); applyTemplate(template, element, executionContext, writer); executionContext.getBeanContext().addBean(getBindBeanId(), writer.toString(), new Fragment(element)); } else { Writer writer = element.getWriter(this); applyTemplate(template, element, executionContext, writer); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(isAttribute) { bindValue(SAXUtil.getAttribute(valueAttributeName, element.getAttributes()), executionContext, new Fragment(element)); } else { // Turn on Text Accumulation... element.accumulateText(); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if(isAttribute) { bindValue(SAXUtil.getAttribute(valueAttributeName, element.getAttributes()), executionContext, new Fragment(element)); } else { // Turn on Text Accumulation... element.accumulateText(); } }