SAXON on the MAC

Subject: SAXON on the MAC
From: bbrosenstock@xxxxxxxxxxx
Date: Mon, 26 Jul 1999 13:18:45 -0700 (PDT)
Inspired by Chuck White's success with running XT on the Mac, here is a 
report on my success with running SAXON4.4 on the Mac. Some of the steps 
are the same as those laid out for XT, with language borrowed from Chuck 

First, you need to have JBindery, which comes with the MRJSDK. You can find
the MRJ 2.1 SDK (the Apple Java software development kit) at

Then comes the fun part: trying to build command lines using a GUI. It will
help if you refer to the following command line structure provided by 
Michael Kay

java com.icl.saxon.StyleSheet data\books.xml books.xsl >output.html

(N.B.: the file books.xsl is actualy under the styles directory)

1.  When you launch JBindery, you're presented with a screen with six
icons on the left and a series of text fields on the right.  Clicking on
the top icon reveals the fields you use to create your "command line"
setup.  The top-most field is called "Class name".  Here you should input
'com.icl.saxon.StyleSheet'.  This corresponds to the command of the same
name above.  The field below that is called "Optional parameters".  Here,
you should input the file names of books.xml and books.xsl as follows:
'samples/data/books.xml samples/styles/books.xsl'.  I append the 'samples'
directory because I am saving the settings to a file in the 'saxon'
directory, which contains both the 'saxon.jar' file and the subdirectory
'samples'.  Below the "optional parameters" fields are a redirect stdout
drop down menu and a redirect stdin drop down menu.  I left the redirect
stdin alone, but for the redirect stdout I named a file called
"books.hmtl".  This corresponds to the '>output.html' part of the command
line above.  (You select "to file" with the pop-up menu, and be sure to
place 'books.html' in directory which holds the 'samples' subdirectory
(it's called 'saxon' in my setup).  This text file will troubleshoot any
problems you're having, and will contain error information if it does not
contain an html file.  This first set of fields also has a "Save Settings"
option, which is of course a good idea. N.B.: You should have the JBindery 
app in the 'saxon' directory (or whatever you call it) when you set up 
everything. After you save the settings, you will have an application which 
will needs to stay in the 'saxon' directory (since it uses relative paths 
to the books.xml and books.xsl files), but you can remove the JBindery app if 
you want. 

2.  Next, set up the class path (I guess this is normally a first step,
but, hey, I'm on a Mac), which you access with the next icon on the left,
the classpath icon.  This is actually pretty easy in JBindery.  You just
use the dialog box that is revealed on the botton when the classpath icon
is clicked to browse for any jar files you think you'll be using.  I found
that it is necessary to use the "Manual" method to identifty classpaths for
aelfred.jar, sax.jar, and saxon.jar.  (I previously altered the file provided with SAXON to show Aelfred as my parser, and IBMDOM as
my DOM Builder.) I found that 'Desktop Folder' does not get read; here is 
an example of one of my classpaths:
One important item to inlcude manually is the file; 
in my system, like so: file:///MacHD/XML/saxon/

3. The next icon on the left is the properties icon. This is sort of a
confusing interface, but your goal is to mimic the properties of the SAXON 
main class. These are provided in, and, so long as 
you included the file in your classpath manually (as per step 2), these 
properties are read.

The file 'books.html' is output properly after this setup, and continues to 
be output properly when the application icon (the file saved as an 
application from JBindery) is clicked.

All the best,

Bruce Rosenstock
Religious Studies and Classics
University of California, Davis

 XSL-List info and archive:

Current Thread