// as we may need to remove the attribute.
index = attributes.getIndex(exprAttributeURI, "expr");
if (index != -1) {
String value = attributes.getValue(index);
try {
Expression expression = parser.parse(value);
// obtain the ExpressionContext from the PipelineContext
// the ExpressionContext is needed in order to evaluate the
// expression parsed
ExpressionContext expressionContext =
pipelineContext.getExpressionContext();
// Evaluate the expression and cast to a boolean.
boolean result = PipelineExpressionHelper.fnBoolean(
expression.evaluate(
expressionContext).getSequence())
.asJavaBoolean();
if (!result) {
// The expression evaluated to false so ignore this