Two more things:

1) This:

['serializer.jar', 'xml-apis.jar', 'xercesImpl.jar', 'xalan.jar'].each 
do |lib_name|
  Rjb::load("#{RAILS_ROOT}/lib/#{lib_name}", ['-Xmx512M'])
end

is not the best way to do the Rjb::load business, since Rjb::load is 
what establishes the JVM.  What the code above does is attempt to load 
the JVM and change the classpath 4 different times, which doesn't really 
make sense.  What that probably should be is:

classpath = ''

['serializer.jar', 'xml-apis.jar', 'xercesImpl.jar', 'xalan.jar'].each 
do |lib_name|
  classpath << "#{lib_name}:" #Use ; for Windows
end

Rjb::load("#{classpath}", ['-Xmx512M'])

In fact, I ended up doing the Rjb::load once in my application.

2) As it turns out, under J2SE 1.5.0 (Java 5, whatever), you don't 
actually _need_ Xalan to do XSL transformations if you are ok with the 
default implementation provided with the JDK.  So the solution posted 
previously works without any Rjb::load() statements and just the 
contents of the XalanSupport.do_XSL_transform method.

Wes

-- 
Posted via http://www.ruby-forum.com/.