public void visitBefore(final SAXElement element, final ExecutionContext executionContext) throws SmooksException, IOException { if(targetAttribute == null) { // The selected text is not an attribute, which means it's the element text, // which means we need to turn on text accumulation for SAX... element.accumulateText(); } }
public void visitBefore(final SAXElement element, final ExecutionContext executionContext) throws SmooksException { if(targetAttribute == null) { // The selected text is not an attribute, which means it's the element text, // which means we need to turn on text accumulation for SAX... element.accumulateText(); } }
/** * Add a text object to this instance. * <p/> * Utility method, userd mainly for testing. * * @param text The text to be added. * @param type The text type. * @see #accumulateText() * @see TextConsumer */ public void addText (String text, TextType type) { if(this.text == null) { accumulateText(); } this.text.add(new SAXText(text, type)); }
/** * Add a text object to this instance. * * Utility method, userd mainly for testing. * * @param text The text to be added. * @param type The text type. * @see #accumulateText() * @see TextConsumer */ public void addText (String text, TextType type) { if(this.text == null) { accumulateText(); } this.text.add(new SAXText(text, type)); }
/** * Add a text object to this instance. * <p/> * Utility method, userd mainly for testing. * * @param text The text to be added. * @param type The text type. * @see #accumulateText() * @see TextConsumer */ public void addText (String text, TextType type) { if(this.text == null) { accumulateText(); } this.text.add(new SAXText(text, type)); }
/** * Add a text object to this instance. * <p/> * Utility method, userd mainly for testing. * * @param text The text to be added. * @param type The text type. * @see #accumulateText() * @see TextConsumer */ public void addText (String text, TextType type) { if(this.text == null) { accumulateText(); } this.text.add(new SAXText(text, type)); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { if (!isAttribute) { // It's not an attribute binding i.e. it's the element's text. // Turn on Text Accumulation... element.accumulateText(); } if(beanWiring) { bindBeanValue(executionContext); } else if(isAttribute) { // Bind attribute (i.e. selectors with '@' prefix) values on the visitBefore... bindSaxDataValue(element, executionContext); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { 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... bindSaxDataValue(element, executionContext); } else if(expressionEvaluator == null || expressionHasDataVariable) { // It's not a wiring, attribute or expression binding => it's the element's text. // Turn on Text Accumulation... element.accumulateText(); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { 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... bindSaxDataValue(element, executionContext); } else if(expressionEvaluator == null || expressionHasDataVariable) { // It's not a wiring, attribute or expression binding => it's the element's text. // Turn on Text Accumulation... element.accumulateText(); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { 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... bindSaxDataValue(element, executionContext); } else if(expressionEvaluator == null || expressionHasDataVariable) { // It's not a wiring, attribute or expression binding => it's the element's text. // 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(); } }
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(); } }