Skip to main content

Simple XSL transformation test tool

I know, I know. There's a lot of tools out there to help with editing XML and XSL files and a whole lot of other mess.

While creating an XML-based web site system in my current role, I wanted to be able to just test my XSL before plugging it in to my code in case it started causing any difficulties. Basically, all I need was a transformation tool that works like in Altova XMLSpy.

I couldn't find many, and when I did, in some cases it wasn't presented in an obvious way where the general interface complicated things. Almost giving up, I decided to hack together a simple tool myself. Since the required system is in ASP.NET and I haven't done application development in a long time, I gave C# a shot.

For me the tool worked like a charm and does "exactly what it says on the tin". My colleagues even took a liking to it. So I would like to share it with you.

I've simply called it XML Transformer and you can get hold of it from here.

Features

There's not much to it but here goes:
  • Load XML and XSL files
  • Create new XML and XSL files - basic necessities are already provided
  • Be able to edit and save XML and XSL files
  • Tab-based interface
  • Quick preview of XML and XSL transformation in separate tab - can right click to view source
Limitations
  • There's no colour coding for the editor. Never really bothered as this was not important.
  • Does not handle more than one XML or XSL file.
  • Cannot save the preview to a file on the hard drive.
    Well... the tool actually saves the transformation to a html file for the preview, where the viewer picks up the file and displays it. The file is saved as output.html in the same directory as the executable. This file is deleted when the application exits.
  • Any changes made to an XML or XSL file are automatically saved back when transforming, so please make backups
Feel free to make use of this tool and leave feedback. I'm not really doing anything with this tool as it was quickly made for a specific use. But, depending on feedback I might pick it up and turn it into a pet project, and maybe release it open source.

Comments

Popular posts from this blog

Open Source alternatives to Adobe Creative Suite

With the take over of Macromedia by Adobe, they have increased their arsenal of design packages, as well as the price. No-one can do pretty much without the popular package of Photoshop for their images, and Dreamweaver for websites, especially aspiring design students who do not have much money. Nevertheless, open source software has come to save the day. What is open source software? In a nutshell it is free software with its source-code freely available to those who would like to expand or improve on the software. To expand further, anyone who’s tinkered with the source code such as optimisation or additional functionality can resubmit it back to the holders and let others enjoy the fruits of your labour. I have trawled through the World Wide Web to find out how everyone can benefit from Open Source to build up their own studio and compete against Adobe Creative Suite. All this for free, apart from the cost of the Internet. I am planning to have a facility where you can purchase...

Javascript form validation

One of the most popular uses of Javascript is when it comes to validating user input on a form. The most hateful way, though, is by not using onsubmit. A number of times I come across code where someone uses an image in place of the submit button and uses the onclick event which will validate then submit the form. Yeauch! Very bad practice! The first thing to do with the form is place the Javascript function in the onsubmit attribute for the form, e.g. <form name="reg" method="post" onsubmit="return validateForm();" The use of return lets the form submit when the function returns true. If the function does not return true (i.e. false) then the form will not submit - as shown below. function validateForm(){ return false; } Getting a reference to the form is the next step. There are a number of ways to do this: document.forms[0] document.forms['reg'] document.getElementById('reg') This will work when id is used on the form Passing an o...

Microsoft Bing

It's nice to see the Press taking a much more keen interest in technology and gadgets. So I wasn't that much surprised when the Metro covered the launch of Microsoft Bling. Currently in beta Microsoft is obviously renewing their competition against Google. I've also noticed that Microsoft has recently replaced the Live search with Bing on their MSN page. But after using it, why do I get the impression that it's just copying Google with a more colourful interface?