1 16 19 package org.apache.xpath.operations; 20 21 import org.apache.xpath.XPathContext; 22 import org.apache.xpath.objects.XBoolean; 23 import org.apache.xpath.objects.XObject; 24 25 28 public class And extends Operation 29 { 30 31 42 public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException 43 { 44 45 XObject expr1 = m_left.execute(xctxt); 46 47 if (expr1.bool()) 48 { 49 XObject expr2 = m_right.execute(xctxt); 50 51 return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE; 52 } 53 else 54 return XBoolean.S_FALSE; 55 } 56 57 66 public boolean bool(XPathContext xctxt) 67 throws javax.xml.transform.TransformerException 68 { 69 return (m_left.bool(xctxt) && m_right.bool(xctxt)); 70 } 71 72 } 73 | Popular Tags |