Exemplo n.º 1
0
  public String toXPathCondition() {
    String xPathExpression;
    if ("*".equals(this.xPathExpression)) {
      xPathExpression = MATCH_EVERYTHING_XPATH_CONDITIONAL;
    } else {
      xPathExpression = "local-name() = '" + this.xPathExpression + "'";
    }
    ElementFilterList elementFilterList = this.elementFilterList; // should be a copy

    for (XPathComponent other : combinatedComponents) {
      elementFilterList = other.mergeFilterAsCondition(elementFilterList);
      xPathExpression = other.mergeExpressionAsCondition(xPathExpression);
    }
    return xPathExpression;
  }