@epa-wg/custom-element 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
+ <title>DOM merge - Declarative Custom Element implementation demo</title>
6
+ <link rel="icon" href="./wc-square.svg"/>
7
+
8
+ <script type="module" src="../http-request.js"></script>
9
+ <script type="module" src="../input-text.js"></script>
10
+ <script type="module" src="../custom-element.js"></script>
11
+ <style>
12
+ @import "./demo.css";
13
+
14
+ button {
15
+ display: inline-flex;
16
+ flex-direction: column;
17
+ align-items: center;
18
+ flex: auto;
19
+ box-shadow: inset silver 0 0 1rem;
20
+ min-width: 12rem;
21
+ padding: 1rem;
22
+ color: coral;
23
+ text-shadow: 1px 1px silver;
24
+ font-weight: bolder;
25
+ }
26
+
27
+ button img {
28
+ max-height: 10vw;
29
+ min-height: 4rem;
30
+ }
31
+
32
+ table {
33
+ min-width: 16rem;
34
+ }
35
+
36
+ td {
37
+ border-bottom: 1px solid silver;
38
+ }
39
+
40
+ tfoot td {
41
+ border-bottom: none;
42
+ }
43
+
44
+ td, th {
45
+ text-align: right;
46
+ }
47
+
48
+ caption {
49
+ padding: 1rem;
50
+ font-weight: bolder;
51
+ font-family: sans-serif;
52
+ }
53
+
54
+ code {
55
+ text-align: right;
56
+ min-width: 3rem;
57
+ }
58
+
59
+ svg {
60
+ max-height: 3rem;
61
+ }
62
+ </style>
63
+ </head>
64
+ <body>
65
+
66
+ <nav>
67
+ <a href="../index.html"><h3><code>custom-element</code> demo</h3></a>
68
+ <h3>DOM merge. DCE dynamic update with focus preservation.</h3>
69
+ </nav>
70
+
71
+ <html-demo-element legend="1. Word count in textarea"
72
+ description="Counter update happens on change event(focus change).
73
+ The update should not interfere with the input">
74
+ <template>
75
+ <custom-element>
76
+ <form>
77
+ <label>
78
+ <textarea slice="text-container" >Hello world!</textarea>
79
+ <span> Word count:
80
+ {string-length(//slice/text-container/text())}
81
+ </span>
82
+ </label>
83
+ </form>
84
+ </custom-element>
85
+ </template>
86
+ </html-demo-element>
87
+ <hr/>
88
+
89
+ <html-demo-element legend="2. Word count in HTML input field"
90
+ description="Counter update happens on keyup event.
91
+ The update should not interfere with the input">
92
+ <template>
93
+ <custom-element>
94
+ <form>
95
+ <label>
96
+ <input type="text" value="Type time update" slice="txt" slice-update="keyup"/>
97
+
98
+ <span> Character count:
99
+ <b> {string-length(//slice/txt)} </b>
100
+ </span>
101
+ <span> Word count:
102
+ <b> {string-length(normalize-space(//slice/txt)) -
103
+ string-length(translate(normalize-space(//slice/txt), ' ', '')) + 1} </b>
104
+ <!-- The expression first normalizes the string by removing leading and trailing whitespace and
105
+ collapsing internal whitespace into a single space. It then subtracts the length of the string
106
+ with all spaces removed from the length of the original string,
107
+ and adds 1 to account for the last word.
108
+ -->
109
+ </span>
110
+
111
+ </label>
112
+ <p><b>txt</b> slice:</p> <blockquote> {//slice/txt} </blockquote>
113
+ </form>
114
+ </custom-element>
115
+ </template>
116
+ </html-demo-element>
117
+
118
+ <script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
119
+
120
+ </body>
121
+ </html>
@@ -0,0 +1,3 @@
1
+ <h4>embed-1.html</h4>
2
+ <custom-element tag="dce-embed-1" hidden>🖖</custom-element>
3
+ <dce-embed-1>?</dce-embed-1>
@@ -0,0 +1,178 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
+ <title>http-request Declarative Custom Element implementation demo</title>
6
+ <link rel="icon" href="./wc-square.svg" />
7
+
8
+ <script type="module" src="../http-request.js"></script>
9
+ <script type="module" src="../custom-element.js"></script>
10
+ <style>
11
+ @import "./demo.css";
12
+
13
+ button
14
+ { display: inline-flex; flex-direction: column; align-items: center; flex: auto;
15
+ box-shadow: inset silver 0 0 1rem; min-width: 12rem; padding: 1rem;
16
+ color: coral; text-shadow: 1px 1px silver; font-weight: bolder;
17
+ }
18
+ button img{ max-height: 10vw; min-height: 4rem;}
19
+ table{ min-width: 16rem; }
20
+ td{ border-bottom: 1px solid silver; }
21
+ tfoot td{ border-bottom: none; }
22
+ td,th{text-align: right; }
23
+ caption{ padding: 1rem; font-weight: bolder; font-family: sans-serif; }
24
+ code{ text-align: right; min-width: 3rem;}
25
+ svg{ max-height: 3rem;}
26
+ </style>
27
+ </head>
28
+ <body>
29
+
30
+ <nav>
31
+ <a href="../index.html"><h3><code>custom-element</code> demo</h3></a>
32
+ <h3>Loading DCE template by SRC attribute</h3>
33
+ </nav>
34
+
35
+ <html-demo-element legend="1. reference the template in page DOM"
36
+ description="should render hand wave with '👋 World!' and 'Hello World!'">
37
+ <template>
38
+ <template id="template1">
39
+ <slot> Hello </slot> World!
40
+ </template>
41
+
42
+ <custom-element tag="dce-internal" src="#template1"></custom-element>
43
+ <!-- no need for loading fallback as the template exists -->
44
+
45
+ <dce-internal>👋</dce-internal>
46
+ <dce-internal></dce-internal>
47
+ </template>
48
+ </html-demo-element>
49
+
50
+
51
+ <html-demo-element legend="2. without TAG, inline instantiation"
52
+ description="hash value in SRC references template by ID. Should output 'construction' 2 times">
53
+ <template>
54
+ <template id="template2">
55
+ 🏗️ construction
56
+ </template>
57
+
58
+ <custom-element src="#template2"></custom-element>
59
+ <custom-element src="#template2"></custom-element>
60
+ </template>
61
+ </html-demo-element>
62
+
63
+ <html-demo-element legend="3. external SVG file" >
64
+ <template>
65
+ <custom-element tag="dce-external" src="confused.svg" >
66
+ <template><i>loading from SVG ...</i></template>
67
+ </custom-element>
68
+ <dce-external></dce-external>
69
+ <custom-element src="confused.svg" >
70
+ <i>inline DCE loading from SVG ...</i>
71
+ </custom-element>
72
+ <custom-element src="no.svg" >
73
+ <i>fallback for missing image</i>
74
+ </custom-element>
75
+ </template>
76
+ </html-demo-element>
77
+
78
+ <html-demo-element legend="4. external XSLT file"
79
+ description="This external templates generated the tree for DCE data set"
80
+ >
81
+ <template>
82
+ <custom-element tag="dce-external-4" src="tree.xsl" >
83
+ <template><i>loading from XSLT ...</i></template>
84
+ </custom-element>
85
+ <dce-external-4 title="DCE with external XSLT template" data-fruit="🍌">Hi</dce-external-4>
86
+ <custom-element src="tree.xsl" data-smile="👼" data-basket="🍒">
87
+ <i>inline DCE loading from XSLT ...</i>
88
+ </custom-element>
89
+ </template>
90
+ </html-demo-element>
91
+
92
+ <html-demo-element legend="5. external HTML template" description="Should render 👋👌, svg, formula">
93
+ <template>
94
+ <custom-element tag="dce-external-5" src="html-template.html" >
95
+ <template><i>loading from HTML file ...</i></template>
96
+ </custom-element>
97
+ <dce-external-5 title="DCE with external XSLT template" data-fruit="🍌">Hi</dce-external-5>
98
+ <custom-element src="html-template.html" data-smile="👼" data-basket="🍒">
99
+ <i>inline DCE loading from HTML file ...</i>
100
+ </custom-element>
101
+ </template>
102
+ </html-demo-element>
103
+
104
+ <html-demo-element legend="6. HTML, SVG by ID within external file" description="Should render 👋, svg, formula">
105
+ <a href="html-template.html">html-template.html</a>
106
+ <template>
107
+ <custom-element src="html-template.html#wave" >
108
+ <template><i>loading HTML from templates file ...</i></template>
109
+ </custom-element>
110
+ <custom-element src="html-template.html#dwc-logo" >
111
+ <template><i>loading SVG from templates file ...</i></template>
112
+ </custom-element>
113
+ <custom-element src="html-template.html#sophomores-dream" >
114
+ <template><i>loading MathML from HTML file ...</i></template>
115
+ </custom-element>
116
+ </template>
117
+ </html-demo-element>
118
+ <html-demo-element legend="7. XSLT by ID within external file" description="Should render tree, and fallback">
119
+ <a href="html-template.html">html-template.html</a>
120
+ <template>
121
+ <custom-element src="html-template.xhtml#embedded-xsl" >
122
+ <template>whole XSLT is embedded into HTML body</template>
123
+ </custom-element>
124
+ <custom-element src="html-template.html#none" >
125
+ <template><i>element with id=none is missing in template</i></template>
126
+ </custom-element>
127
+ </template>
128
+ </html-demo-element>
129
+
130
+ <html-demo-element legend="8. external file with embedding of another external DCE"
131
+ description="Should render Vulcan Salute 🖖"
132
+ >
133
+ <template>
134
+ <custom-element src="embed-1.html" >
135
+ loading from embed-1.html ...
136
+ </custom-element>
137
+ </template>
138
+ </html-demo-element>
139
+ <html-demo-element legend="embed-1.html external file " src="embed-1.html">
140
+ </html-demo-element>
141
+ <!--
142
+ <html-demo-element legend="9. deep external files, complex rendering" >
143
+ <template>
144
+ <custom-element src="../index.html#shared-template" hidden>
145
+ loading by hash from ../index.html#shared-template ...
146
+ </custom-element>
147
+ </template>
148
+ </html-demo-element>
149
+
150
+ <html-demo-element legend="9. own import maps" >
151
+ <template>
152
+ <custom-element src="../index.html#shared-template" hidden>
153
+ loading by hash from ../index.html#shared-template ...
154
+ </custom-element>
155
+ </template>
156
+ </html-demo-element>
157
+
158
+ <html-demo-element legend="10. deep external files with own import maps" >
159
+ <template>
160
+ <custom-element src="../index.html#shared-template" hidden>
161
+ loading by hash from ../index.html#shared-template ...
162
+ </custom-element>
163
+ </template>
164
+ </html-demo-element>
165
+
166
+ <html-demo-element legend="11. local template as a 'loading...' or fallback for remote, error handling" >
167
+ <template>
168
+ <custom-element src="../index.html#shared-template" hidden>
169
+ loading by hash from ../index.html#shared-template ...
170
+ </custom-element>
171
+ </template>
172
+ </html-demo-element>
173
+
174
+ -->
175
+ <script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
176
+
177
+ </body>
178
+ </html>
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+ <head>
4
+ <title>template based on HTML file</title>
5
+ <style>svg {
6
+ width: 4rem;
7
+ }</style>
8
+ </head>
9
+ <body>
10
+ <script>console.error('Stranger danger!')</script>
11
+ <b id="wave">👋</b>
12
+ <b id="ok">👌</b>
13
+ <svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18">
14
+ <defs>
15
+ <style>.cls-1 {
16
+ fill: #c2e6f1;
17
+ }
18
+
19
+ .cls-2 {
20
+ fill: #dcf1f7;
21
+ }
22
+
23
+ .cls-3 {
24
+ fill: #2d4554;
25
+ }
26
+
27
+ .cls-4 {
28
+ fill: #60cae5;
29
+ }</style>
30
+ </defs>
31
+ <polygon class="cls-3"
32
+ points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
33
+ <path class="cls-2"
34
+ d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
35
+ <path class="cls-2"
36
+ d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
37
+ <path class="cls-1"
38
+ d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
39
+ <path class="cls-2"
40
+ d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
41
+ <path class="cls-2"
42
+ d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
43
+ <path class="cls-2"
44
+ d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
45
+ <path class="cls-2"
46
+ d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
47
+ <path class="cls-4"
48
+ d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
49
+ <path class="cls-4"
50
+ d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
51
+ <path class="cls-4"
52
+ d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
53
+ <path class="cls-4"
54
+ d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
55
+ <path class="cls-4"
56
+ d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
57
+ <path class="cls-4"
58
+ d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
59
+ <path class="cls-4"
60
+ d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
61
+ <path class="cls-4"
62
+ d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
63
+ <path class="cls-2"
64
+ d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
65
+ <path class="cls-1"
66
+ d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
67
+ <path class="cls-1"
68
+ d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
69
+ <path class="cls-2"
70
+ d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
71
+ <path class="cls-1"
72
+ d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
73
+ <path class="cls-1"
74
+ d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
75
+ </svg>
76
+ <math id="sophomores-dream" display="block">
77
+ <mrow>
78
+ <msubsup>
79
+ <mo>∫</mo>
80
+ <mn>0</mn>
81
+ <mn>1</mn>
82
+ </msubsup>
83
+ <msup>
84
+ <mi>x</mi>
85
+ <mi>x</mi>
86
+ </msup>
87
+ <mo rspace="0.22em">⁢</mo>
88
+ <mo rspace="0">ⅆ</mo>
89
+ <mi>x</mi>
90
+ <mo>=</mo>
91
+ <munderover>
92
+ <mo>∑</mo>
93
+ <mrow>
94
+ <mi>n</mi>
95
+ <mo>=</mo>
96
+ <mn>1</mn>
97
+ </mrow>
98
+ <mn>∞</mn>
99
+ </munderover>
100
+ <msup>
101
+ <mrow>
102
+ <mo>(</mo>
103
+ <mrow>
104
+ <mo form="prefix">−</mo>
105
+ <mn>1</mn>
106
+ </mrow>
107
+ <mo>)</mo>
108
+ </mrow>
109
+ <mrow>
110
+ <mi>n</mi>
111
+ <mo>+</mo>
112
+ <mn>1</mn>
113
+ </mrow>
114
+ </msup>
115
+ <mo>⁢</mo>
116
+ <msup>
117
+ <mi>n</mi>
118
+ <mrow>
119
+ <mo form="prefix">−</mo>
120
+ <mi>n</mi>
121
+ </mrow>
122
+ </msup>
123
+ </mrow>
124
+ </math>
125
+ </body>
126
+ </html>
@@ -0,0 +1,45 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+ <head>
4
+ <meta charset="UTF-8"/>
5
+ <title>template based on HTML file</title>
6
+ </head>
7
+ <body>
8
+ <b id="wave">👋</b>
9
+ <b id="ok">👌</b>
10
+ <svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18"><defs><style>.cls-1{fill:#c2e6f1;}.cls-2{fill:#dcf1f7;}.cls-3{fill:#2d4554;}.cls-4{fill:#60cae5;}</style></defs><polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/><path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/><path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/><path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/><path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/><path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/><path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/><path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/></svg>
11
+ <xsl:stylesheet
12
+ id="embedded-xsl"
13
+ version="1.0"
14
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
15
+ <xsl:output
16
+ method="html"
17
+ omit-xml-declaration="yes"
18
+ standalone="yes"
19
+ indent="yes"
20
+ />
21
+
22
+ <xsl:template match="/">
23
+ <xsl:apply-templates select="*"/>
24
+ </xsl:template>
25
+ <xsl:template match="*">
26
+ <details style="padding:0 1rem" open="open">
27
+ <summary>
28
+ <b style="color:green"><xsl:value-of select="name()"/></b>
29
+ <xsl:apply-templates select="@*"/>
30
+ </summary>
31
+ <xsl:value-of select="./text()"/>
32
+ <xsl:apply-templates select="*"/>
33
+ </details>
34
+ </xsl:template>
35
+ <xsl:template match="@*">
36
+ <code style="margin-left:1rem;color:brown"><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</code>
37
+ </xsl:template>
38
+ <xsl:template match="text()">
39
+ <p>
40
+ <xsl:value-of select="."/>
41
+ </p>
42
+ </xsl:template>
43
+ </xsl:stylesheet>
44
+ </body>
45
+ </html>
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+ <head>
4
+ <meta charset="UTF-8"/>
5
+ <title>template based on HTML file</title>
6
+ </head>
7
+ <body>
8
+ <b id="wave">👋</b>
9
+ <b id="ok">👌</b>
10
+ <svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18"><defs><style>.cls-1{fill:#c2e6f1;}.cls-2{fill:#dcf1f7;}.cls-3{fill:#2d4554;}.cls-4{fill:#60cae5;}</style></defs><polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/><path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/><path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/><path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/><path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/><path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/><path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/><path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/></svg>
11
+ <xsl:stylesheet
12
+ id="embedded-xsl"
13
+ version="1.0"
14
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
15
+ <xsl:output
16
+ method="html"
17
+ omit-xml-declaration="yes"
18
+ standalone="yes"
19
+ indent="yes"
20
+ />
21
+
22
+ <xsl:template match="/">
23
+ <xsl:apply-templates select="*"/>
24
+ </xsl:template>
25
+ <xsl:template match="*">
26
+ <details style="padding:0 1rem" open="open">
27
+ <summary>
28
+ <b style="color:green"><xsl:value-of select="name()"/></b>
29
+ <xsl:apply-templates select="@*"/>
30
+ </summary>
31
+ <xsl:value-of select="./text()"/>
32
+ <xsl:apply-templates select="*"/>
33
+ </details>
34
+ </xsl:template>
35
+ <xsl:template match="@*">
36
+ <code style="margin-left:1rem;color:brown"><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</code>
37
+ </xsl:template>
38
+ <xsl:template match="text()">
39
+ <p>
40
+ <xsl:value-of select="."/>
41
+ </p>
42
+ </xsl:template>
43
+ </xsl:stylesheet>
44
+ </body>
45
+ </html>