![]() ![]() ![]() ![]() ![]() ![]() |
This chapter provides descriptions of the XQuery boolean operators available in the mapper functionality of WebLogic Workshop. You use the mapper functionality to generate queries and to edit these queries to add invocations to these provided XQuery operators. To learn more, see Invoking Functions or Operators in a Query.
In addition to the XQuery functions and operators available in the mapper functionality, a larger set functions and operators is provided. You can manually add invocations to these functions and operators to queries in the Source View of the mapper functionality. For a list of these additional functions and operators, see the XQuery 1.0 and XPath 2.0 Functions and Operators - W3C Working Draft 16 August 2002 available from the W3C Web site at the following URL:
http://www.w3.org/TR/2002/WD-xquery-operators-20020816
This section lists the boolean operators available from the mapper functionality:
If $boolean-var1
has the same boolean value as $boolean-var2
, the boolean value: true is returned. If $boolean-var1
does not have the same boolean value as $boolean-var
, the boolean value: false
is returned. For example: op:boolean-equal(xf:true(), xf:false())
returns the boolean value: false
.
This operator is equilavant to the eg
operator with boolean values.
op:
boolean-equal(
xs:
boolean $boolean-var1, xs:boolean $boolean-var2) —> xs:boolean
Returns the boolean value: true
if $boolean-var1
is equal to the boolean value of $boolean-var2
.
Returns the boolean value: false
if $boolean-var1
is not equal to the boolean value of $boolean-var2
.
Invoking op:boolean-equal(xf:false(),xf:true()) returns the boolean value: false, as shown in the following example query:
op:boolean-equal(xf:false(),xf:true())
The preceding query generates the following result:
<boolean-equal>false</boolean-equal>
Invoking op:boolean-equal(xf:false(),xf:false()) returns the boolean value: true
, as shown in the following example query:
op:boolean-equal(xf:false(),xf:false())
The preceding query generates the following result:
<boolean-equal>true</boolean-equal>
W3C boolean-equal operator description.
W3C boolean function description
If $boolean-var1
equals the boolean value: false
and $boolean-var2
equals the boolean value: true
, the boolean value: true
is returned. For all other cases, the boolean value: false
is returned as shown in the following table.
This operator is equivalent to the lt operator with boolean values.
op:
boolean-less-than(
xs:
boolean $boolean-var1, xs:boolean $boolean-var2) —>xs: boolean
Returns the boolean value: true
if $boolean-var1
is less than boolean value of $boolean-var2
. For example: if $boolean-var1
is equal to false
and $boolean-var2
is equal to true
, the boolean value true
is returned.
Returns the boolean value: false
for all other cases.
Invoking op:boolean-less-than(xf:false(),xf:true()) returns the boolean value: true
, as shown in the following example query:
op:boolean-less-than(xf:false(),xf:true())
The preceding query generates the following result:
<boolean-less-than>true</boolean-less-than>
Invoking op:boolean-less-than(xf:true(),xf:false()) returns the boolean value: false
, as shown in the following example query:
op:boolean-less-than(xf:true(),xf:false())
The preceding query generates the following result:
<boolean-less-than>false</boolean-less-than>
W3C boolean-less-than operator description.
W3C boolean function description
If $boolean-var1
equals the boolean value: true
and $boolean-var2
equals the boolean value: false
, the boolean value: true
is returned. For all other cases, the boolean value: false
is returned as shown in the following table.
This operator is equivalent to the lt operator with boolean values.
op:
boolean-greater-than(
xs:
boolean $boolean-var1, xs:boolean $boolean-var2) —> xs:boolean
Returns the boolean value: true
if $boolean-var1
is greater than boolean value of $boolean-var2
. For example: if $boolean-var1
is equal to true
and $boolean-var2
is equal to false
, the boolean value true
is returned.
Returns the boolean value: false
for all other cases.
Invoking op:boolean-greater-than(xf:true(), xf:false()) returns the boolean value: true
, as shown in the following example query:
op:boolean-greater-than(xf:true(),xf:false())
The preceding query generates the following result:
<boolean-greater-than>true</boolean-greater-than>
Invoking op:boolean-greater-than(xf:false(),xf:true()) returns the boolean value: false
, as shown in the following example query:
op:boolean-greater-than(xf:false(), xf:true())
The preceding query generates the following result:
<boolean-greater-than>false</boolean-greater-than>
W3C boolean-greater-than operator description.
W3C boolean function description
![]() ![]() ![]() |