I'm trying to use Ant 1.4.1 (in Cygwin on a Windows 98) to execute Xalan.
Specifically, I want to convert an xml file to an html file.  When I run this
command on the command line, everything works as expected (no errors; the file
is translated):

****************
$ java org.apache.xalan.xslt.Process -in greeting.xml -xsl
greeting_html.xsl -out greeting.html
****************

However, when I try to run this build.xml file (which resides in the same
directory as the xml, xsl, and html files):

****************
<project name="Hello, World!" default="build" basedir=".">
    <property environment="env"/>

    <target name="build">
        <java classname="org.apache.xalan.xslt.Process">
            <arg line="-in greeting.xml -xsl greeting_html.xsl -out
greeting.html"/>
            <classpath>
                <pathelement location="${env.XALAN_BIN}/xerces.jar"/>
                <pathelement location="${env.XALAN_BIN}/xalan.jar"/>
                <pathelement location="${env.XALAN_BIN}/bsf.jar"/>
            </classpath>
        </java>
    </target>
</project>

****************

I have the following error:

****************
build:
     [java]
     [java] (Location of error unknown)XSLT Error (java.lang.LinkageError):
loader constraints violated when linking org/xml/sax/InputSource class
Signal 127

****************

I know Ant is sending some semblance of the arguments because when I make this
change to the build.xml:

****************
<arg value="-in"/>
****************

because I get this error:

****************
build:
     [java] Missing argument for option: -IN
     [java]
     [java] (Location of error unknown)XSLT Error (java.lang.LinkageError): load
er constraints violated when linking org/xml/sax/InputSource class
Signal 127
****************
Xalan needs a set of arguments and a values (e.g., -in greeting.xml -xsl
greeting_html.xsl -out greeting.html)

It seems I can't make Ant understand this.  What am I doing wrong?  I've even
tried using an <arg value="..."/> for each argument and file name (e.g., <arg
value="-in greeting.xml"/>, but I believe the documentation says you can have
only one instance of an arg.

Thanks.

Chris Gardner



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to