# 22. Virtuoso Functions Guide - or

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
and
append
assign
avg
boolean
ceiling
concat
contains
count
create-attribute
create-comment
create-element
create-pi
current
distinct
doc
document
document-literal
empty
ends-with
every
except
false
filter
floor
fn:collection
for
format-number
function-available
generate-id
id
if
intersect
is_after()
is_before()
key
lang
last
let
list()
local-name
max
min
name
namespace-uri
normalize-space
not
number
or
position
processxquery
processxslt
processxsql
progn()
replace()
round
serialize
shallow
some
starts-with
string
string-length
substring
substring-after
substring-before
sum
system-property
text_contains()
translate
true
tuple()
union
unordered
unparsed-entity-uri
urlify
xmlview
Functions Index

## or

Returns true if a value of some argument is true, otherwise returns false.
boolean or ( val1 boolean, val2 boolean, ... , valN boolean);
Description

This function calculates values of its arguments, from left to right. If the value of calculated parameter is true, the function returns true immediately, without calculating of the remaining parameters. If the list of arguments ends without any true value calculated, the function returns false (Thus it returns true when called without arguments).

The name of this function is the same as name of "or" XPATH and XQUERY operator. Thus it must be surronded bu double quotes when used in XPATH or XQUERY expressions. Moreover, this function is not a part of XPATH standard, so it cannot be used if portability is important.

Parameters
valI – Value of boolean expression argument
Return Types

boolean

Examples
Control over sequence of search operations

If two conditions must be checked, where one is simple and another is hard to calculate, then "and" may be used to calculate second condition only if first is false, to reduce average time of processing

    "or" ( empty(authors),
      document(concat('http://www.lib20.org/findxml.cgi?isbn=',@isbn))/status[@outofprint='YES'] )

See Also

not and some