v147 · HTML · SVG · XSLT

XSLT to JS Converter

Paste an XSLT stylesheet that produces SVG on the left. The tool generates equivalent JavaScript using DOMParser and DOMImplementation on the right. Test both approaches — the original XSLT path fails in Chrome 147, the JS equivalent keeps working.

Built-in presets

XSLT stylesheet Removed in Chrome 147
Generated JavaScript Works in Chrome 147+
XSLT output (Chrome 147 removed)
Click "Test original XSLT" to attempt inline XSLT processing.
JS output (runs everywhere)
Click "Run JS equivalent" to see DOMParser-based SVG.

How the converter works

The converter analyses your XSLT's <xsl:template> rules and emits JavaScript that builds the same SVG using standard DOM APIs. The generated code uses DOMParser.parseFromString(svgSource, 'image/svg+xml') to parse the SVG string and inserts it into the document — the exact pattern recommended as a drop-in replacement for XSLT-to-SVG workflows.

For complex XSLT (loops, conditionals, computed attributes), the converter emits a commented scaffold showing where your logic maps — you fill in the dynamic parts. For simple SVG-producing templates, the output is directly runnable.

References

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗