-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
812 lines (762 loc) · 49.8 KB
/
Copy pathindex.html
File metadata and controls
812 lines (762 loc) · 49.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
<!-- XSLTDebugX v1.0 — Online XSLT 3.0 Debugger & IDE for SAP Cloud Integration -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XSLTDebugX — Online XSLT 3.0 Debugger & IDE for SAP Cloud Integration</title>
<meta name="description" content="Free online XSLT 3.0 debugger and XPath 3.1 IDE for SAP Cloud Integration (CPI). Debug and test XSLT transformations with headers, properties, and extension functions — no deployment needed.">
<meta name="keywords" content="XSLT debugger, XPath tester, SAP CPI, SAP Cloud Integration, XSLT 3.0, XPath 3.1, online XSLT IDE">
<meta name="author" content="XSLTDebugX">
<meta name="google-site-verification" content="2FIJQa0iXMS64h8tWPm5lUdskRuBHUzKXt8RxuyUlis">
<meta name="robots" content="index, follow">
<meta name="theme-color" content="#1e1e2e">
<meta name="application-name" content="XSLTDebugX">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="XSLTDebugX">
<link rel="canonical" href="https://xsltdebugx.pages.dev/">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:title" content="XSLTDebugX — Free Online XSLT 3.0 Debugger for SAP CPI">
<meta property="og:description" content="Free online XSLT 3.0 debugger and XPath 3.1 tester. Debug SAP CPI transformations locally with headers, properties, and extension functions — no deployment needed.">
<meta property="og:url" content="https://xsltdebugx.pages.dev/">
<meta property="og:site_name" content="XSLTDebugX">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://xsltdebugx.pages.dev/og-image.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="XSLTDebugX — XSLT 3.0 IDE with XML input, XSLT stylesheet editor, and console output">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="XSLTDebugX — Free Online XSLT 3.0 Debugger for SAP CPI">
<meta name="twitter:description" content="Free online XSLT 3.0 debugger and XPath 3.1 tester. Debug SAP CPI transformations locally — no deployment needed.">
<meta name="twitter:domain" content="xsltdebugx.pages.dev">
<meta name="twitter:image" content="https://xsltdebugx.pages.dev/og-image.png">
<meta name="twitter:image:alt" content="XSLTDebugX — XSLT 3.0 IDE with XML input, XSLT stylesheet editor, and console output">
<link rel="icon" type="image/png" sizes="48x48" href="favicon-48.png">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="apple-touch-icon" href="favicon-192.png">
<link rel="manifest" href="site.webmanifest">
<link rel="author" href="/humans.txt">
<link rel="alternate" type="application/atom+xml" title="XSLTDebugX releases" href="https://github.com/linusdevx/XSLTDebugX/releases.atom">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.1.0/pako.min.js" integrity="sha384-rNlaE5fs9dGIjmxWDALQh/RBAaGRYT5ChrzHo6tRfgrZ36iRFAiquP5g41Jsv+0j" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/lucide@1.14.0/dist/umd/lucide.min.js" integrity="sha384-jB6ZXxyEV94yzTxgLMvrwwNbn/pTTqwrMDI+v8FV5o5FnId/yn3DJwSdrDujU9A7" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.44.0/min/vs/loader.js" integrity="sha384-xgEbYcV8275+SHiNp4AAv+asZ3e4k7NaDCajMhLZ0SwIeDHKG1huHcccDfFQW5KQ" crossorigin="anonymous"></script>
<script src="./lib/SaxonJS2.js"></script>
<script>document.addEventListener('DOMContentLoaded', function() {
if (typeof lucide !== 'undefined') lucide.createIcons();
// Local-dev fallback: build pipeline injects the date over a placeholder
// marked with data-placeholder. If still present, this is raw-source dev mode.
var bi = document.getElementById('buildInfo');
if (bi && bi.dataset.placeholder === 'true') bi.textContent = 'Local dev';
});</script>
<!-- Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "XSLTDebugX — Online XSLT Debugger",
"alternateName": ["XSLT Debug X", "XSLTDebugX"],
"url": "https://xsltdebugx.pages.dev/",
"description": "Free online XSLT 3.0 debugger and XPath 3.1 IDE for SAP Cloud Integration (CPI). Debug and test XSLT transformations with headers, properties, and extension functions — no deployment needed.",
"applicationCategory": "DeveloperApplication",
"applicationSubCategory": "IDE",
"operatingSystem": "Any (modern browser)",
"browserRequirements": "Requires a modern browser with ES2020 and WebAssembly support (Chrome, Firefox, Safari, Edge).",
"softwareRequirements": "Saxon-JS 2 (bundled), Monaco Editor (bundled). No installation required.",
"softwareVersion": "1.0",
"datePublished": "2025-01-01",
"dateModified": "2026-06-03",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"author": {
"@type": "Person",
"name": "Sunil Pharswan",
"url": "https://www.linkedin.com/in/sunilph/"
},
"featureList": [
"XSLT 3.0 transformation engine (Saxon-JS 2)",
"XPath 3.1 expression evaluator and tester",
"Online XSLT debugger — no installation needed",
"SAP CPI header and property simulation",
"SAP CPI extension function support",
"61 built-in examples across 6 categories",
"Monaco Editor with XML/XSLT syntax highlighting",
"Real-time XML validation and error detection",
"Dark and light theme",
"Share transformations via URL",
"XSLT testing without deploying to SAP Integration Suite",
"No server — runs entirely in-browser"
],
"screenshot": {
"@type": "ImageObject",
"url": "https://xsltdebugx.pages.dev/screenshot.png",
"width": 1280,
"height": 800,
"caption": "XSLTDebugX IDE — XML input, XSLT stylesheet, and transformation output panels with debug console"
},
"keywords": "XSLT debugger, XSLT IDE online, XPath tester, SAP CPI XSLT, SAP Cloud Integration, XSLT 3.0, XPath 3.1, online XSLT editor, XSLT testing tool, XML editor, Saxon-JS, XSLT playground",
"inLanguage": "en",
"isAccessibleForFree": true,
"license": "https://www.gnu.org/licenses/agpl-3.0.html",
"sameAs": "https://github.com/linusdevx/XSLTDebugX"
}
</script>
<!-- FAQ schema — eligible for FAQ rich results in SERP. Answers mirror the noscript content. -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How do I debug XSLT for SAP Cloud Integration without deploying an iFlow?",
"acceptedAnswer": {
"@type": "Answer",
"text": "XSLTDebugX simulates the SAP CPI runtime in your browser — including message headers, exchange properties, and CPI extension functions — so you can run and debug XSLT 3.0 mappings against sample XML and see the output instantly, with no deployment to SAP Integration Suite required."
}
},
{
"@type": "Question",
"name": "Is XSLTDebugX free to use?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. XSLTDebugX is free, open-source (AGPL-3.0 licensed), and requires no account. It runs entirely in your browser — no XML, XSLT, or message data is sent to any server."
}
},
{
"@type": "Question",
"name": "Which XSLT and XPath versions are supported?",
"acceptedAnswer": {
"@type": "Answer",
"text": "XSLTDebugX supports XSLT 3.0 transformations and XPath 3.1 expressions, powered by the Saxon-JS 2 engine — the same XSLT/XPath processor family used by SAP Cloud Integration."
}
},
{
"@type": "Question",
"name": "Can I test XPath expressions against XML in the browser?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. The XPath mode lets you evaluate XPath 3.1 expressions against any XML document with syntax highlighting, expression history, and live result highlighting in the source XML."
}
},
{
"@type": "Question",
"name": "Does XSLTDebugX work offline?",
"acceptedAnswer": {
"@type": "Answer",
"text": "After the first load, XSLTDebugX runs entirely client-side — XSLT execution, XPath evaluation, and CPI simulation all happen in your browser with no network calls. Saved sessions persist in localStorage."
}
}
]
}
</script>
<!-- Breadcrumb schema — single-page app, but a Home → Tool trail still helps Google build site links. -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://xsltdebugx.pages.dev/"
},
{
"@type": "ListItem",
"position": 2,
"name": "XSLT 3.0 Debugger & XPath Tester for SAP CPI",
"item": "https://xsltdebugx.pages.dev/"
}
]
}
</script>
</head>
<body class="light">
<script>
try {
var _t = localStorage.getItem('xdebugx-theme');
if (_t === 'dark') document.body.classList.remove('light');
else if (_t === 'light') document.body.classList.add('light');
} catch (_) {}
</script>
<!-- SEO + a11y: real DOM content for crawlers that DO render JS (Googlebot etc.)
and for screen readers. Visually hidden via .seo-content (clip-path, off-screen)
but kept in the accessibility tree. The page H1 lives here. -->
<section class="seo-content" aria-label="About XSLTDebugX">
<h1>XSLTDebugX — Free Online XSLT 3.0 Debugger & IDE for SAP Cloud Integration</h1>
<p>XSLTDebugX is a free online XSLT debugger and XPath 3.1 tester designed for SAP Cloud Integration (CPI) developers. Debug, test, and validate XSLT transformations directly in your browser without deploying to SAP Integration Suite.</p>
<h2>XSLT Debugger Features</h2>
<ul>
<li>Online XSLT 3.0 transformation engine powered by Saxon-JS 2</li>
<li>XPath 3.1 expression tester with syntax highlighting and history</li>
<li>SAP CPI runtime simulation — debug with headers, properties, and extension functions</li>
<li>61 built-in examples covering basic to advanced XSLT patterns</li>
<li>Monaco Editor with XML/XSLT syntax highlighting and real-time error detection</li>
<li>Share XSLT transformations via URL — no server or account needed</li>
<li>Dark and light theme support</li>
<li>Runs entirely in your browser — no installation, no data sent to servers</li>
</ul>
<h2>Use Cases</h2>
<ul>
<li>Debug and test XSLT mappings for SAP Integration Suite iFlows offline</li>
<li>Test XPath expressions against sample XML documents online</li>
<li>Learn XSLT 3.0 with interactive examples and instant feedback</li>
<li>Validate XML structure and XSLT transformation output before deployment</li>
</ul>
<h2>Why Use an Online XSLT Debugger?</h2>
<p>Testing XSLT in SAP CPI requires deploying iFlows and checking trace logs — slow and tedious. XSLTDebugX lets you debug XSLT mappings instantly in your browser with the same headers, properties, and CPI extension functions available at runtime. It's the fastest way to develop and test SAP Cloud Integration XSLT transformations.</p>
</section>
<!-- True no-JS fallback: shown only when JavaScript is disabled. -->
<noscript>
<div style="padding:2rem;max-width:800px;margin:0 auto;font-family:system-ui,sans-serif">
<p><strong>XSLTDebugX requires JavaScript.</strong> Please enable JavaScript in your browser to use the XSLT 3.0 debugger and XPath 3.1 tester.</p>
</div>
</noscript>
<!-- Loading -->
<div id="loadingOverlay">
<div class="load-bg-grid"></div>
<div class="skeleton-header"></div>
<div class="skeleton-workspace">
<div class="skeleton-col"></div>
<div class="skeleton-col skeleton-center"></div>
<div class="skeleton-col"></div>
</div>
<div class="skeleton-text">
<div class="spinner"></div>
<div id="loadTxt">Booting XSLTDebugX…</div>
</div>
</div>
<!-- Header -->
<header class="header">
<!-- Visual brand mark, not a heading: the page H1 lives in the .seo-content section above.
The mark is a stylized transform glyph: opening bracket, arrow, closing bracket —
readable as <X> → and as a forward-flow arrow. Picks up the SAP-blue gradient. -->
<div class="logo" role="img" aria-label="XSLTDebugX — SAP Cloud Integration XSLT IDE">
<svg class="logo-mark" viewBox="0 0 32 32" width="28" height="28" aria-hidden="true">
<defs>
<linearGradient id="xd-mark-grad" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#0068e0"/>
<stop offset="100%" stop-color="#0098f0"/>
</linearGradient>
</defs>
<!-- left bracket -->
<path d="M11 8 L5 16 L11 24" fill="none" stroke="url(#xd-mark-grad)" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
<!-- right bracket -->
<path d="M21 8 L27 16 L21 24" fill="none" stroke="url(#xd-mark-grad)" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
<!-- forward-flow arrowhead in the middle -->
<path class="logo-mark-arrow" d="M13 16 L19 16 M16.5 13 L19 16 L16.5 19" fill="none" stroke="url(#xd-mark-grad)" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span class="logo-name">XSLTDebug<span class="logo-name-x">X</span></span>
</div>
<div class="h-spacer"></div>
<nav aria-label="Main actions">
<button class="ex-btn xf-session-share" id="shareBtn" onclick="openShareModal()">
<i data-lucide="share-2" width="14" height="14"></i>
Share
</button>
<button class="ex-btn" id="exBtn" onclick="openExModal()">
<i data-lucide="book-open" width="14" height="14"></i>
Examples
</button>
<div class="mode-switcher" id="modeSwitcher">
<div class="mode-pill"></div>
<button class="mode-btn mode-btn-xslt active" id="modeBtnXslt" onclick="if(modeManager.isXpath)toggleXPath()" title="XSLT Transform mode">
<i data-lucide="file-code" width="12" height="12"></i>
XSLT
</button>
<button class="mode-btn mode-btn-xpath" id="modeBtnXpath" onclick="if(!modeManager.isXpath)toggleXPath()" title="XPath evaluator mode">
<i data-lucide="braces" width="12" height="12"></i>
XPath
</button>
</div>
<button class="header-icon-btn theme-toggle" id="themeToggle" onclick="toggleTheme()" title="Toggle light / dark theme">
<i data-lucide="sun" width="15" height="15" class="theme-icon-sun"></i>
<i data-lucide="moon" width="15" height="15" class="theme-icon-moon"></i>
</button>
<button class="ex-btn clear-session-btn" id="clearSessionBtn" onclick="clearSavedState()" title="Clear saved session">
<i data-lucide="trash-2" width="14" height="14"></i>
Clear
</button>
<button class="ex-btn help-btn" id="helpBtn" onclick="openHelpModal()" title="Help — features & shortcuts">
<i data-lucide="circle-help" width="14" height="14"></i>
Help
</button>
<button class="run-btn" id="runBtn" onclick="createRipple(event); runTransform()">
<i data-lucide="play" width="14" height="14"></i>
Run
<span class="kbd">⌘↵</span>
</button>
</nav>
</header>
<!-- 3-Column layout -->
<main class="workspace">
<!-- Inter-column flow lines: rendered absolutely over the workspace gutters.
Hairline by default; on Run, the .flowing class sends a bright dot left→right
to visualize the XML → XSLT → Output transformation. JS toggles .flowing
in transform.js around the Saxon call. -->
<div class="flow-line flow-line-1" aria-hidden="true">
<div class="flow-line-track"></div>
<div class="flow-line-dot"></div>
</div>
<div class="flow-line flow-line-2" aria-hidden="true">
<div class="flow-line-track"></div>
<div class="flow-line-dot"></div>
</div>
<!-- LEFT: XML Input + Headers + Properties -->
<div class="col col-side" id="colLeft">
<!-- Collapsed tab (shown only when minimized) -->
<div class="col-tab" onclick="toggleSideCol('left')">
<div class="col-tab-dot ind-xml"></div>
<span class="col-tab-label" id="xmlColTabLabel">Input</span>
</div>
<!-- Normal content -->
<div class="col-inner">
<!-- ── XQuery section (shown in XPath mode only) ── -->
<div id="xpathBar" style="display:none">
<div class="pane-bar pane-bar-clickable" onclick="toggleSideCol('left')" title="Click to collapse / restore the input panel">
<div class="pane-indicator ind-xpath"></div>
<span class="pane-num pane-num-xpath" id="xpathPaneNum">01</span>
<span class="pane-title">XQuery</span>
<span class="xpath-header-count" id="xpathHeaderCount" style="display:none"></span>
<div class="pane-actions" onclick="event.stopPropagation()">
<span class="lang-badge">XQuery</span>
<button class="pane-icon-btn" title="Copy XPath expression" onclick="copyXPathInput()"><i data-lucide="clipboard" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Clear XPath expression" onclick="clearXPathInput()"><i data-lucide="eraser" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="pane-icon-btn" onclick="_xpathHistoryNavigate('up', document.getElementById('xpathInput'))" title="Previous expression (↑)"><i data-lucide="chevron-up" width="14" height="14"></i></button>
<button class="pane-icon-btn" onclick="_xpathHistoryNavigate('down', document.getElementById('xpathInput'))" title="Next expression (↓)"><i data-lucide="chevron-down" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="collapse-btn" title="Collapse panel" onclick="toggleSideCol('left')"><i data-lucide="chevron-left" width="14" height="14"></i></button>
</div>
</div>
<div class="xpath-input-row">
<span class="xpath-icon">ƒx</span>
<div class="xpath-input-wrap">
<div class="xpath-overlay" id="xpathOverlay"></div>
<textarea class="xpath-input" id="xpathInput" rows="1"
placeholder="e.g. //Order[@status='OPEN'] or count(//Item)"
onkeydown="if(event.key==='Enter'){event.preventDefault();runXPath();}else if(event.key==='ArrowUp'){event.preventDefault();_xpathHistoryNavigate('up',this);}else if(event.key==='ArrowDown'){event.preventDefault();_xpathHistoryNavigate('down',this);}"
oninput="_xpathHistoryCursor=-1;scheduleSave();this.style.height='auto';this.style.height=this.scrollHeight+'px';_highlightXPath(this.value);"
autocomplete="off" spellcheck="false"></textarea>
</div>
</div>
<!-- ── XPath Hints Strip ── -->
<div class="xpath-hints-strip" id="xpathHintsStrip" style="display:none"></div>
</div>
<!-- ── XML Input Message bar (always visible) ── -->
<div class="pane-bar pane-bar-clickable" id="xmlPaneBar" onclick="toggleSideCol('left')" title="Click to collapse / restore the input panel">
<div class="pane-indicator ind-xml"></div>
<span class="pane-num" id="xmlPaneNum">01</span>
<span class="pane-title" id="xmlPaneTitle">Input</span>
<!-- XML Validation Badge -->
<span class="xml-validation-badge" id="xmlValidationBadge" title="XML parsing status" style="display: none;" onclick="event.stopPropagation()">
<span class="badge-icon">✓</span>
<span class="badge-text">Valid</span>
</span>
<div class="pane-actions" onclick="event.stopPropagation()">
<span class="lang-badge">XML</span>
<button class="pane-icon-btn" title="Format XML" onclick="fmtEditor('xml')"><i data-lucide="align-left" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Copy XML" onclick="copyPane('xml')"><i data-lucide="clipboard" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Clear XML" onclick="clearPane('xml')"><i data-lucide="eraser" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="pane-icon-btn wrap-toggle-btn" id="wrapToggleXml" title="Toggle word wrap" onclick="toggleWordWrap('xml')"><i data-lucide="wrap-text" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Upload XML file" onclick="triggerUpload('xml')"><i data-lucide="upload" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Download XML file" onclick="downloadPane('xml','input.xml')"><i data-lucide="download" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="collapse-btn" title="Collapse panel" onclick="toggleSideCol('left')"><i data-lucide="chevron-left" width="14" height="14"></i></button>
</div>
<input type="file" class="file-input-hidden" id="uploadXml" accept=".xml,.xsl,.xslt,.txt" aria-label="Upload XML file" onchange="handleUpload(event,'xml')">
</div>
<div class="editor-wrap" id="xmlEdWrap">
<div id="xmlEd"></div>
</div>
<!-- Headers Panel -->
<div class="kv-panel" id="hdrPanel">
<div class="kv-header" onclick="toggleKVPanel('hdrPanel')">
<span class="kv-icon"><i data-lucide="hash" width="12" height="12"></i></span>
<span class="kv-title">Headers</span>
<span class="kv-count" id="hdrCount">0</span>
<input class="kv-search" id="hdrPanelSearch" type="text" placeholder="search…" aria-label="Filter headers" onclick="event.stopPropagation()" oninput="_applyKVFilter('hdrPanel')" title="Filter rows by name or value"/>
<button class="kv-add-btn" onclick="event.stopPropagation(); addKVRow('headers')">+</button>
<i data-lucide="chevron-down" width="14" height="14" class="kv-chevron"></i>
</div>
<div class="kv-body" id="hdrBody">
<div class="kv-table-head"><span>Name</span><span>Value</span><span></span></div>
<div id="hdrRows"></div>
</div>
</div>
<!-- Properties Panel -->
<div class="kv-panel" id="propPanel">
<div class="kv-header" onclick="toggleKVPanel('propPanel')">
<span class="kv-icon"><i data-lucide="at-sign" width="12" height="12"></i></span>
<span class="kv-title">Properties</span>
<span class="kv-count" id="propCount">0</span>
<input class="kv-search" id="propPanelSearch" type="text" placeholder="search…" aria-label="Filter properties" onclick="event.stopPropagation()" oninput="_applyKVFilter('propPanel')" title="Filter rows by name or value"/>
<button class="kv-add-btn" onclick="event.stopPropagation(); addKVRow('properties')">+</button>
<i data-lucide="chevron-down" width="14" height="14" class="kv-chevron"></i>
</div>
<div class="kv-body" id="propBody">
<div class="kv-table-head"><span>Name</span><span>Value</span><span></span></div>
<div id="propRows"></div>
</div>
</div>
</div>
</div>
<!-- CENTER: XSLT Editor (full height) -->
<div class="col col-center" id="colCenter">
<div class="pane-bar">
<div class="pane-indicator ind-xslt"></div>
<span class="pane-num">02</span>
<span class="pane-title">Transform</span>
<div class="pane-actions">
<span class="lang-badge">XSLT</span>
<button class="pane-icon-btn" title="Format XSLT" onclick="fmtEditor('xslt')"><i data-lucide="align-left" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Copy XSLT" onclick="copyPane('xslt')"><i data-lucide="clipboard" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Clear XSLT" onclick="clearPane('xslt')"><i data-lucide="eraser" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="pane-icon-btn wrap-toggle-btn" id="wrapToggleXslt" title="Toggle word wrap" onclick="toggleWordWrap('xslt')"><i data-lucide="wrap-text" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Upload XSLT file" onclick="triggerUpload('xslt')"><i data-lucide="upload" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Download XSLT file" onclick="downloadPane('xslt','stylesheet.xslt')"><i data-lucide="download" width="14" height="14"></i></button>
</div>
<input type="file" class="file-input-hidden" id="uploadXslt" accept=".xsl,.xslt,.xml,.txt" aria-label="Upload XSLT file" onchange="handleUpload(event,'xslt')">
</div>
<div class="editor-wrap" id="xsltEdWrap" style="flex:1;min-height:0;">
<div id="xsltEd"></div>
</div>
<!-- Console — default position: below XSLT editor. Moved below workspace in XPath mode. -->
<div class="console-panel" id="consolePanel">
<div class="console-resize-handle" onpointerdown="startConsoleResize(event)" title="Drag to resize console"></div>
<div class="console-bar" onclick="handleConsoleBarClick(event)">
<span class="kv-icon"><i data-lucide="square-terminal" width="12" height="12"></i></span>
<span class="console-title">Console</span>
<span class="console-err-badge" id="consoleErrBadge">0</span>
<div class="console-bar-actions" onclick="event.stopPropagation()">
<div class="console-filters">
<button class="console-filter-btn active" data-filter="all" onclick="setConsoleFilter('all')" title="Show all messages"><svg viewBox="0 0 10 10" width="10" height="10"><circle cx="5" cy="5" r="4.5" fill="currentColor"/></svg></button>
<button class="console-filter-btn" data-filter="info" onclick="setConsoleFilter('info')" title="Info only"><svg viewBox="0 0 10 10" width="10" height="10"><circle cx="5" cy="5" r="4.5" fill="currentColor"/></svg></button>
<button class="console-filter-btn" data-filter="warn" onclick="setConsoleFilter('warn')" title="Warnings only"><svg viewBox="0 0 10 10" width="10" height="10"><circle cx="5" cy="5" r="4.5" fill="currentColor"/></svg></button>
<button class="console-filter-btn" data-filter="error" onclick="setConsoleFilter('error')" title="Errors only"><svg viewBox="0 0 10 10" width="10" height="10"><circle cx="5" cy="5" r="4.5" fill="currentColor"/></svg></button>
</div>
<div class="pane-divider"></div>
<input class="console-search" id="consoleSearch" type="text" placeholder="search…" aria-label="Search console output" oninput="applyConsoleSearch(this.value)" title="Filter console by text"/>
<div class="pane-divider"></div>
<button class="console-text-btn" id="consoleCopyBtn" title="Copy console output" onclick="copyConsole()">Copy</button>
<button class="console-text-btn" id="consoleClearBtn" title="Clear console" onclick="clearConsole()">Clear</button>
</div>
<i data-lucide="chevron-down" width="14" height="14" class="kv-chevron console-chevron" onclick="event.stopPropagation(); handleConsoleBarClick(event)" title="Minimize / restore console"></i>
</div>
<div class="console-body" id="consoleBody"></div>
</div>
</div>
<!-- RIGHT: XPath bar + Results + Output -->
<div class="col col-side collapsed" id="colRight">
<!-- Collapsed tab -->
<div class="col-tab" onclick="toggleSideCol('right')">
<div class="col-tab-dot ind-out"></div>
<span class="col-tab-label">Output</span>
</div>
<!-- Normal content -->
<div class="col-inner">
<!-- ── XPath Results Panel ──
Persistent in XPath mode: bar always visible, body shows empty-state
overlay until the first run, then real results (mirrors XSLT Output). -->
<div class="xpath-results-panel" id="xpathResultsPanel">
<div class="xpath-results-bar pane-bar-clickable" onclick="toggleSideCol('right')" title="Click to collapse / restore the results panel">
<div class="pane-indicator ind-out"></div>
<span class="pane-num pane-num-results">03</span>
<span class="xpath-results-title">XPath Results</span>
<span class="xpath-match-count" id="xpathMatchCount">0 matches</span>
<div class="xpath-results-actions" onclick="event.stopPropagation()">
<button class="pane-icon-btn" onclick="copyXPathResults()" title="Copy all results"><i data-lucide="clipboard" width="14" height="14"></i></button>
<button class="pane-icon-btn" onclick="clearXPathResults()" title="Clear results"><i data-lucide="eraser" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="collapse-btn" title="Collapse panel" onclick="toggleSideCol('right')"><i data-lucide="chevron-right" width="14" height="14"></i></button>
</div>
</div>
<div class="xpath-results-body-wrap" id="xpathResultsBodyWrap">
<div class="xpath-results-body" id="xpathResultsBody"></div>
<!-- Empty-state hint shown over the results body until the first run.
Hidden via CSS when #xpathResultsBodyWrap.has-content is set by xpath.js. -->
<div class="empty-output-hint xpath-empty-hint" aria-hidden="true">
<div class="empty-output-icon">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M19 12H5M12 5l-7 7 7 7"/>
</svg>
</div>
<div class="empty-output-caption">Matches appear here</div>
<div class="empty-output-sub">Run an XPath expression to see results</div>
</div>
</div>
</div>
<!-- ── Output Section (minimises to header when XPath results open) ── -->
<div class="output-section" id="outputSection">
<div class="pane-bar pane-bar-clickable" onclick="toggleSideCol('right')" title="Click to collapse / restore the output panel">
<div class="pane-indicator ind-out"></div>
<span class="pane-num">03</span>
<span class="pane-title">Output</span>
<div class="pane-actions" onclick="event.stopPropagation()">
<button class="collapse-btn" title="Collapse panel" onclick="toggleSideCol('right')"><i data-lucide="chevron-right" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<span class="lang-badge" id="outLangBadge">XML</span>
<button class="pane-icon-btn" title="Copy output" onclick="copyPane('out')"><i data-lucide="clipboard" width="14" height="14"></i></button>
<button class="pane-icon-btn" title="Clear output" onclick="clearPane('out')"><i data-lucide="eraser" width="14" height="14"></i></button>
<div class="pane-divider"></div>
<button class="pane-icon-btn wrap-toggle-btn" id="wrapToggleOut" title="Toggle word wrap" onclick="toggleWordWrap('out')"><i data-lucide="wrap-text" width="14" height="14"></i></button>
<button class="pane-icon-btn" id="outDownloadBtn" title="Download output as XML" onclick="downloadPane('out','output.xml')"><i data-lucide="download" width="14" height="14"></i></button>
</div>
</div>
<div class="editor-wrap" id="outEdWrap">
<div id="outEd"></div>
<!-- Empty-state hint shown over the Output editor when it has no content.
Hidden via CSS when #outEdWrap.has-content is set by transform.js. -->
<div class="empty-output-hint" aria-hidden="true">
<div class="empty-output-icon">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5v14M19 12l-7 7-7-7"/>
</svg>
</div>
<div class="empty-output-caption">Output appears here</div>
<div class="empty-output-sub">Run a transform to see results</div>
</div>
</div>
<!-- Output Headers Panel -->
<div class="kv-panel" id="outHdrPanel">
<div class="kv-header" onclick="toggleKVPanel('outHdrPanel')">
<span class="kv-icon"><i data-lucide="hash" width="12" height="12"></i></span>
<span class="kv-title">Headers</span>
<span class="kv-count" id="outHdrCount">0</span>
<input class="kv-search" id="outHdrPanelSearch" type="text" placeholder="search…" aria-label="Filter output headers" onclick="event.stopPropagation()" oninput="_applyKVFilter('outHdrPanel')" title="Filter rows by name or value"/>
<i data-lucide="chevron-down" width="14" height="14" class="kv-chevron"></i>
</div>
<div class="kv-body" id="outHdrBody">
<div class="kv-table-head"><span>Name</span><span>Value</span></div>
<div id="outHdrRows"></div>
</div>
</div>
<!-- Output Properties Panel -->
<div class="kv-panel" id="outPropPanel">
<div class="kv-header" onclick="toggleKVPanel('outPropPanel')">
<span class="kv-icon"><i data-lucide="at-sign" width="12" height="12"></i></span>
<span class="kv-title">Properties</span>
<span class="kv-count" id="outPropCount">0</span>
<input class="kv-search" id="outPropPanelSearch" type="text" placeholder="search…" aria-label="Filter output properties" onclick="event.stopPropagation()" oninput="_applyKVFilter('outPropPanel')" title="Filter rows by name or value"/>
<i data-lucide="chevron-down" width="14" height="14" class="kv-chevron"></i>
</div>
<div class="kv-body" id="outPropBody">
<div class="kv-table-head"><span>Name</span><span>Value</span></div>
<div id="outPropRows"></div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Share Modal -->
<div class="ex-modal-backdrop" id="shareModalBackdrop" onclick="handleShareBackdropClick(event)">
<div class="share-modal">
<div class="share-modal-header">
<i data-lucide="share-2" width="16" height="16"></i>
<span class="share-modal-title">Share Session</span>
<button class="ex-modal-close" onclick="closeShareModal()" title="Close"><i data-lucide="x" width="18" height="18"></i></button>
</div>
<div class="share-modal-body">
<div class="share-url-row">
<input class="share-url-input" id="shareUrlInput" readonly aria-label="Share URL" onclick="this.select()">
<button class="share-copy-btn" id="shareCopyBtn" onclick="_copyShareUrl(document.getElementById('shareUrlInput').value, false)">Copy URL</button>
</div>
<div class="share-hint">Includes XML, XSLT, headers and properties · recipient opens the link to restore this session</div>
</div>
</div>
</div>
<!-- Examples Library Modal -->
<div class="ex-modal-backdrop" id="exModalBackdrop" onclick="handleModalBackdropClick(event)">
<div class="ex-modal">
<div class="ex-modal-header">
<span class="ex-modal-title">Example Library</span>
<span class="ex-modal-count" id="exModalCount"></span>
<div class="ex-search-wrap">
<i data-lucide="search" width="14" height="14" class="ex-search-icon"></i>
<input class="ex-modal-search" id="exModalSearch" placeholder="Search examples…" oninput="filterExamples()" autocomplete="off">
</div>
<label class="ex-auto-run-label" title="Automatically run examples after loading them">
<input type="checkbox" id="exAutoRunCheckbox" aria-label="Auto-run loaded examples" onchange="exAutoRunChecked = this.checked; localStorage.setItem('xdebugx-auto-run-examples', this.checked)">
Auto-run
</label>
<button class="ex-modal-close" onclick="closeExModal()" title="Close"><i data-lucide="x" width="18" height="18"></i></button>
</div>
<div class="ex-modal-body">
<div class="ex-sidebar" id="exSidebar">
<!-- Rendered dynamically by renderExSidebar() from CATEGORIES -->
</div>
<div class="ex-grid-wrap" id="exGridWrap">
<!-- Rendered by renderExGrid() -->
</div>
</div>
</div>
</div>
<!-- Status Bar -->
<footer class="status-bar">
<div class="stat">
<div class="stat-dot ok" id="statDot"></div>
<span id="statTxt">Ready</span>
</div>
<div class="stat">Saxon-JS 2.x · XSLT 3.0 Engine</div>
<div class="stat stat-cursor" id="statCursor" title="Cursor position · document size"></div>
<div class="stat-mode" id="statMode" title="Current editor mode">
<span class="mode-pill mode-xslt" id="modePill">XSLT</span>
</div>
<div class="stat-spacer"></div>
<div id="savedIndicator" class="saved-indicator" title="Session auto-saved to browser storage">
<svg width="7" height="7" viewBox="0 0 8 8" fill="currentColor"><circle cx="4" cy="4" r="3.5"/></svg>Saved
</div>
<div class="stat stat-author">
<span>Built by</span>
<a href="https://www.linkedin.com/in/sunilph/" target="_blank" rel="noopener" class="stat-link" title="Sunil Pharswan on LinkedIn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect width="4" height="12" x="2" y="9"/><circle cx="4" cy="4" r="2"/></svg>
Sunil Pharswan
</a>
<span class="stat-divider">·</span>
<span id="buildInfo" class="build-info" data-placeholder="true" title="Build date and short commit SHA">__BUILD_INFO__</span>
<span class="stat-divider">·</span>
<a href="https://github.com/linusdevx/XSLTDebugX" target="_blank" rel="noopener" class="stat-link" title="View source on GitHub">
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/></svg>
GitHub
</a>
</div>
<div class="stat tm-notice" title="SAP® and SAP Cloud Platform Integration (CPI) are registered trademarks of SAP SE. This tool is not affiliated with or endorsed by SAP SE.">SAP® trademark of SAP SE</div>
</footer>
<!-- Help Modal -->
<div class="ex-modal-backdrop" id="helpModalBackdrop" onclick="handleHelpBackdropClick(event)">
<div class="help-modal">
<div class="help-modal-header">
<i data-lucide="circle-help" width="16" height="16"></i>
<span class="help-modal-title">Help</span>
<div class="help-tabs">
<button class="help-tab active" data-tab="features" onclick="switchHelpTab('features')">Features</button>
<button class="help-tab" data-tab="shortcuts" onclick="switchHelpTab('shortcuts')">Shortcuts</button>
</div>
<button class="ex-modal-close" onclick="closeHelpModal()" title="Close"><i data-lucide="x" width="18" height="18"></i></button>
</div>
<!-- Features Tab -->
<div class="help-tab-content active" id="helpTabFeatures">
<div class="help-section">
<div class="help-section-title">Two Modes</div>
<div class="help-row"><span class="help-badge mode-xslt-badge">XSLT</span><span>Transform XML with a full XSLT 3.0 stylesheet — edit XML + XSLT side by side, run, inspect output</span></div>
<div class="help-row"><span class="help-badge mode-xpath-badge">XPath</span><span>Evaluate XPath 3.0 expressions against your XML — results highlighted in the editor with match count</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Interface Controls</div>
<div class="help-row"><span class="help-key">Mode Toggle</span><span>Switch between XSLT Transform mode and XPath Evaluator mode — buttons in the top toolbar</span></div>
<div class="help-row"><span class="help-key">Theme Toggle</span><span>Switch between light and dark themes — toggles colors for better visibility in different lighting conditions</span></div>
<div class="help-row"><span class="help-key">Upload Files</span><span>Load XML or XSLT from your computer — click the upload icon in the pane toolbar or drag & drop directly onto a pane</span></div>
<div class="help-row"><span class="help-key">Download Panes</span><span>Export XML, XSLT, or Output to a file — click the download icon in each pane toolbar (auto-detects output type: XML/JSON/TXT)</span></div>
<div class="help-row"><span class="help-key">Collapse Panels</span><span>Hide side panels to focus on one editor — click the collapse icon (◀/▶) on the left/right column dividers</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Editor</div>
<div class="help-row"><span class="help-key">↵ wrap</span><span>Word wrap toggle per pane — click the wrap icon in any pane bar</span></div>
<!-- Right-click is now prominently featured -->
<div class="help-row help-row-feature">
<span class="help-key help-key-feature">🖱️ Right-click Menu</span>
<span><strong>Power feature — right-click in any editor pane for:</strong>
<ul class="help-feature-list">
<li><strong>Format</strong> — Pretty-print XML / XSLT (also toolbar button)</li>
<li><strong>Minify</strong> — Collapse to single line</li>
<li><strong>Comment / Uncomment</strong> — Toggle line comments</li>
<li><strong>Copy XPath</strong> — Generate exact or general XPath (learn XPath!)</li>
<li><strong>Snippets</strong> — Insert 18 XSLT templates (XSLT pane only) — xsl:for-each, xsl:choose, xsl:if, xsl:variable, xsl:template, xsl:try/catch, all cpi: calls, CPI skeleton and more</li>
</ul>
</span>
</div>
<div class="help-row"><span class="help-key">Drag & drop</span><span>Drop any .xml or .xslt file directly onto the XML or XSLT pane</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Examples Library</div>
<div class="help-row"><span class="help-key">61 examples</span><span>Built-in examples across 6 categories — Data Transformation, Aggregation & Splitting, Format Conversion, XSLT 3.0 Advanced, SAP CPI Patterns, XPath Explorer</span></div>
<div class="help-row"><span class="help-key">Search</span><span>Filter examples by name or description — type in the search box inside the modal</span></div>
<div class="help-row"><span class="help-key">Auto-run</span><span>Optional toggle in the Examples modal — check to automatically run examples after loading, uncheck to review code first</span></div>
<div class="help-row"><span class="help-key">Hints strip</span><span>Clickable XPath chips appear below the expression bar when an XPath example is loaded — click any chip to run it</span></div>
</div>
<div class="help-section">
<div class="help-section-title">XPath Expression Bar</div>
<div class="help-row"><span class="help-key">Colorized</span><span>Live syntax coloring — functions <span style="color:var(--xpt-fn)">amber</span>, attributes <span style="color:var(--xpt-attr)">lavender</span>, strings <span style="color:var(--xpt-str)">green</span>, operators <span style="color:var(--xpt-op)">pink</span>, variables <span style="color:var(--xpt-attr)">$var</span></span></div>
<div class="help-row"><span class="help-key">Auto-grow</span><span>Bar expands to show the full expression — no horizontal scrolling</span></div>
<div class="help-row"><span class="help-key">History</span><span>Last 20 expressions saved — browse with ▲ ▼ buttons or ↑ ↓ keys</span></div>
<div class="help-row"><span class="help-key">Results</span><span>Copy or Clear buttons on the results panel — copy all matches as plain text</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Console</div>
<div class="help-row"><span class="help-key">Filter dots</span><span>Four colored dots — neutral (ALL), blue (INFO), amber (WARN), red (ERROR) — click to filter by type</span></div>
<div class="help-row"><span class="help-key">Search</span><span>Live text filter across all visible log entries</span></div>
<div class="help-row"><span class="help-key">Copy / Clear</span><span>Copy all visible entries as plain text · Clear resets log, filter, and search</span></div>
</div>
<div class="help-section">
<div class="help-section-title">SAP CPI Simulation</div>
<div class="help-row"><span class="help-key">Headers</span><span>Add CPI headers in the left panel — injected as <code>xsl:param</code> values</span></div>
<div class="help-row"><span class="help-key">Properties</span><span>Add CPI properties — same injection mechanism as headers</span></div>
<div class="help-row"><span class="help-key">Field Validation</span><span>Header and Property names turn red if invalid — name must start with a letter or underscore, then use letters, digits, hyphens, dots, or underscores. Hover over the red field for details. Invalid names are skipped during transform.</span></div>
<div class="help-row"><span class="help-key">cpi:set</span><span>setHeader, setProperty fully simulated with dynamic values · reads via <code><xsl:param></code> (matches CPI runtime)</span></div>
<div class="help-row"><span class="help-key">xsl:message</span><span>Logged to console in amber · <code>terminate="yes"</code> shown as warning not error</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Session & Share</div>
<div class="help-row"><span class="help-key">Auto-save</span><span>Everything saved to browser storage 800ms after you stop typing</span></div>
<div class="help-row"><span class="help-key">Clear session</span><span>Mode-aware — resets only what's relevant to current mode, stays in same mode</span></div>
<div class="help-row"><span class="help-key">Share</span><span>Encodes XML + XSLT + headers + properties into a single shareable URL</span></div>
</div>
</div>
<!-- Shortcuts Tab -->
<div class="help-tab-content" id="helpTabShortcuts">
<div class="help-section">
<div class="help-section-title">Running</div>
<div class="help-row"><kbd>Ctrl+Enter</kbd><span>Run XSLT transform (XSLT mode) · Run XPath expression (XPath mode)</span></div>
<div class="help-row"><kbd>Enter</kbd><span>Run XPath expression (when cursor is in the XPath bar)</span></div>
</div>
<div class="help-section">
<div class="help-section-title">XPath History</div>
<div class="help-row"><kbd>↑</kbd><span>Previous expression from history (when cursor is in XPath bar)</span></div>
<div class="help-row"><kbd>↓</kbd><span>Next expression / back to current draft</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Modals</div>
<div class="help-row"><kbd>Escape</kbd><span>Close any open modal (Examples, Share, Help)</span></div>
</div>
<div class="help-section">
<div class="help-section-title">Editor (right-click menu)</div>
<div class="help-row"><span class="help-key">Format XML/XSLT</span><span>Pretty-print the active pane</span></div>
<div class="help-row"><span class="help-key">Minify XML/XSLT</span><span>Collapse to single line</span></div>
<div class="help-row"><span class="help-key">Comment / Uncomment</span><span>Toggle XML comment on selected lines</span></div>
<div class="help-row"><span class="help-key">Copy XPath — Exact</span><span>e.g. <code>/Orders/Order[2]/Amount</code> — positional</span></div>
<div class="help-row"><span class="help-key">Copy XPath — General</span><span>e.g. <code>/Orders/Order/Amount</code> — pattern</span></div>
<div class="help-row"><span class="help-key">Snippets →</span><span>18 XSLT snippets — available on right-click in the XSLT pane only</span></div>
</div>
</div>
</div>
</div>
<!-- JS modules — load order matters: state → domain logic → UI → editor init -->
<script src="js/state.js"></script>
<script src="js/mode-manager.js"></script>
<script src="js/validate.js"></script>
<script src="js/panes.js"></script>
<script src="js/transform.js"></script>
<script src="js/examples-data.js"></script>
<script src="js/modal.js"></script>
<script src="js/files.js"></script>
<script src="js/ui.js"></script>
<script data-goatcounter="https://xsltdebugx.goatcounter.com/count"
async src="https://gc.zgo.at/count.js"></script>
<script src="js/share.js"></script>
<script src="js/xpath.js"></script>
<script src="js/themes.js"></script>
<script src="js/editor.js"></script>
</body>
</html>