How to migrate away from XSLT
You have until Nov 17, 2026. Pick one of four routes for each file, starting with the cheapest that is good enough.
Last updated: · What changed: Added an accuracy table, coverage statement and Chrome 158 sourcing, and a new operator section on the About page.
Find the files
List every sitemap, feed and XML page your site serves. Run each address through the checker; it shows the stylesheet line and says which are XSLT. Search your code for XSLTProcessor too: that is the script side of the same removal.
1. Remove the line
If nobody needs a styled view, delete the xml-stylesheet line. The file becomes plain XML. Search engines and feed readers behave as before. This is the right answer for most feeds.
2. Swap in CSS
For a readable page without scripts, replace the line with a CSS one. Use the sitemap CSS generator or the feed CSS generator. CSS keeps working in browsers after the change.
3. Render at build time
If you need the table, the sort or the exact layout, run the transform when you build and publish the result as HTML. With the libxslt command line:
xsltproc -o sitemap.html sitemap.xsl sitemap.xml
Or with Node, using the xslt-processor package (pure JavaScript; its licence is LGPL-3.0, so check that it suits your project):
// render.mjs -> node render.mjs sitemap.xml sitemap.xsl > sitemap.html
import { readFileSync } from 'node:fs';
import { Xslt, XmlParser } from 'xslt-processor';
const [xmlFile, xslFile] = process.argv.slice(2);
const parser = new XmlParser();
const html = await new Xslt().xsltProcess(
parser.xmlParse(readFileSync(xmlFile, 'utf8')),
parser.xmlParse(readFileSync(xslFile, 'utf8')),
);
process.stdout.write(html);
Link the HTML file from your site and keep serving the XML for crawlers and readers, without the stylesheet line. To try a stylesheet first, paste it into the converter.
4. Add the polyfill
If you cannot touch the build, add the script line to the XML file or the script tag to the page. It costs about 1.4 MB per view; read the self-hosting guide first.
Many files at once
A site with dozens of feeds or sitemaps needs the same fix applied in a loop. The Batch Pack ($9, one time) generates a Node script that renders every XML file in a folder with its stylesheet, and checks up to 200 addresses at once.
Questions
What is the quickest way to stop relying on XSLT?
Delete the xml-stylesheet line. The XML data and how crawlers read it do not change; only the styled view in a browser goes away.
How do I keep the table view of my sitemap?
Either replace the XSL line with a CSS stylesheet for a simpler look, or render the table as an HTML page at build time and link to that page.
Can I run XSLT on the server instead?
Yes. A server-side or build-time transform is not affected by browser changes. xsltproc, Saxon and similar tools produce HTML that every browser can show.
What about code that uses XSLTProcessor?
Move the transform to the server, replace it with JavaScript that builds the HTML, or load the polyfill, which provides the same XSLTProcessor class.
How do I know I fixed it?
Run the address through the checker again. A file with a CSS line reads “Safe (CSS stylesheet)”, and one with no line reads “No stylesheet”.