Added true, false and not boolean functions

This commit is contained in:
2023-03-30 10:38:55 +02:00
parent b0b5b103e1
commit 3f6867910e

View File

@@ -670,6 +670,81 @@
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" class="hyperlink" target="_blank">Boolean-Functions</code></a>
</div>
<a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:true()</code></a>
<div class="content">
Returns the xs:boolean value true. Equivalent to xs:boolean("1").<br><br>
<b>Return type:</b> xs:boolean<br><br>
<b>Examples: </b><br>
<table class="table-doc">
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<tr>
<td>true()</td>
<td>true</td>
</tr>
</table><br>
<a href="https://www.w3.org/TR/xquery-operators/#func-true" class="hyperlink" target="_blank"><code>W3C Documentation reference</code></a>
</div>
<a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:false()</code></a>
<div class="content">
Returns the xs:boolean value false. Equivalent to xs:boolean("0").<br><br>
<b>Return type:</b> xs:boolean<br><br>
<b>Examples: </b><br>
<table class="table-doc">
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<tr>
<td>false()</td>
<td>false</td>
</tr>
</table><br>
<a href="https://www.w3.org/TR/xquery-operators/#func-false" class="hyperlink" target="_blank"><code>W3C Documentation reference</code></a>
</div>
<a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:not()</code></a>
<div class="content">
$arg is first reduced to an effective boolean value by applying the fn:boolean() function. Returns true if the effective boolean value is false, and false if the effective boolean value is true.<br><br>
<b>Arguments and return type:</b>
<table class="table-doc">
<tr>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>item</td>
<td>$arg</td>
</tr>
</table>
<b>Return type:</b> xs:boolean<br><br>
<b>Examples: </b><br>
<table class="table-doc">
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<tr>
<td>not(false())</td>
<td>true</td>
</tr>
<tr>
<td>not(true())</td>
<td>false</td>
</tr>
</table><br>
<a href="https://www.w3.org/TR/xquery-operators/#func-false" class="hyperlink" target="_blank"><code>W3C Documentation reference</code></a>
</div>
</div>
@@ -2229,14 +2304,49 @@
<div class="content">
<a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:nilled(node)</code></a>
<div class="content">
<a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:resolve-uri()</code></a>
<div class="content">
This function enables a relative URI reference to be resolved against an absolute URI.
Returns a Boolean value indicating whether the argument node is nilled <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xpath-functions/#func-nilled" class="hyperlink" target="_blank">#func-nilled</code></a>
</div>
The first form of this function resolves $relative against the value of the base-uri property from the static context. If the base-uri property is not initialized in the static context an error is raised [err:FONS0005].<br>
If $relative is a relative URI reference, it is resolved against $base, or against the base-uri property from the static context, using an algorithm such as those described in [RFC 2396] or [RFC 3986], and the resulting absolute URI reference is returned.<br>
If $relative is an absolute URI reference, it is returned unchanged.<br>
If $relative is the empty sequence, the empty sequence is returned.<br>
If $relative is not a valid URI according to the rules of the xs:anyURI data type, or if it is not a suitable relative reference to use as input to the chosen resolution algorithm, then an error is raised [err:FORG0002].<br>
If $base is not a valid URI according to the rules of the xs:anyURI data type, if it is not a suitable URI to use as input to the chosen resolution algorithm (for example, if it is a relative URI reference, if it is a non-hierarchic URI, or if it contains a fragment identifier), then an error is raised [err:FORG0002].<br>
If the chosen resolution algorithm fails for any other reason then an error is raised [err:FORG0009].<br>
<h4>Note:</h4>
Resolving a URI does not dereference it. This is merely a syntactic operation on two character strings.
<br><br>
<b>Arguments and return type:</b>
<table class="table-doc">
<tr>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>xs:string?</td>
<td>$relative</td>
</tr>
<tr>
<td>xs:string</td>
<td>$base</td>
</tr>
</table>
<b>Return type:</b> xs:anyURI?<br><br>
<br>
<a href="https://www.w3.org/TR/xquery-operators/#func-resolve-uri" class="hyperlink" target="_blank"><code>W3C Documentation reference</code></a>
</div>
</div>