actual.addAttribute("",name,name,"CDATA",expression.evaluateAsString(context));
public String evaluateAsString(JellyContext context) { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); String value = expression.evaluateAsString(context); if ( value != null ) { buffer.append( value ); } } return buffer.toString(); }
public String evaluateAsString(JellyContext context) { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); String value = expression.evaluateAsString(context); if ( value != null ) { buffer.append( value ); } } return buffer.toString(); }
public String evaluateAsString(JellyContext context) { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); String value = expression.evaluateAsString(context); if ( value != null ) { buffer.append( value ); } } return buffer.toString(); }
public String evaluateAsString(JellyContext context) { StringBuffer buffer = new StringBuffer(); for (Iterator iter = expressions.iterator(); iter.hasNext(); ) { Expression expression = (Expression) iter.next(); String value = expression.evaluateAsString(context); if ( value != null ) { buffer.append( value ); } } return buffer.toString(); }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { final String text = value.evaluateAsString(context); if (text != null) { StringBuilder buf = new StringBuilder(text.length()); for (int i=0; i<text.length(); i++ ) { char ch = text.charAt(i); switch(ch) { case '<': buf.append("<"); break; case '&': buf.append("&"); break; default: buf.append(ch); } } try { output.write(buf.toString()); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException { if (var != null) { context.removeVariable( var.evaluateAsString(context) ); } else { throw new MissingAttributeException("var"); } }
/** * Adds {@link XMLOutput} to the context. */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { context.setVariable(getAttribute("var").evaluateAsString(context),output); } };
/** * Adds {@link XMLOutput} to the context. */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { context.setVariable(getAttribute("var").evaluateAsString(context),output); } };
public void doTag(XMLOutput output) throws MissingAttributeException { if (var != null) { context.removeVariable( var.evaluateAsString(context) ); } else { throw new MissingAttributeException("var"); } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException { if (var != null) { context.removeVariable( var.evaluateAsString(context) ); } else { throw new MissingAttributeException("var"); } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException { if (var != null) { context.removeVariable( var.evaluateAsString(context) ); } else { throw new MissingAttributeException("var"); } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
/** * Get the POM with all variables resolved. * * @param project * the project to resolve * @param context * the context to retrieve variables from * @return a project with no unresolved elements. * @throws Exception * if there is an error parsing the project FIXME */ private static Project getInterpolatedPOM( Project project, JellyContext context ) throws Exception { String projectString = project.getProjectAsString(); Expression e = JellyUtils.decomposeExpression( projectString, context ); String newProjectString = e.evaluateAsString( context ); // We can use a Reader and not an URL/path here to read // the POM because this is a memory model without XML entities. project = new Project( new StringReader( newProjectString ) ); return project; }
public Object evaluate(JellyContext context) { this.context = context; try { XPath xpath = new Dom4jXPath( this.xpathExpr.evaluateAsString( context ) ); xpath.setVariableContext(this); if (log.isDebugEnabled()) { log.debug( "Setting the namespace context to be: " + uris ); } xpath.setNamespaceContext( new SimpleNamespaceContext( this.uris ) ); return xpath; } catch (JaxenException e) { log.error( "Error constructing xpath", e ); } return null; }
public Object evaluate(JellyContext context) { this.context = context; try { XPath xpath = new Dom4jXPath( this.xpathExpr.evaluateAsString( context ) ); xpath.setVariableContext(this); if (log.isDebugEnabled()) { log.debug( "Setting the namespace context to be: " + uris ); } xpath.setNamespaceContext( new SimpleNamespaceContext( this.uris ) ); return xpath; } catch (JaxenException e) { log.error( "Error constructing xpath", e ); } return null; }
public Object evaluate(JellyContext context) { this.context = context; try { XPath xpath = new Dom4jXPath( this.xpathExpr.evaluateAsString( context ) ); xpath.setVariableContext(this); if (log.isDebugEnabled()) { log.debug( "Setting the namespace context to be: " + uris ); } xpath.setNamespaceContext( new SimpleNamespaceContext( this.uris ) ); return xpath; } catch (JaxenException e) { log.error( "Error constructing xpath", e ); } return null; }