1094 lines
		
	
	
		
			54 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			1094 lines
		
	
	
		
			54 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| 
 | |
| <head>
 | |
|     <link rel="stylesheet" href="../common.css">
 | |
|     <link rel="stylesheet" href="styles.css">
 | |
|     <script src="scripts.js"></script>
 | |
| </head>
 | |
| 
 | |
| <body onload="init();">
 | |
| 
 | |
|     <div id="content">
 | |
|         <div id="fields">
 | |
|             <h1>Online XPath tester <span class="versionInfo">v: 0.015</span></h1>
 | |
| 
 | |
|             <label for="processors">Select XPath processor:</label>
 | |
|             <select name="processors" id="processors">
 | |
|                 <option value="saxon">Saxon</option>
 | |
|                 <!-- <option value="xalan">Xalan</option> -->
 | |
|             </select>
 | |
|             <label for="versions">XPath version:</label>
 | |
|             <select name="versions" id="versions">
 | |
|                 <option value="1.0">1.0/2.0</option>
 | |
|                 <option value="3.0">3.0</option>
 | |
|                 <option value="3.1">3.1</option>
 | |
| 
 | |
|             </select>
 | |
| 
 | |
|             <br><br>
 | |
|             <label for="xmlArea"><b>Insert your XML:</b></label>
 | |
|             <textarea id="xmlArea" name="xmlArea" rows="15" onblur="setDefaultContent(this, 'Insert XML here');"
 | |
|                 onfocus="clearDefaultContent(this, 'Insert XML here');"></textarea>
 | |
|             <br><br>
 | |
|             <label for="transformArea"><b>Insert your XPath:</b></label>
 | |
|             <textarea id="transformArea" name="transformArea" rows="15"
 | |
|                 onblur="setDefaultContent(this, 'Insert XPath expression here');"
 | |
|                 onfocus="clearDefaultContent(this,  'Insert XPath expression here');"></textarea>
 | |
|             <br>
 | |
|             <button id="requestButton" class="btn-action" onclick="restRequest('xpathpost')">Execute XPath
 | |
|                 expression</button>
 | |
|             <br><br>
 | |
|             <label for="resultArea"><b>Transform result:<span id="procinfo"></span></b></label>
 | |
|             <textarea id="resultArea" name="resultArea" rows="10" cols="100"></textarea>
 | |
|         </div>
 | |
|         <div id="tooltip" class="tooltip">
 | |
|             <h1>What is XPath?</h1>
 | |
|             <p>XPath is a querry language used for selecting nodes from XML and processing them.<br>
 | |
|                 It may perform operations on strings, numbers and boolean values.<br></p>
 | |
| 
 | |
|             <span id="collapsibleList">
 | |
|                 <button class="collapsible" style="border: none">XPath 1.0 vs 2.0 vs 3.0 vs 3.1</button>
 | |
|                 <div class="collapsibleData">
 | |
|                     <p><b>XPath 2.0 introduced many new features XQuery-cośtam:</b><br>
 | |
|                         - Added support for all XML simple types<br>
 | |
|                         - Many new functions (trippled instruction count)<br>
 | |
|                         - All expressions evaluate to sequence<br>
 | |
|                         - Introduces conditional expressions and for-loops<br>
 | |
|                     </p>
 | |
|                     <p><b>XPath 3.0</b><br>
 | |
|                         - Dynamic function collapsible<br>
 | |
|                         - Inline functions<br>
 | |
|                         - Support for union types<br>
 | |
|                         - Introduced maps
 | |
|                     </p>
 | |
| 
 | |
|                 </div>
 | |
| 
 | |
| 
 | |
|                 <h2>XPath 1.0 functions</h2>
 | |
| 
 | |
| 
 | |
|                 <!-- Cut here -->
 | |
| 
 | |
|                 <button class="collapsible">Node-Set</button>
 | |
|                 <div class="collapsibleData">
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:last()</code></a> - Returns the position of the
 | |
|                     last node in the context list
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:position()</code></a> - Returns the position of the
 | |
|                     current context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:count(node-set)</code></a> - Returns the number of
 | |
|                     nodes in the node-set
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>node-set</td>
 | |
|                                 <td>Node-set to count nodes in</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>count(//b:book)</td>
 | |
|                                 <td>5</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>count(//person[@id>5])</td>
 | |
|                                 <td>17</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:id(object)</code></a> - Returns the element
 | |
|                     specified by it's unique id, requires DTD
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:local-name(node-set)</code></a> - Returns the
 | |
|                     local-name for the first node in the node-set
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>node-set</td>
 | |
|                                 <td>Extract first node and return its local name</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>local-name(//b:books)</td>
 | |
|                                 <td>b:book</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>local-name(//b:book)</td>
 | |
|                                 <td>b:title</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:local-name()</code></a> - Returns the local-name
 | |
|                     for the context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:namespace-uri(node-set)</code></a> - Returns the
 | |
|                     namespace-uri for the first node in the node-set
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>node-set</td>
 | |
|                                 <td>Extract first node and return the namespace URI</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>namespace-uri(//b:book)</td>
 | |
|                                 <td>http://www.book.com</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:namespace-uri()</code></a> - Returns the
 | |
|                     namespace-uri for the context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:name(node-set)</code></a> - Returns the name for
 | |
|                     the first node in the node-set
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>node-set</td>
 | |
|                                 <td>Extract first node and return QName</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>name(//b:books/*)</td>
 | |
|                                 <td>b:book</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>name(//b:book/*)</td>
 | |
|                                 <td>b:title</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:name()</code></a> - Returns the name for the
 | |
|                     context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>current context node</td>
 | |
|                                 <td>Extract first node and return QName</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" target="_parent">Node-Set-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
| 
 | |
|                 </div><button class="collapsible">String</button>
 | |
|                 <div class="collapsibleData">
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:string(object)</code></a> - Returns the string
 | |
|                     representation of the object argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>The object to convert to a string</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string((1<0))</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string(.11)</td>
 | |
|                                 <td>0.11</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:string()</code></a> - Returns a string value
 | |
|                     representation of the context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:concat(string, string, string*)</code></a> -
 | |
|                     Returns the concatenation of its arguments
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be merged</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be merged</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string*</td>
 | |
|                                 <td>any number of strings</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>concat("aa","bb")</td>
 | |
|                                 <td>aabb</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>concat("aa", 123)</td>
 | |
|                                 <td>aa123</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:starts-with(string, string)</code></a> - Returns
 | |
|                     true if the first string starts with the second string
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <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="docTable">
 | |
|                             <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>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:contains(string, string)</code></a> - Returns true
 | |
|                     if the first string contains the second string
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <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="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>contains("abc", "c")</td>
 | |
|                                 <td>true</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>contains("abc", "1")</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:substring-before(string, string)</code></a> -
 | |
|                     Returns the substring found before the first occurrence of the second argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <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 used to split</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring-before("aabbcc","bb")</td>
 | |
|                                 <td>aa</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring-before("aabbcc","c")</td>
 | |
|                                 <td>aabb</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:substring-after(string, string)</code></a> -
 | |
|                     Returns the substring found after the first occurrence of the second argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <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 used to split</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring-after("aabbcc","bb")</td>
 | |
|                                 <td>cc</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring-after("aabbcc","a")</td>
 | |
|                                 <td>abbcc</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:substring(string, number, number)</code></a> -
 | |
|                     Returns the substring starting at second argument with lenght of third argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be cut</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>integer</td>
 | |
|                                 <td>Starting position</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>integer</td>
 | |
|                                 <td>Length of the substring</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring("aabbcc", 1, 2)</td>
 | |
|                                 <td>aa</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:substring(string, number)</code></a> - Returns the
 | |
|                     substring of the first argument from the position specified by the second argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be cut</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>integer</td>
 | |
|                                 <td>Starting position</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>substring("aabbcc", 3)</td>
 | |
|                                 <td>bbcc</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:string-length(string)</code></a> - Returns the
 | |
|                     length of the string specified by the argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String of which length should be returned</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string-length("aabbcc")</td>
 | |
|                                 <td>6</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string-length("aa bb cc")</td>
 | |
|                                 <td>8</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:string-length()</code></a> - Returns the length of
 | |
|                     the string specified by the context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:normalize-space(string)</code></a> - Returns a
 | |
|                     white-space normalized string
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be normalized</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>normalize-space("aa bb cc")</td>
 | |
|                                 <td>aa bb cc</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>normalize-space("aa bb cc")</td>
 | |
|                                 <td>aa bb cc</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:normalize-space()</code></a> - Returns a
 | |
|                     white-space normalized string specified by the context-node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
| 
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:translate(string, string, string)</code></a> -
 | |
|                     Replaces characters specified by the second argument using those from the third argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>String to be edited</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>sequence of characters to be replaced</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>sequence of character to be used in replacement</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>translate("aabbcc", "ab","xz")</td>
 | |
|                                 <td>xxzzcc</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>translate("Test sequence", "e","z")</td>
 | |
|                                 <td>Tzst szquzncz</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" target="_parent">String-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
| 
 | |
|                 </div><button class="collapsible">Boolean</button>
 | |
|                 <div class="collapsibleData">
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:boolean(object)</code></a> - Returns the boolean
 | |
|                     representation of the object argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>expression</td>
 | |
|                                 <td>The expression to be evaluated</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>boolean(1>2)</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>boolean("a"="a")</td>
 | |
|                                 <td>true</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" target="_parent">Boolean-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:not(boolean)</code></a> - Returns a boolean with
 | |
|                     the opposite value of its argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>boolean</td>
 | |
|                                 <td>Boolean value to be inverted</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>not("a"="a")</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>not(true)</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" target="_parent">Boolean-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:true()</code></a> - Returns a boolean with the
 | |
|                     value of true
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td></td>
 | |
|                                 <td>Returns boolean value true</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>true()</td>
 | |
|                                 <td>true</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" target="_parent">Boolean-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:false()</code></a> - Returns a boolean with the
 | |
|                     value of false
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td></td>
 | |
|                                 <td>Returns boolean value false</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>false()</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" target="_parent">Boolean-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:lang(string)</code></a> - Returns true if the
 | |
|                     language of the context node is the same as the languag specified by the argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>string</td>
 | |
|                                 <td>Checks if the context node matches given language</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>(context: <data xml:lang="en" />): lang('en')</td>
 | |
|                                 <td>true</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>(context: <data xml:lang="en-US" />): lang('en')</td>
 | |
|                                 <td>true</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>(context: <data xml:lang="de" />): lang('en')</td>
 | |
|                                 <td>false</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" target="_parent">Boolean-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
| 
 | |
|                 </div><button class="collapsible">Number</button>
 | |
|                 <div class="collapsibleData">
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:number(object)</code></a> - Returns the number
 | |
|                     representation of the object argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>object</td>
 | |
|                                 <td>Converts given object to a number</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(true())</td>
 | |
|                                 <td>1</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(false())</td>
 | |
|                                 <td>0</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number("55")</td>
 | |
|                                 <td>55</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(" 55 ")</td>
 | |
|                                 <td>55</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:number()</code></a> - Returns the number
 | |
|                     representation of the context node
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>current context node</td>
 | |
|                                 <td>Converts current context node to a number</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(true())</td>
 | |
|                                 <td>1</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(false())</td>
 | |
|                                 <td>0</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number("55")</td>
 | |
|                                 <td>55</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number(" 55 ")</td>
 | |
|                                 <td>55</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:sum(node-set)</code></a> - Returns the sum of all
 | |
|                     nodes in the node-set
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>node-set</td>
 | |
|                                 <td>Summs each node from the set passed through number() function</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:floor(number)</code></a> - Returns the largest
 | |
|                     integer value not greater than the argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number</td>
 | |
|                                 <td>Decimal number to be converted to integer</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>floor(3.1)</td>
 | |
|                                 <td>3</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>floor(3.99)</td>
 | |
|                                 <td>3</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:ceiling(number)</code></a> - Returns the smallest
 | |
|                     integer value not less than the argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number</td>
 | |
|                                 <td>Decimal number to be converted to integer</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>ceiling(3.1)</td>
 | |
|                                 <td>4</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>ceiling(3.99)</td>
 | |
|                                 <td>4</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                     [1.0] <a href="#" onClick="return false;"
 | |
|                         class="collapsible collapsibleMini"><code>fn:round(number)</code></a> - Returns the integer
 | |
|                     value closest to the argument
 | |
|                     <div class="collapsibleData collapsibleDataMini">
 | |
|                         <b>Arguments and return type</b>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Type</th>
 | |
|                                 <th>Description</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>number</td>
 | |
|                                 <td>Decimal number to be converted to integer</td>
 | |
|                             </tr>
 | |
|                         </table><b>Examples: </b><br>
 | |
|                         <table class="docTable">
 | |
|                             <tr>
 | |
|                                 <th>Expression</th>
 | |
|                                 <th>Result</th>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>round(3.1)</td>
 | |
|                                 <td>3</td>
 | |
|                             </tr>
 | |
|                             <tr>
 | |
|                                 <td>round(3.6)</td>
 | |
|                                 <td>4</td>
 | |
|                             </tr>
 | |
|                         </table>
 | |
|                         <code>Link do dokumentacji W3C: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" target="_parent">Number-Functions</code></a>
 | |
|                     </div>
 | |
| 
 | |
|                 </div>
 | |
|                 <!-- Cut here -->
 | |
|             </span>
 | |
|         </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|     </div>
 | |
|     <script>
 | |
|         function getParams() {
 | |
|             var processVariables = document.getElementById("processors").value + "&version=" + document.getElementById("versions").value;
 | |
|             return processVariables;
 | |
|         }
 | |
|     </script>
 | |
| 
 | |
|     <script>
 | |
|         var coll = document.getElementById("collapsibleList").getElementsByClassName("collapsible");
 | |
|         var i;
 | |
|         console.log("list at init: " + coll.length)
 | |
|         for (i = 0; i < coll.length; i++) {
 | |
|             coll[i].addEventListener("click", function () {
 | |
|                 // this.classList.toggle("active");
 | |
|                 var collapsibleData = this.nextElementSibling;
 | |
|                 if (collapsibleData.style.maxHeight) {
 | |
|                     collapsibleData.style.maxHeight = null;
 | |
|                     collapsibleData.classList.toggle("active", false);
 | |
|                     var subLists = collapsibleData.getElementsByClassName("collapsibleData");
 | |
|                     for (j = 0; j < subLists.length; j++) {
 | |
|                         subLists[j].style.maxHeight = null;
 | |
|                     }
 | |
|                 } else {
 | |
|                     collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px";
 | |
|                     collapsibleData.classList.toggle("active", true);
 | |
|                     if (collapsibleData.parentElement.classList.contains("collapsibleData") && collapsibleData.parentElement.classList.contains("active")) {
 | |
|                         collapsibleData.parentElement.style.maxHeight = (collapsibleData.parentElement.scrollHeight + collapsibleData.scrollHeight) + "px";
 | |
|                     }
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|     </script>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <script>
 | |
|         function init() {
 | |
|             //Handle clicks in whole form and set info in tooltip
 | |
|             setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here');
 | |
|             setDefaultContent(document.getElementById("transformArea"), 'Insert XPath expression here');
 | |
|             console.log("init");
 | |
|             refreshTooltip();
 | |
|             content.addEventListener('click', event => {
 | |
|                 //Check if script was called from textarea or selector
 | |
|                 var targetID = event.target.getAttribute('id');
 | |
|                 if (targetID !== "processors" && targetID !== "xmlArea" && targetID !== "transformArea") {
 | |
|                     return;
 | |
|                 }
 | |
|                 refreshTooltip();
 | |
|             })
 | |
|         }
 | |
|     </script>
 | |
| 
 | |
| 
 | |
| </body>
 | |
| 
 | |
| </html> | 
