XSLT Transformer
Apply an XSLT 1.0 stylesheet to XML and preview the HTML, text or XML it produces — in the browser.
What is XSLT Transformer?
An XSLT 1.0 playground that uses the browser's own processor, so what you see is what a client-side transform in your own page would produce — including the places where browsers differ from Saxon or lxml.
How it works
The XML and the stylesheet are both parsed, then handed to XSLTProcessor. The output method is read from the stylesheet's xsl:output element and can be overridden: HTML is shown rendered and as source, text is shown as plain text, XML is serialized from the result tree. Stylesheets that use xsl:include, xsl:import or document() get a warning, because browsers refuse to load the second document and will quietly omit those nodes instead. A sanboxed preview renders HTML output without scripts or same-origin access.
- Paste the document. Drop in XML, a schema, a feed or an XPath expression. Everything is parsed in the page: no upload, no server round trip, and the tools keep working with the network switched off.
- Set the options that match your document. Indent unit, whether to keep comments, which dialect, which output method. The defaults are the safe ones — nothing that changes meaning is enabled for you.
- Read the result, then copy or download it. Results appear as you type, copy straight to the clipboard, and download with a sensible filename (.xml, .xsd, .csv). Reset returns every field to its default.
Examples
A minified document from an API response
Paste one line of XML and the Formatter indents it, wraps long start tags one attribute per line and normalises empty elements — without touching text inside mixed content.
An XPath that works in Chrome and not in your servlet
The XPath Tester evaluates against a real tree and reports the axis or function it cannot support, instead of returning zero nodes and letting you guess why.
A document that will not parse
The Validator gives line and column for every mismatched tag, stray ampersand and duplicate attribute, with the reason in words: which open element was expected, which was found.
A schema that only half matches your data
The XSD Validator marks each violation with the path of the offending node, and the Schema Generator goes the other way — inferring a starting-point XSD from real documents.
Common mistakes
Assuming a pretty-printer cannot change meaning
Whitespace between elements is often insignificant, but inside mixed content it is not: `<p>Hello <b>world</b></p>` must stay on one line. Formatting here re-indents element-only content and leaves mixed content alone.
Treating a validation pass as proof of interoperability
The DTD and XSD validators implement honest subsets. A document reported valid here can still be rejected by a full validator that understands identity constraints, substitution groups or XSD 1.1 assertions — each page lists what it does not cover.
Reading the whole document because the parser did
A DOCTYPE is not inert. If your parser resolves external entities, pasting an untrusted document is enough to read a file or call an internal URL. The XXE Risk Checker shows what a document asks for; the fix is in the parser configuration.
Forgetting that attributes and elements are not interchangeable
`<id>1</id>` and `id="1"` mean different things to every schema and every XPath. When converting to CSV or YAML the distinction is preserved (`@id`), because flattening it away is the change that costs an afternoon later.
Frequently asked questions
Why is my XSLT 2.0 stylesheet not working?
Because no browser ships an XSLT 2.0 processor. xsl:for-each-group, xsl:function, xsl:sequence, user-defined functions and typed sequences are all 2.0 or later and will fail or be ignored. For those, run Saxon; this tool is honest about being a 1.0 engine.
Why are the nodes from my document() call missing?
Browsers block the second fetch. Allowing a stylesheet to pull an arbitrary URL is a cross-site request, so Chrome, Firefox and Safari simply do not load it. Paste the referenced content into the stylesheet as a literal variable, or run the transform server-side.
Is it safe to paste an untrusted stylesheet?
In this tool, yes: the transform runs against the document you paste, cannot reach the network, and the preview is sandboxed without scripts. In your own application the answer is different — XSLT extensions in some processors can call out, which is why you should not run untrusted stylesheets where extensions are enabled.