[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: Xalan-Java Windows installation
N. Ganesh Babu wrote:
1. Java Installation
j2sdk-1_4_2 is not the latest version. jdk-1_5_0_03-windows-i586-p is the latest
version. Download this from the location
Follow the installation instructions. by default the installation will be in the
folder C:\Program Files\Java\jdk1.5.0_02\.
Add the path C:\Program Files\Java\jdk1.5.0_02\bin to autoexec.bat. with the
set path=C:\Program Files\Java\jdk1.5.0_02\bin
set classpath=C:\Program Files\Java\jdk1.5.0_02\lib\tools.jar
2. Xalan Installation.
extract the zip file to c:\
add the following lines to your autoexec.bat files after tools.jar
Restart you system now.
Now execute the fillowing command. Replace foo with your input files.
|java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.out|
you can see your transformed output in foo.out.
Wendell Piez wrote:
At 05:24 PM 5/2/2005, you wrote:
I am migrating a set of stylesheets from a Microsoft to a Java environment.
The stylesheets were originally written for the MSXML4 parser, but now they
are going to use Xalan-Java.
I'd like to install Xalan-Java for Windows on my desktop so that I can view
transformations locally. So far I have downloaded the current Xalan-Java
binary (xalan-j-current-bin.zip) as well as the Java 2 SDK
(j2sdk-1_4_2_08-windows-i586-p.exe). I'm not sure what to do next.
I'm not an XSL newbie but I am new to Java.
Well there's no such thing as "Xalan-Java for Windows", that's the first
lesson. Java is Java, on any platform. :->
Unfortunately, since Xalan is just like most any other Java application, your
question isn't really an XSL question, but sits on the edge.
But: you need to install and run a JVM (Java Virtual Machine), an application
which in effect provides a little computer to run Java bytecode (the stuff you
get when you download Xalan), inside your computer.
Once you've installed the Java SDK and unzipped Xalan, you can invoke Xalan
from a command line -- Xalan docs give info on how to do that: see
The part you'll probably find confusing is the "classpath" bit. A good
beginner's book to Java can help, but basically this is a matter of telling
Java where to find Xalan. So for example if you have an environment variable
XALANHOME you might say
foo.xml -XSL foo.xsl -OUT foo.out
which will load Xalan and use it to transform 'foo.xml' into 'foo.out' using
'foo.xsl'. (The "-cp" flag indicates the classpath.)
If you're accomplished with shell scripts (e.g., on Windows, DOS batch files)
you'll find that knowledge will come in handy for saving you from repetitive
typing. People frequently load entire classpaths into environment variables;
in my case I have so much Java all over my system that I tend to wrap these up
Alternatively, you could try an XML/XSLT editing environment like oXygen,
which installs in Windows, is written in Java, and runs Xalan for its
transformations (you can also run Saxon in it if you like). This is a
reasonably-priced editor that sets it all up for you:
http://www.oxygenxml.com. (I'd make sure your machine has the horsepower to do
this, however - it runs okay in a 1GHz processor w/ 384MB RAM.)
Or you could try http://www.xmlcooktop.com/, which isn't very fully-featured,
and requires more in the way of setup. But it does wrap things up for you --
and the price is right.
Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
Mulberry Technologies: A Consultancy Specializing in SGML and XML
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format