Nik's Technology Blog

Travels through programming, networks, and computers

View Output of an XSLT Transformation using Firefox

XSLT is a powerful method of converting XML into another well-formed XML based document. You can for example transform RSS syndication format into ATOM and even XML into XHTML.

Probably the easiest way to debug your XSLT is to use the Firefox web browser. Make sure you have the Web Developer toolbar (by Chris Pederick) installed.

You'll need to add a stylesheet to the XML document you're transforming using a declaration like this:


<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="transformAtomFormat.xsl"?>

Then in Windows Explorer right-click the XML document and open in Firefox. You'll see the rendered output of your transformation in the browser. If you view the page source you'll see your XML source, not much use when you want to see the output source of your XSLT transformation. For this you need to right click somewhere on the page, find the Web Deveoper toolbar menu and choose "View Generated Source" from the sub-menu. Now you'll see what Firefox is rendering to the screen.

Find out more about XSLT at W3 Schools

Comments are closed