v147 · HTML · SVG · XSLT
Remove inline XSLT for production of SVG
Chrome 147 removes support for using inline XSLT stylesheets to transform XML into SVG that is then rendered directly in the page. XSLT-produced SVG content is no longer rendered — the XSL processing instruction in XML documents served with text/xml or application/xml no longer produces rendered SVG output.
concepts
-
XSLT SVG Demo
Demonstrates what the removed behaviour looked like — XML with an XSLT processing instruction that produced SVG — and the error Chrome now shows, compared to alternative SVG delivery methods that still work.
-
Migration Guide
How to replace XSLT-to-SVG rendering: serve SVG directly, use
XSLTProcessorin JavaScript, or transform server-side before sending to the browser. -
SVG from DOMParser
Live SVG editor using
DOMParser.parseFromString(markup, 'image/svg+xml')— the recommended XSLT replacement for client-side SVG parsing. Five presets (circle, bar chart, star, text path, gradient) plus parse timing and error reporting. -
XSLT to JS Converter
Paste an XSLT stylesheet that produces SVG and the tool generates equivalent JavaScript using
DOMParser/DOMImplementation. Three built-in presets, a "Test original XSLT" button that shows whether it still works in your browser, and a "Run JS equivalent" button that demonstrates the migrated code. -
Compatibility Lab
Detects
XSLTProcessor(still available for JS-driven transforms),DOMParserwithimage/svg+xmlsupport, and inline SVG rendering. Runs a liveDOMParser.parseFromString()SVG round-trip to confirm the recommended migration path works in this browser.
why it shipped
XSLT (XSL Transformations) in browsers is a legacy feature that was supported primarily for compatibility with older XML-centric workflows. Inline XSLT that produces SVG was a niche use case (XML served with an <?xml-stylesheet type="text/xsl"> processing instruction pointing to an XSLT that generated SVG). Chrome's XSLT implementation has ongoing security concerns, and this specific code path — inline XSLT → SVG rendering — was particularly complex and rarely used. Chrome 147 removes it as part of the ongoing simplification of the XSLT subsystem.
the change
<!-- BEFORE Chrome 147: this XML would render as SVG in the browser
when served with Content-Type: application/xml -->
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
<data>...</data>
<!-- transform.xsl produced SVG — Chrome 147 no longer renders this -->
<!-- INSTEAD: serve SVG directly -->
<!-- Option 1: inline SVG in HTML (always worked, still works) -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="40"/>
</svg>
<!-- Option 2: serve .svg files with Content-Type: image/svg+xml -->
<img src="diagram.svg" alt="Diagram">
<!-- Option 3: transform server-side, send the SVG result -->
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗