Example #1
0
  /**
   * AND two expressions and return the boolean result. Override superclass method for optimization
   * purposes.
   *
   * @param xctxt The runtime execution context.
   * @return {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_TRUE} or {@link
   *     com.sun.org.apache.xpath.internal.objects.XBoolean#S_FALSE}.
   * @throws javax.xml.transform.TransformerException
   */
  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException {

    XObject expr1 = m_left.execute(xctxt);

    if (expr1.bool()) {
      XObject expr2 = m_right.execute(xctxt);

      return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
    } else return XBoolean.S_FALSE;
  }