test-sch.xfront.example09.run-xalan.bat Maven / Gradle / Ivy
@ECHO OFF
set which_xalan=xalan-j_2_3_1
if '%1 == ' goto no-params
if %1 == help goto myhelp
if not exist %1 goto no-xml-file
if not exist %2 goto no-xsl-file
set rootdir=..\..\..\
if not exist %rootdir%jre\1.2\lib\rt.jar goto no-rt
if not exist %rootdir%xslProcessors\%which_xalan%\bin\xercesImpl.jar goto no-xer-jar
if not exist %rootdir%xslProcessors\%which_xalan%\bin\xml-apis.jar goto no-xmlapis-jar
if not exist %rootdir%xslProcessors\%which_xalan%\bin\xalan.jar goto no-xal-jar
set oldPath=%path%
set oldCLASSPATH=%CLASSPATH%
set path=%rootdir%jre\1.2\bin
set CLASSPATH=%rootdir%jre\1.2\lib\rt.jar
set CLASSPATH=%CLASSPATH%;%rootdir%xslProcessors\%which_xalan%\bin\xercesImpl.jar
set CLASSPATH=%CLASSPATH%;%rootdir%xslProcessors\%which_xalan%\bin\xml-apis.jar
set CLASSPATH=%CLASSPATH%;%rootdir%xslProcessors\%which_xalan%\bin\xalan.jar
set CLASSPATH=%CLASSPATH%;.
echo.
echo ---------------------------------------------------------
echo Running the XSL Processor, xalan, with the following specifications:
echo - XML File: %1
echo - XSL File: %2
echo - Output File: %3
echo ---------------------------------------------------------
java -classpath %CLASSPATH% org.apache.xalan.xslt.Process -IN %1 -XSL %2 -OUT %3
set path=%oldPath%
set CLASSPATH=%oldCLASSPATH%
goto eof
:no-params
cls
echo Oops! You need to run the batch file with 3 arguments.
echo Here's how to use it ...
echo.
echo Usage: "run-xalan
© 2015 - 2024 Weber Informatics LLC | Privacy Policy