TestXSLT is a free tool for learning, experimenting with and using the XSL language (both the XSLT and the XSL-FO parts) in a convenient way on Mac OS X. It offers several XSLT processors (Sablotron, Gnome LibXSLT, Saxon and Xalan-J) as well as the Apache FOP XSL-FO rendering engine which produces on-screen previews as well as PDF files. For authors of stylesheets which produce HTML, it makes use of the WebKit HTML rendering engine, allowing previews right in the application.
The program takes an .xml and an .xsl file and either displays the result of the transformation in an output window or writes it to a file.
You can either edit the XML and XSLT code directly in the program or you can load them from files on disk. Try drag and drop for the latter.
There are some examples included to get you started. The first is this Readme document which you are reading right now. It was written and is maintained in XML. I have included several stylesheets which convert the XML input file into an RTF document, into an HTML page and into XSL-FO and thus PDF. Study the input, the stylesheets and the output files carefully to learn some basics. The stylesheets are commented.
I also add new interesting examples to the "More Examples" directory all the time. Just play around with the files and see what happens...
Comments, feedback and feature suggestions are welcome to the address above.
If you own BBEdit, I suggest that you check out my "BBEdit XSLT Glossary" package, available from my homepage. TestXSLT has been optimized to work well with BBEdit. You can edit and save an XSLT file in BBEdit, switch back to TestXSLT and the XSLT code will be updated from disk immediately.
If you need help or would like to comment on the program, there is an online user forum for TestXSLT at http://www.entropy.ch/phpbb2/
Mac OS X 10.2. and Safari 1.0 must be installed on your system.
Date |
Version |
Changes |
17-DEC-2003 |
3.0 |
- Changed keyboard shortcut for "Find Again" from Cmd-D to Cmd-Shift-G as 1.) that seems to be the new convention for Cocoa apps, 2.) it's used in BBEdit, and 3.) I like it better :-)
- When dragging a file to the document window, you can now hover the mouse pointer over the tab labels to switch tabs without interrupting the drag. This is useful for example if you want to drag an XML document to the XML tab, but you forgot to switch to that tab first and the XSLT tab is in front.
- there's now a base URL text field in the HTML preview pane. It allows you to enter a URL against which relative references are resolved.
- There are two new "File" menu commands with associated keyboard shortcuts to "Save As..." and "Save" the text in the current pane (XML, XSLT, Result) to a file. This is the equivalent of the corresponding buttons on each of the panes.
|
08-SEP-2003 |
2.9 |
- The highlight of this release is a new tag scanner, resulting in much smarter tag completion, and a list of the currently open tags at the top of the editor window. Check it out...
- Reworked the GUI update code, thus improving the general responsiveness and performance of the application.
- Major internal cleanup regarding encodings. If a dropped/opened file has an XML declaration with encoding information, that will be used, both when reading and when saving out to the file again. Make sure you activate the corresponding option in BBEdit too. If no such declaration exists, the platform default will be used (i.e. Macintosh encoding). Also, the encoding of the result of the transformation is currently assumed to be what's declared in the declaration of the XSLT code. This means you cannot use a different encoding in the xsl:output element.
- The fixed encoding issues also mean that xsl:include directives referring to file names with non-ascii characters work now, e.g. <xsl:include href="gähn.xsl"/>.
- Added a new XSLT example, the first one to produce XSL-FO. It converts the readme.xml file to XSL-FO / PDF, so there are now three output formats for the readme.xml file: HTML, XSL-FO / PDF and RTF. As always, this is intended to get you started with learning XSLT and in this case also XSL-FO. An excellent introduction to the FO part is available at http://www.ibiblio.org/xml/books/bible2/chapters/ch18.html
- Fixed a bug which would prevent XSL-FO / PDF rendering to hang the application if images were used in the document.
|
17-AUG-2003 |
2.8 |
- Embedded the FOP XSL-FO rendering engine from the Apache Project. This means that you can now view the result of a translation which produces XSL-FO instructions directly in the application. You can also save the output as a PDF file. With this addition, TestXSLT is now a useful learning tool for the XSL-FO language.
- A new, fourth XSLT engine has been added, the Java Xalan processor from the Apache project.
|
05-AUG-2003 |
2.7 |
- Embedded Apple's WebKit/KHTML/Safari HTML rendering engine. This means you can now view the result of a transformation which produces HTML output directly in the "Result" pane of the application, no need to go to an external browser anymore.
- Now includes the Java Saxon XSLT processor, made possible by the Java/Objective-C bridge. Fun stuff...
- Added a new, short and interesting example XSLT file. It converts a Safari Bookmarks.plist XML file to an HTML page.
|
01-APR-2003 |
2.6 |
- When a file used as XML or XSLT source in TestXSLT is modified on disk externally, e.g. in another editor like BBEdit, and TestXSLT is brought back to the front, it will reload the file contents from disk, unless there are local, unsaved changes. In that case, the program will prompt the user if the unsaved changes should be preserved or discarded. This also has the effect that if the same file on disk is loaded into two different document windows and is edited and saved in one of them, the data will be updated in the other windows using the same file when they are brought to the front.
- Very complex stylesheets with lots of relative file dependencies like the Docbook XSLT kit from http://docbook.sourceforge.net/projects/xsl/ now work correctly, but only with the Libxslt processor. Sablotron seems to be broken in this regard, I'm investigating. (The actual changes for Libxslt: Now initializing the XML and XSLT libraries correctly)
- The XSLT processor type is now selectable via AppleScript. The "Demo Applescript" has been updated to give an example of this new capability. (Thanks to Damien Johnston and Bill Turner for the suggestion.)
- Fixed a bug where the file path for XML or XSLT source files was only updated when the files were dragged, not when using the "Open" buttons.
- Fixed incorrect invocation of sheets for "Jump To Line" and "Find" panels. This could lead to strange behavior of the error message drawer.
- Only of interest to developers: The Project Builder setup has been reorganized quite a bit (All libraries (libiconv, libexpat, libsablot, libxml2, libxslt) are now embedded frameworks, and were updated to the latest releases).
|
15-OCT-2002 |
2.5 |
- The "Find" machinery is now connected to the system-wide find pasteboard. This means that the current find string is communicated to and from most other Cocoa applications, and some Carbon applications like BBEdit.
- Relative references in xsl:import and xsl:include statements can now be resolved if the content of the XSLT pane was loaded from or has been saved to a file on disk.
- The filenames for the XML, XSLT and result panes are now saved in the workset document, along with the content itself.
|
26-SEP-2002 |
2.4 |
- Fixed bug where clipping files were not treated as such during drag and drop into the text views.
- Now distributing the demo AppleScript in .sit format because CVS eats it otherwise.
- Added autocompletion when you type the start of a closing tag (Thanks to Fabio Vena for the suggestion).
- Added a short flash of the opening tag name on autocompletion.
- Added a processing time indicator so you can get an idea about the performance impact of changes (Thanks to Michael Wechner for the suggestion).
- Added "Jump To Line" command.
- Added Undo support.
- Added "Find" command.
- Added Online Help containing the XSLT and XPath specification documents.
|
05-AUG-2002 |
2.3 |
- Now includes the Gnome Libxslt processor in addition to Sablotron. You can choose which one is used with a popup-menu at the bottom of the window.
- Added a cool tag-completion feature. Type an opening tag and hit the ESC key and the program will automatically insert the closing tag.
- Added a small icon in the XML and XSLT panes that indicates if the code you entered is well-formed XML while you type. You can immediately see if the code is correct. Leave the mouse positioned over the icon to get more information in the Tool Tip.
- Added "Save" function to XML and XSLT panes. This means you can re-save after you saved once with "Save As...", or after importing text with drag-and-drop from a file.
- Added beep when a transformation fails (Thanks to Severin Klaus for some UI improvement suggestions).
|
20-JUL-2002 |
2.2 |
- Added drag and drop support for the XML and XSLT panes (Thanks to VersionTracker user ximian420 for the suggestion).
- Added "auto save" and "auto show" check boxes to the result pane (Thanks to Matthias Aebi for the suggestion).
- I finally found out how to get at the error messages of the XSLT processor, so errors are now displayed and you do not need to use the Console application any more.
- Fired up Photoshop and added an icon :-)
|
06-JUL-2002 |
2.1.1 |
- Bug fix release as 2.1 wouldn't even launch on most machines because of a link mistake.
|
06-JUL-2002 |
2.1 |
- This version adds AppleScript support, you can now use it to run XSLT transformations in AppleScript.
|
10-MAR-2002 |
2.0 |
- This is a complete rewrite in from scratch in Objective-C using the Cocoa frameworks on Mac OS X. It has much more features, is no longer a Java application and is now based on a different XSLT processor (Sablotron instead of Xalan).
- The only thing that's missing are meaningful error messages in the program. You have to open the console to see the error messages.
|
12-DEC-2001 |
1.5 |
- Improved error reporting. Now prints exact location of errors in input XML and XSL files.
|
11-DEC-2001 |
1.4 |
- udpated to Xalan-J 2.2_D13
- Now using JAXP / TrAX APIs so the parser and XSL processor could be switched
- Included Readme XML and XSL Files
|
29-APR-2001 |
1.3 |
- added "Choose" buttons so it no longer relies exclusively on DnD
|
13-APR-2001 |
1.2 |
- Mac OS X-only, added own output window instead of using console
|
10-FEB-2001 |
1.1 |
- added save to file functionality
|
04-FEB-2001 |
1.0 |
|