The problem
An XML sitemap is written for search engines. It lists the pages of a website in the format defined at sitemaps.org, and crawlers read it as data. People open it too, though: site owners checking that a page is listed, developers, auditors. Shown raw, it is a wall of tags.
For years the usual way to make a sitemap readable was an XSLT stylesheet, declared at the top of the file:
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
The browser transforms the XML into an HTML page. Many sitemap plugins still ship this way.
That route is closing. Chrome's developer documentation (published 29 October 2025) announces that Chromium has deprecated XSLT, both the XSLTProcessor API and the XSLT processing instruction, and gives a removal schedule: XSLT stops working in stable Chrome 158, dated 17 November 2026, apart from origin-trial and enterprise-policy exceptions that end with Chrome 176. The same document notes that the Firefox and WebKit projects have indicated plans to remove XSLT as well, and that Chrome shows a warning banner when it meets XSLT that it no longer runs.
The approach
The same document points out what is not being removed: the <?xml-stylesheet?> processing instruction with type="text/css". A CSS stylesheet can lay out raw XML elements directly, as it can HTML. So the PrajnaBytes sitemap uses plain CSS:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/sitemap.css?v=…"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://prajnabytes.com/</loc></url>
…
</urlset>
We tried an XSLT version first. It worked, and was removed the same day once the deprecation warning appeared. The CSS version has replaced it since (decision DEC-067 in our records).
How it works
Every element in the sitemap can be selected and styled like an HTML element:
urlsetbecomes the page:display: block, a background and a coloured top border.urlset::beforedraws the header. Generated content (content: "…") carries the company name as an ASCII banner, withwhite-space: preto keep its line breaks, and abackgroundplaces the emblem.- Each
urlbecomes a card. A CSS counter (counter-increment: page) numbers the cards, andurl::beforeshows the number in a coloured badge that cycles through the brand colours with:nth-of-type(5n+…). locis set in a strong weight, withword-break: break-allso long addresses wrap on phones.- A
prefers-color-scheme: darkquery provides a dark version.
Three practical details:
- A static file. The site's Content Security Policy does not allow inline styles, so the CSS lives in
public/sitemap.css, not inside the XML. - Cache busting. The stylesheet address carries a short hash of the file (
?v=…), computed when the sitemap is generated, so a changed design is never hidden behind a cached copy. - Nothing changes for crawlers. Search engines read the
urlsetas before; the processing instruction is ignored by them.
We also stopped the sitemap from drifting out of date. An automated test walks every public page route of the application and fails if one is missing from the sitemap, unless the page is deliberately excluded (sign-in, private areas, pages disallowed in robots.txt).
We checked the result in the Chromium, Firefox and WebKit engines (the browser builds used by our automated browser tests) on 5 November 2026: all three apply the stylesheet.
Trade-offs
- No links. CSS can style text but cannot turn an XML element into a hyperlink, so the addresses in the human view are not clickable. XSLT could produce real links. For a page that people mostly read, we accepted this.
- No transformation. CSS cannot sort, group or filter entries. What you see is the document order. Group related pages when you generate the file if order matters.
- Generated content is decorative. Text added with
::beforeis not part of the data. Keep anything important in the XML itself. - Large sitemaps. CSS renders every entry. A sitemap with tens of thousands of URLs will be long; split it with a sitemap index, as the protocol recommends.
If your sitemap, RSS feed or other XML relies on an XSLT stylesheet for its human view, check it before Chrome 158 reaches your users. For a readable listing, CSS is often enough.
خدمات PrajnaBytes ذات الصلة
Sitemaps and site health are part of looking after a website (Technology Operations) and of making it findable (Digital Marketing and Digital Business Services).
- Technology Operations
Hosting, domains, certificates, maintenance, monitoring, backup and security support, so that business systems stay available and maintained.
- Digital Marketing and Digital Business Services
Search, social media, email and paid campaigns run as a measured part of the business, connected to the website and systems behind it.
اطلب استشارة تقنية
Not sure whether your website, feeds or sitemaps depend on XSLT? Ask us to check.
القراءة مجانية ولا تتطلب أي بيانات. لا نطلب بيانات الاتصال إلا إذا قررت مراسلتنا.
عن هذا المنشور
كيف أُعدّ. Drafted with AI assistance from our engineering records (decision DEC-067, the sitemap code and its tests), then edited.
المراجعة. Checked on 5 November 2026 against the live sitemap, its source code and automated test, and the Chrome documentation cited below.
المراجع
- Removing XSLT for a more secure browser. Chrome for Developers. Published 29 October 2025; accessed 5 November 2026.
- Sitemaps protocol. sitemaps.org. Accessed 5 November 2026.
- Associating Style Sheets with XML documents 1.0 (Second Edition). W3C Recommendation. Accessed 5 November 2026.
- Build and submit a sitemap. Google Search Central. Accessed 5 November 2026.