Resolved #25
This commit is contained in:
		| @@ -29,9 +29,10 @@ | ||||
|                         </select> | ||||
|                         <label for="versions">XPath version:</label> | ||||
|                         <select name="versions" id="versions"> | ||||
|                             <option value="2.0">1.0/2.0</option> | ||||
|                             <option value="3.0">3.0</option> | ||||
|                             <option value="3.1">3.1</option> | ||||
|                             <option class="hideable libxml xalan"value="1.0">1.0</option> | ||||
|                             <option class="hideable saxon" value="2.0">2.0</option> | ||||
|                             <option class="hideable saxon" value="3.0">3.0</option> | ||||
|                             <option class="hideable saxon" value="3.1">3.1</option> | ||||
|                         </select> | ||||
|                     </div> | ||||
|                     <button class="action-button active" id="defaultXMLButton" style="padding: 3px 10px;" | ||||
| @@ -3067,6 +3068,31 @@ | ||||
|  | ||||
|  | ||||
|     <script> | ||||
|         function processVersionSelector() { | ||||
|             var processor = getProcessor(); | ||||
|             var hideableOptions = document.getElementsByClassName("hideable"); | ||||
|             for (let i = 0; i < hideableOptions.length; i++) { | ||||
|                hideableOptions[i].style = "display: none;"; | ||||
|             } | ||||
|             if (processor == "xalan" || processor == "libxml") { | ||||
|                 var xalanOptions = document.getElementsByClassName("xalan"); | ||||
|                 for (let i = 0; i < xalanOptions.length; i++) { | ||||
|                     xalanOptions[i].style = ""; | ||||
|                 } | ||||
|                 document.getElementById("versions").selectedIndex = 0; | ||||
|             } | ||||
|             else { | ||||
|                 var saxonOptions = document.getElementsByClassName("saxon"); | ||||
|                 for (let i = 0; i < saxonOptions.length; i++) { | ||||
|                     saxonOptions[i].style = ""; | ||||
|                 } | ||||
|                 document.getElementById("versions").selectedIndex = 3; | ||||
|                  | ||||
|             } | ||||
|             processTooltip(); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         function processTooltip() { | ||||
|             var filter = "collapse" + getVersion(); | ||||
|             var collList; | ||||
| @@ -3087,6 +3113,9 @@ | ||||
|                 hideList(document.getElementsByName("collapse30")); | ||||
|                 hideList(document.getElementsByName("collapse31")); | ||||
|             } | ||||
|  | ||||
|  | ||||
|  | ||||
|             // if (checkDefault(document.getElementById("xmlArea").value.trim()) || document.getElementById("xmlArea").value.trim() == "") { | ||||
|             //     document.getElementById("defaultXMLButton").classList.toggle("active", true); | ||||
|             // } else { | ||||
| @@ -3176,6 +3205,7 @@ | ||||
|             setDefaultContent(document.getElementById("transformArea"), 'Insert XPath expression here'); | ||||
|             console.log("init"); | ||||
|             processTooltip(); | ||||
|             processVersionSelector(); | ||||
|             tool.addEventListener('change', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
|                 var targetID = event.target.getAttribute('id'); | ||||
| @@ -3183,6 +3213,7 @@ | ||||
|                     return; | ||||
|                 } | ||||
|                 processTooltip(); | ||||
|                 processVersionSelector(); | ||||
|             }) | ||||
|             tool.addEventListener('click', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
| @@ -3191,6 +3222,7 @@ | ||||
|                     return; | ||||
|                 } | ||||
|                 processTooltip(); | ||||
|                 processVersionSelector(); | ||||
|             }) | ||||
|             tool.addEventListener('change', event => { | ||||
|                 //Check if script was called from textarea or selector | ||||
| @@ -3199,6 +3231,7 @@ | ||||
|                     return; | ||||
|                 } | ||||
|                 processTooltip(); | ||||
|                 processVersionSelector(); | ||||
|             }) | ||||
|         } | ||||
|     </script> | ||||
|   | ||||
| @@ -1131,7 +1131,7 @@ | ||||
|             console.log("processTooltip"); | ||||
|  | ||||
|  | ||||
|             if (getProcInfo() == "xalan") { | ||||
|             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")); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user