Beispiel #1
0
  public void evaluate(
      EvaluationHelper evaluationHelper, AttributesImpl attributesImpl, ZPTDocument zptDocument)
      throws EvaluationException {

    for (KeyValuePair<ZPTExpression> attribute : this.attributes) {

      ZPTExpression zptExpression = null;
      try {
        String qualifiedName = attribute.getKey();
        zptExpression = attribute.getValue();
        Object value = zptExpression.evaluate(evaluationHelper);

        AttributesUtils.addAttribute(qualifiedName, value, attributesImpl, zptDocument);

      } catch (EvaluationException e) {
        e.setInfo(zptExpression.getStringExpression(), this.getQualifiedName());
        throw e;

      } catch (Exception e) {
        EvaluationException e2 = new EvaluationException(e);
        e2.setInfo(zptExpression.getStringExpression(), this.getQualifiedName());
        throw e2;
      }
    }
  }
Beispiel #2
0
 @Override
 public String getValue() {
   return AttributesUtils.getStringFromDefinitions(this.attributes);
 }
Beispiel #3
0
 public TALAttributes(String namespaceURI, String expression) throws PageTemplateException {
   super(namespaceURI);
   this.attributes = AttributesUtils.getDefinitions(expression);
 }