5 <script id=o_xml
type=
"text/plain"><?xml version=
"1.0" encoding=
"UTF-8"?>
8 <script id=o_xslt
type=
"text/plain"><?xml version=
"1.0" encoding=
"UTF-8"?>
9 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
10 <xsl:variable name=
"var_1">
11 <xsl:for-each select=
"/">
12 <xsl:value-of select=
"count()"/>
15 <xsl:template match=
"/">
16 <xsl:value-of select=
"//*[1 = $var_1]"/>
21 window
.onload = function(){
22 let doc
= new DOMParser(), proc
= new XSLTProcessor();
23 proc
.importStylesheet(doc
.parseFromString(document
.getElementById('o_xslt').textContent
, "text/xml"));
24 proc
.transformToDocument(doc
.parseFromString(document
.getElementById('o_xml').textContent
, "text/xml"));