Added descriptions for boolean

This commit is contained in:
2023-03-06 12:40:37 +01:00
parent a3d781f477
commit 6aa0faf18d

View File

@@ -342,6 +342,133 @@
</div>
</div>
<div class="collapsible">
<span>
<button class="section-button collapseTrigger" style="border: none">Boolean</button>
</span>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:boolean(object)</code></a>
<div class="content">
<div class="section">
The boolean function converts its argument to a boolean as follows:
<ul>
<li>a number is true if and only if it is neither positive or negative zero nor NaN</li>
<li>a node-set is true if and only if it is non-empty</li>
<li>a string is true if and only if its length is non-zero</li>
<li>an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type</li>
</ul>
<b>Arguments and return type:</b>
<table class="table-doc">
<tr>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>boolean</td>
<td>The object to convert to a boolean</td>
</tr>
</table><b>Examples: </b><br>
<table class="table-doc">
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<tr>
<td>boolean("Release11")</td>
<td>true</td>
</tr>
<tr>
<td>boolean("")</td>
<td>false</td>
</tr>
</table><br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#function-boolean" class="hyperlink" target="_blank">String-Functions</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:not()</code></a>
<div class="content">
<div class="section">
The not function returns true if its argument is false, and false otherwise. <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#function-not" class="hyperlink" target="_blank">String-Functions</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:true()</code></a>
<div class="content">
<div class="section">
The true function returns true. <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#function-true" class="hyperlink" target="_blank">String-Functions</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:false()</code></a>
<div class="content">
<div class="section">
The true function returns false. <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#function-false" class="hyperlink" target="_blank">String-Functions</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>fn:lang(string)</code></a>
<div class="content">
<div class="section">
The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang attribute on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang returns false. If there is such an attribute, then lang returns true if the attribute value is equal to the argument ignoring case, or if there is some suffix starting with - such that the attribute value is equal to the argument ignoring that suffix of the attribute value and ignoring case. For example, lang("en") would return true if the context node is any of these five elements: <br>
<code><para xml:lang="en"/>
<div xml:lang="en"><para/></div>
<para xml:lang="EN"/>
<para xml:lang="en-us"/></code>
<b>Arguments and return type:</b>
<table class="table-doc">
<tr>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>string</td>
<td>String to be searched</td>
</tr>
<tr>
<td>string</td>
<td>String to be found</td>
</tr>
</table><b>Examples: </b><br>
<table class="table-doc">
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
<tr>
<td>starts-with("aabb", "aa")</td>
<td>true</td>
</tr>
<tr>
<td>starts-with("aabb", "cc")</td>
<td>false</td>
</tr>
</table><br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" class="hyperlink" target="_blank">String-Functions</code></a>
</div>
</div>
</div>
</div>
<div class="collapsible">