blob: ce4ff84bbd7a0237547dab588e82874ddb9918e3 [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>And, Or Expressions</title><link href="book.css" rel="stylesheet" type="text/css"><link href="../book.css" rel="stylesheet" type="text/css"><meta content="DocBook XSL Stylesheets V1.74.0" name="generator"><link rel="home" href="index.html" title="XPath 2.0 Processor User Manual"><link rel="up" href="ch02s03.html" title="How to use the XPath 2.0 grammar with PsychoPath"><link rel="prev" href="ch02s03s09.html" title="Quantified Expressions"><link rel="next" href="ch02s03s11.html" title="SequenceType Matching Expressions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="And.2C_Or_Expressions"></a>And, Or Expressions</h3></div></div></div><p>The expression <span class="italic">E1 and E2</span>
returns true if the effective boolean values of E1 and E2 are both
true. The expression <span class="italic">E1 or E2</span>
returns true if the effective boolean values of either or both of E1
and E2 are true.</p><p><pre class="programlisting"> (for a truth table) 1 and 1</pre></p><p><span class="bold"><strong>result:</strong></span></p><div class="orderedlist"><ol type="1"><li><p>xs:boolean: true</p></li></ol></div><p><pre class="programlisting">1 and 0</pre></p><p> <span class="bold"><strong>result:</strong></span></p><div class="orderedlist"><ol type="1"><li><p>xs:boolean: false</p></li></ol></div><p><pre class="programlisting">1 or 0</pre></p><p> <span class="bold"><strong>result:</strong></span></p><div class="orderedlist"><ol type="1"><li><p>xs:boolean: true</p></li></ol></div><p><pre class="programlisting">0 or 1</pre></p><p> <span class="bold"><strong>result:</strong></span></p><div class="orderedlist"><ol type="1"><li><p>xs:boolean: true</p></li></ol></div><p></p></div></body></html>