Files
release11-tools/Frontend/tools/xslt.html
2023-03-02 11:49:21 +01:00

1252 lines
68 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<!-- <link rel="stylesheet" href="styles.css"> -->
<link rel="stylesheet" href="../assets/css/tools/r11form.css">
<script src="../assets/scripts/tools/scripts.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
</head>
<body onload="init();">
<div class="container">
<div id="tool" class="tool rwd-expandable">
<div class="tool-context">
<div class="headline">
<h1>Online XSLT tester</h1>
</div>
<div class="display-space-between">
<div style="text-align: center;">
<label for="processors">Select XSLT processor:</label>
<select name="processors" id="processors">
<option value="saxon">Saxon</option>
<option value="xalan">Xalan</option>
<option value="libxml">libXML</option>
</select>
</div>
<div>
<button class="action-button active" id="clearXMLButton" style="padding: 3px 10px;"
onclick="clearDataField()">Clear</button>
<button class="action-button active" id="prettyXMLButton" style="padding: 3px 10px;"
onclick="performFormatRequest('prettify', true, 'xmlArea', 'xmlArea')">Format XML</button>
<button class="action-button active" id="defaultXMLButton" style="padding: 3px 10px;"
onclick="fillDefaultXML(this)">Insert default XML</button>
</div>
</div>
<span id="processorTooltipInfo">procInfo</span><br>
<br>
<label for="xmlArea"><b>Insert your XML:</b></label>
<textarea id="xmlArea" name="xmlArea" rows="15"
class="textarea-300 bordered-field vertically-resizeable max-width"
onblur="setDefaultContent(this, 'Insert XML here');"
onfocus="clearDefaultContent(this, 'Insert XML here');"></textarea>
<br><br>
<label for="transformArea"><b>Insert your XSLT:</b></label>
<textarea id="transformArea" name="transformArea" rows="15"
class="textarea-300 bordered-field vertically-resizeable max-width"
onblur="setDefaultContent(this, 'Insert XSLT here');"
onfocus="clearDefaultContent(this, 'Insert XSLT here');"></textarea>
<br>
<button id="requestButton" class="max-width block-label action-button active"
onclick="performRequest('xslt', true, true)">Execute XSLT transform</button>
<br><br>
<label for="resultArea"><b>Transform result:<span id="procinfo"></span></b></label>
<textarea disabled id="resultArea" name="resultArea" rows="10"
class="textarea-300 bordered-field vertically-resizeable max-width" style="margin-bottom: 50px;" ></textarea>
</div>
</div>
<div class="tooltip tooltip-window rwd-hideable">
<h2>What is XSLT?</h2>
<p>XSLT is a language for transforming XML documents into other documents such as XML, HTML and many
other.<br></p>
<span id="collapsible-lists">
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none" style="border: none">XSLT 1.0 vs
2.0
vs 3.0</button>
<div class="content">
<p><b>XSLT 2.0 introduced a host of new features:</b><br>
- Strong typing and all XSD types<br>
- The ability to define and write own functions<br>
- node-set() - replaces XSLT's 1.0 Result Tree Fragment, creating fully functional tree<br>
- New functions and operators:<br>
- - XPath 2.0<br>
- - String processing and regular expressions<br>
- - Grouping (for-each-group function)
- - String processing<br>
- - Sequence type<br>
</p>
<p><b>XSLT 3.0 further improved the formula:</b><br>
- Streaming tranformations (previously file had to be loaded to memory to be processed)<br>
- Packages - improve the modularity of large stylesheets<br>
- Improved error handling (for example <code>&lt;xsl:try&gt;</code>)<br>
- Support for maps and arrays, enabling XSLT to handle JSON as well as XML<br>
- Functions can now be arguments to other (higher-order) functions
</p>
</div>
</div>
<h2><span id="tooltipFunctionInfo">XSLT 1.0, 2.0 & 3.0 functions</span></h2>
<!-- Cut here -->
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Templates</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:template</code></a>
<div class="content">
<div class="section">
defines a set of rules to be applied to specified node. <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Defining-Template-Rules" class="hyperlink" target="_blank">Defining-Template-Rules</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:apply-templates</code></a>
<div class="content">
<div class="section">
applies a template rule to the current element or to element's child nodes. <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Applying-Template-Rules" class="hyperlink" target="_blank">Applying-Template-Rules</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:apply-imports</code></a>
<div class="content">
<div class="section">
Applies a template rule from an imported style sheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#apply-imports" class="hyperlink" target="_blank">#apply-imports</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:apply-templates</code></a>
<div class="content">
<div class="section">
Applies a template rule to the current element or to the current element's child nodes
<br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Applying-Template-Rules" class="hyperlink" target="_blank">Applying-Template-Rules</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:call-template</code></a>
<div class="content">
<div class="section">
Calls a named template <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#named-templates" class="hyperlink" target="_blank">#named-templates</code></a>
</div>
</div>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:next-match</code></a>
<div class="content">
<div class="section">
overrides another template rule (considers all other template rules of lower import
precedence/priority) <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-next-match" class="hyperlink" target="_blank">#element-next-match</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:mode</code></a>
<div class="content">
<div class="section">
Allows properties of a mode to be defined <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-mode" class="hyperlink" target="_blank">#element-mode</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:override</code></a>
<div class="content">
<div class="section">
Allows using package to override selected components from a used package <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-override" class="hyperlink" target="_blank">#element-override</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:package</code></a>
<div class="content">
<div class="section">
Defines a set of stylesheet modules that can be compiled as a unit <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-package" class="hyperlink" target="_blank">#element-package</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:accept</code></a>
<div class="content">
<div class="section">
Allows a package to restrict the visibility of components exposed by a package <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-30/#element-accept" class="hyperlink" target="_blank">#element-accept</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:global-context-item</code></a>
<div class="content">
<div class="section">
Declares whether a global context item is required, and if so, to declare its
required type <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-global-context-item" class="hyperlink" target="_blank">#element-global-context-item</code></a>
</div>
</div>
</span>
</div>
</div>
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Repetition and conditional
processing</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:for-each</code></a>
<div class="content">
<div class="section">
Loops through each node in a specified node set <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#for-each" class="hyperlink" target="_blank">#for-each</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:if</code></a>
<div class="content">
<div class="section">
Contains a template that will be applied only if a specified condition is true <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Conditional-Processing" class="hyperlink" target="_blank">Conditional-Processing</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:choose</code></a>
<div class="content">
<div class="section">
Used in conjunction with &lt <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose" class="hyperlink" target="_blank">Conditional-Processing-with-xsl:choose</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:when</code></a>
<div class="content">
<div class="section">
Specifies an action for the &lt <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose" class="hyperlink" target="_blank">Conditional-Processing-with-xsl:choose</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:otherwise</code></a>
<div class="content">
<div class="section">
Specifies a default action for the &lt <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Conditional-Processing-with-xsl:choose" class="hyperlink" target="_blank">Conditional-Processing-with-xsl:choose</code></a>
</div>
</div>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:for-each-group</code></a>
<div class="content">
<div class="section">
Groups elements and performs operations once for each group <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-for-each-group" class="hyperlink" target="_blank">#element-for-each-group</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:iterate</code></a>
<div class="content">
<div class="section">
Used to iterate over a sequence, with the option to set parameters for use in the
next iteration <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-iterate" class="hyperlink" target="_blank">#element-iterate</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:break</code></a>
<div class="content">
<div class="section">
Causes premature completion before the entire input sequence has been processed <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-break" class="hyperlink" target="_blank">#element-break</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:next-iteration</code></a>
<div class="content">
<div class="section">
The contents are a set of xsl:with-param elements defining the values of the
iteration parameters to be used on the next iteration <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-next-iteration" class="hyperlink" target="_blank">#element-next-iteration</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:on-completion</code></a>
<div class="content">
<div class="section">
Defines processing to be carried out when the input sequence is exhausted <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-on-completion" class="hyperlink" target="_blank">#element-on-completion</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:fork</code></a>
<div class="content">
<div class="section">
The result of the xsl:fork instruction is the sequence formed by concatenating the
results of evaluating each of its contained instructions, in order <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-fork" class="hyperlink" target="_blank">#element-fork</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:on-empty</code></a>
<div class="content">
<div class="section">
Outputs the enclosed content only if the containing sequence generates no "ordinary"
content <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-on-empty" class="hyperlink" target="_blank">#element-on-empty</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:on-non-empty</code></a>
<div class="content">
<div class="section">
Outputs the enclosed content only if the containing sequence also generates
"ordinary" content <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-on-non-empty" class="hyperlink" target="_blank">#element-on-non-empty</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:try</code></a>
<div class="content">
<div class="section">
Allows recovery from dynamic errors occurring within the expression it wraps <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-try" class="hyperlink" target="_blank">#element-try</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:catch</code></a>
<div class="content">
<div class="section">
http://www.w3.org/TR/xslt-30/#element-catchIn conjunction with xsl:try, handles
dynamic errors <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-catchIn conjunction with xsl:try, handles dynamic errors" class="hyperlink" target="_blank">#element-catchIn conjunction with xsl:try, handles dynamic errors</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:context-item</code></a>
<div class="content">
<div class="section">
Used to declare the initial context item for a template <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-context-item" class="hyperlink" target="_blank">#element-context-item</code></a>
</div>
</div>
</span>
</div>
</div>
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Creating result tree</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:attribute</code></a>
<div class="content">
<div class="section">
Adds an attribute <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#creating-attributes" class="hyperlink" target="_blank">#creating-attributes</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:attribute-set</code></a>
<div class="content">
<div class="section">
Defines a named set of attributes <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#attribute-sets" class="hyperlink" target="_blank">#attribute-sets</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:copy</code></a>
<div class="content">
<div class="section">
Creates a copy of the current node (without child nodes and attributes) <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#copying" class="hyperlink" target="_blank">#copying</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:number</code></a>
<div class="content">
<div class="section">
Determines the integer position of the current node and formats a number <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#number" class="hyperlink" target="_blank">#number</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:value-of</code></a>
<div class="content">
<div class="section">
Extracts the value of a selected node <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#value-of" class="hyperlink" target="_blank">#value-of</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:text</code></a>
<div class="content">
<div class="section">
Writes literal text to the output <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Creating-Text" class="hyperlink" target="_blank">Creating-Text</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:comment</code></a>
<div class="content">
<div class="section">
Creates a comment node in the result tree <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Creating-Comments" class="hyperlink" target="_blank">Creating-Comments</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:processing-instruction</code></a>
<div class="content">
<div class="section">
Writes a processing instruction to the output <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Creating-Processing-Instructions" class="hyperlink" target="_blank">Creating-Processing-Instructions</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:key</code></a>
<div class="content">
<div class="section">
Declares a named key that can be used in the style sheet with the key() function <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#key" class="hyperlink" target="_blank">#key</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:decimal-format</code></a>
<div class="content">
<div class="section">
Defines the characters and symbols to be used when converting numbers into strings, with
the format-number() function <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#format-number" class="hyperlink" target="_blank">#format-number</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:preserve-space</code></a>
<div class="content">
<div class="section">
Defines the elements for which white space should be preserved <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#strip" class="hyperlink" target="_blank">#strip</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:strip-space</code></a>
<div class="content">
<div class="section">
Defines the elements for which white space should be removed <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#strip" class="hyperlink" target="_blank">#strip</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:sort</code></a>
<div class="content">
<div class="section">
Sorts the output <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#sorting" class="hyperlink" target="_blank">#sorting</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:output</code></a>
<div class="content">
<div class="section">
Defines the format of the output document <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#output" class="hyperlink" target="_blank">#output</code></a>
</div>
</div>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:for-each-group</code></a>
<div class="content">
<div class="section">
Sorts given sequence <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-perform-sort" class="hyperlink" target="_blank">#element-perform-sort</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:result-document</code></a>
<div class="content">
<div class="section">
Creates a final result tree <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-result-document" class="hyperlink" target="_blank">#element-result-document</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:character-map</code></a>
<div class="content">
<div class="section">
Allows a specific character appearing in the final result tree to be substituted by
a specified string of characters <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-character-map" class="hyperlink" target="_blank">#element-character-map</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:output-character</code></a>
<div class="content">
<div class="section">
Defines characters and their replacements to be used by character-map <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-character-map" class="hyperlink" target="_blank">#element-character-map</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:merge</code></a>
<div class="content">
<div class="section">
Merges two or more pre-sorted input files <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-merge" class="hyperlink" target="_blank">#element-merge</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:merge-action</code></a>
<div class="content">
<div class="section">
Defines action to be carried out on each merged group <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-merge-action" class="hyperlink" target="_blank">#element-merge-action</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:merge-key</code></a>
<div class="content">
<div class="section">
Used to define the merge keys on which the input sequences are sorted <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-merge-key" class="hyperlink" target="_blank">#element-merge-key</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:merge-source</code></a>
<div class="content">
<div class="section">
Describes the input source for an xsl:merge instruction <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-merge-source" class="hyperlink" target="_blank">#element-merge-source</code></a>
</div>
</div>
</span>
</div>
</div>
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Stylesheet structure</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:stylesheet</code></a>
<div class="content">
<div class="section">
Defines the root element of a style sheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#stylesheet-element" class="hyperlink" target="_blank">#stylesheet-element</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:transform</code></a>
<div class="content">
<div class="section">
Defines the root element of a style sheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#stylesheet-element" class="hyperlink" target="_blank">#stylesheet-element</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:import</code></a>
<div class="content">
<div class="section">
Imports the contents of one style sheet into another. Note: An imported style sheet has
lower precedence than the importing style sheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#import" class="hyperlink" target="_blank">#import</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:include</code></a>
<div class="content">
<div class="section">
Includes the contents of one style sheet into another. Note: An included style sheet has
the same precedence as the including style sheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#include" class="hyperlink" target="_blank">#include</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:namespace-alias</code></a>
<div class="content">
<div class="section">
Replaces a namespace in the style sheet to a different namespace in the output <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#literal-result-element" class="hyperlink" target="_blank">#literal-result-element</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:element</code></a>
<div class="content">
<div class="section">
Creates an element node in the output document <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Creating-Elements-with-xsl:element" class="hyperlink" target="_blank">Creating-Elements-with-xsl:element</code></a>
</div>
</div>
</div>
</div>
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Variables and
parameters</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:param</code></a>
<div class="content">
<div class="section">
Declares a local or global parameter <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#variables" class="hyperlink" target="_blank">#variables</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:variable</code></a>
<div class="content">
<div class="section">
Declares a local or global variable <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#variables" class="hyperlink" target="_blank">#variables</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:with-param</code></a>
<div class="content">
<div class="section">
Defines the value of a parameter to be passed into a template <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#section-Passing-Parameters-to-Templates" class="hyperlink" target="_blank">Passing-Parameters-to-Templates</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:copy-of</code></a>
<div class="content">
<div class="section">
Creates a copy of the current node (with child nodes and attributes) <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#copy-of" class="hyperlink" target="_blank">#copy-of</code></a>
</div>
</div>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:document</code></a>
<div class="content">
<div class="section">
Creates a new document node <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-document" class="hyperlink" target="_blank">#element-document</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:namespace</code></a>
<div class="content">
<div class="section">
Creates a namespace node <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-namespace" class="hyperlink" target="_blank">#element-namespace</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:namespace-alias</code></a>
<div class="content">
<div class="section">
Declares that a literal namespace URI is being used as an alias for a target
namespace URI <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-namespace-alias" class="hyperlink" target="_blank">#element-namespace-alias</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:sequence</code></a>
<div class="content">
<div class="section">
Constructs a sequence of nodes and/or atomic values <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-sequence" class="hyperlink" target="_blank">#element-sequence</code></a>
</div>
</div>
</span>
</div>
</div>
<span name="collapse20">
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Regular expressions</button>
<div class="content">
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:analyze-string</code></a>
<div class="content">
<div class="section">
Identifies substrings that match given regex <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-analyze-string" class="hyperlink" target="_blank">#element-analyze-string</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:matching-substring</code></a>
<div class="content">
<div class="section">
Used in conjunction with analize-string, returns matching substrings <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-analyze-string" class="hyperlink" target="_blank">#element-analyze-string</code></a>
</div>
</div>
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:non-matching-substring</code></a>
<div class="content">
<div class="section">
Used in conjunction with analize-string, returns substrings that didn't match the regex <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-analyze-string" class="hyperlink" target="_blank">#element-analyze-string</code></a>
</div>
</div>
</span>
</div>
</div>
<span name="collapse20">
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Callable</button>
<div class="content">
</span>
<span name="collapse20">
[2.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:function</code></a>
<div class="content">
<div class="section">
Declares a function that can be called from any XPath expression in the stylesheet <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt20/#element-function" class="hyperlink" target="_blank">#element-function</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:evaluate</code></a>
<div class="content">
<div class="section">
Allows dynamic evaluation of XPath expressions from a string <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-evaluate" class="hyperlink" target="_blank">#element-evaluate</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:assert</code></a>
<div class="content">
<div class="section">
Asserts a XPath expression, optionally throwing a dynamic error <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-assert" class="hyperlink" target="_blank">#element-assert</code></a>
</div>
</div>
</span>
</div>
</div>
<div class="collapsible">
<button class="section-button collapseTrigger" style="border: none">Other elements</button>
<div class="content">
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:message</code></a>
<div class="content">
<div class="section">
Writes a message to the output (used to report errors) <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#message" class="hyperlink" target="_blank">#message</code></a>
</div>
</div>
[1.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:fallback</code></a>
<div class="content">
<div class="section">
Specifies an alternate code to run if the processor does not support an XSLT element <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-10/#fallback" class="hyperlink" target="_blank">#fallback</code></a>
</div>
</div>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:map</code></a>
<div class="content">
<div class="section">
Used to construct a new map <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-map" class="hyperlink" target="_blank">#element-map</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:map-entry</code></a>
<div class="content">
<div class="section">
Used to construct a singleton map (one key and one value) <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-map-entry" class="hyperlink" target="_blank">#element-map-entry</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:expose</code></a>
<div class="content">
<div class="section">
Used to modify the visibility of selected components within a package <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-expose" class="hyperlink" target="_blank">#element-expose</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:accumulator</code></a>
<div class="content">
<div class="section">
Defines a rule that is to be applied while the document is being sequentially processed <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-accumulator" class="hyperlink" target="_blank">#element-accumulator</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:accumulator-rule</code></a>
<div class="content">
<div class="section">
Defines a rule for an xsl:accumulator <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-accumulator-rule" class="hyperlink" target="_blank">#element-accumulator-rule</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:source-document</code></a>
<div class="content">
<div class="section">
Initiates streamed or unstreamed processing of a source document <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-source-document" class="hyperlink" target="_blank">#element-source-document</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:use-package</code></a>
<div class="content">
<div class="section">
http://www.w3.org/TR/xslt-30/#element-use-package <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-use-package" class="hyperlink" target="_blank">#element-use-package</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:where-populated</code></a>
<div class="content">
<div class="section">
Allows conditional content construction to be made streamable <br>
<br>
<code>W3C Documentation reference: <a href="http://www.w3.org/TR/xslt-30/#element-where-populated" class="hyperlink" target="_blank">#element-where-populated</code></a>
</div>
</div>
</span>
<span name="collapse30">
[3.0] <a href="#" onClick="return false;"
class="hyperlink collapsible collapsibleMini collapseTrigger"><code>xsl:accept</code></a>
<div class="content">
<div class="section">
Allows a package to restrict the visibility of components exposed by a package that it uses <br>
<br>
<code>W3C Documentation reference: <a href="https://www.w3.org/TR/xslt-30/#element-accept" class="hyperlink" target="_blank">#element-accept</code></a>
</div>
</div>
</span>
</div>
<!-- Cut END -->
</div>
</div>
</div>
<!-- <script>
function getVersion() {
return document.getElementById("versions").value;
}
</script> -->
<script>
function processTooltip() {
console.log("processTooltip");
if (getProcInfo() == "xalan" || getProcInfo() == "libxml") {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0";
hideList(document.getElementsByName("collapse30"));
} else {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0, 2.0 & 3.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT up to 3.0";
showList(document.getElementsByName("collapse30"));
}
}
</script>
<script>
function getProcessor() {
return document.getElementById("processors").value;
}
</script>
<script>
function getVersion() {
if (getProcInfo() == "xalan") {
return "1.0";
} else {
return "3.0";
}
}
</script>
<script>
function getProcInfo() {
var processVariables = document.getElementById("processors").value;// + "&version=" + document.getElementById("versions").value;
return processVariables;
}
</script>
<script>
var triggerList = document.getElementsByClassName("collapseTrigger");
for (i = 0; i < triggerList.length; i++) {
console.log("trigger connected");
triggerList[i].addEventListener("click", function () {
console.log("click");
var collapsible = this.parentElement;
var collapsibleData = this.nextElementSibling;
if (collapsibleData.style.maxHeight > "0px") {
collapsibleData.style.maxHeight = "0px";
this.classList.toggle("active", false);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", false);
}
var subLists1 = collapsibleData.getElementsByClassName("content");
var subLists2 = collapsibleData.getElementsByClassName("active");
for (j = 0; j < subLists1.length; j++) {
subLists1[j].style.maxHeight = "0px";
}
for (j = 0; j < subLists2.length; j++) {
subLists2[j].classList.toggle("active", false);
}
} else {
collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px";
this.classList.toggle("active", true);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", true);
} else {
var parentContent = this.closest(".content");
parentContent.style.maxHeight = (parentContent.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 XSLT here');
console.log("init");
// refreshTooltip();
processTooltip();
tool.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" && targetID !== "versions") {
return;
}
processTooltip();
})
tool.addEventListener('change', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "processors") {
return;
}
processTooltip();
})
}
</script>
</body>
</html>