You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "M. Erik Husby" <mh...@genome.wi.mit.edu> on 2002/12/20 20:52:58 UTC

Style Task problems - no output no error messages.

I have an interesting problem with the Style task - no output, no error 
messages.

Now I know the Style task works in my setup because I have it working 
with the CVS Changelog.xsl file. My problem is with an XSL file that 
I've written. The interesting thing is this xsl file works when I use 
the Xalan org.apache.xalan.xslt.Process program, so I am assuming that 
my xsl file is well structured.

Here is my build.xml file
<project name="xslt" default="dostyle" basedir=".">
<target name="dostyle">
<style in="filecab.xml"
       out="filecab.html"
       style="filecab.xsl" >
</style>
</target>
</project>

The following shows the behavior of running Ant with and without the 
files existing. Lastly it shows the effect of running the 
org.apache.xalan.xslt.Process program. I have verified that the exact 
same jar files are in the $ANT_HOME\lib directory as are in the Xalan 
directory.

I am running Ant 1.5.1, Xalan-j 2.4.1 with Java 1.4.0 on Windows NT 4, 
service pack 6.

As I stated, I know the Style task can work because I have it working 
with the CVS Changelog.xsl transform. I also have the JUnitReport 
transformations working.

I am completely baffled. Especially by the lack of error messages if the 
files do not exist. Any thoughts?

I:\Projects\xslt>dir
 Volume in drive I is Users
 Volume Serial Number is 18E4-1E48

 Directory of I:\Projects\xslt

12/20/02  01:56p        <DIR>          .
12/20/02  01:56p        <DIR>          ..
12/20/02  01:56p                   193 build.xml
12/06/02  04:29p                   167 filecab.xml
12/20/02  12:57p                   858 filecab.xsl
               5 File(s)          1,218 bytes
                             43,319,296 bytes free

I:\Projects\xslt>ant -verbose
Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.0\jre
Detected OS: Windows NT
parsing buildfile build.xml with URI = file:I:/Projects/xslt/build.xml
Project base dir set to: I:\Projects\xslt
Build sequence for target `dostyle' is [dostyle]
Complete build sequence is [dostyle]

dostyle:
    [style] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison

BUILD SUCCESSFUL
Total time: 0 seconds
I:\Projects\xslt>dir
 Volume in drive I is Users
 Volume Serial Number is 18E4-1E48

 Directory of I:\Projects\xslt

12/20/02  01:56p        <DIR>          .
12/20/02  01:56p        <DIR>          ..
12/20/02  01:56p                   193 build.xml
12/06/02  04:29p                   167 filecab.xml
12/20/02  12:57p                   858 filecab.xsl
               5 File(s)          1,218 bytes
                             43,315,200 bytes free

I:\Projects\xslt>

And if I get rename the files, I still get no errors

I:\Projects\xslt>rename filecab.xml filecab.xml-old

I:\Projects\xslt>rename filecab.xsl filecab.xsl-old

I:\Projects\xslt>dir
 Volume in drive I is Users
 Volume Serial Number is 18E4-1E48

 Directory of I:\Projects\xslt

12/20/02  01:59p        <DIR>          .
12/20/02  01:59p        <DIR>          ..
12/20/02  01:56p                   193 build.xml
12/06/02  04:29p                   167 filecab.xml-old
12/20/02  12:57p                   858 filecab.xsl-old
               5 File(s)          1,218 bytes
                             43,192,320 bytes free

I:\Projects\xslt>ant -verbose
Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.0\jre
Detected OS: Windows NT
parsing buildfile build.xml with URI = file:I:/Projects/xslt/build.xml
Project base dir set to: I:\Projects\xslt
Build sequence for target `dostyle' is [dostyle]
Complete build sequence is [dostyle]

dostyle:
    [style] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison

BUILD SUCCESSFUL
Total time: 0 seconds
I:\Projects\xslt>dir
 Volume in drive I is Users
 Volume Serial Number is 18E4-1E48

 Directory of I:\Projects\xslt

12/20/02  01:59p        <DIR>          .
12/20/02  01:59p        <DIR>          ..
12/20/02  01:56p                   193 build.xml
12/06/02  04:29p                   167 filecab.xml-old
12/20/02  12:57p                   858 filecab.xsl-old
               5 File(s)          1,218 bytes
                             43,188,224 bytes free

I:\Projects\xslt>


I:\Projects\xslt>rename filecab.xml-old filecab.xml

I:\Projects\xslt>rename filecab.xsl-old filecab.xsl

I:\Projects\xslt>xslt filecab.xml filecab.xsl filecab.html

I:\Projects\xslt>rem

I:\Projects\xslt>rem Run one of the Xalan samples

I:\Projects\xslt>rem

I:\Projects\xslt>set XALAN_HOME=c:\local\xalan-j_2_4_1

I:\Projects\xslt>java -cp 
.;c:\local\xalan-j_2_4_1\bin\xalan.jar;c:\local\xalan-j_2_4_1\bin\xml-apis.jar;c:\local\xalan-j_2_4_1\bin\xalansamples.jar;c:\local\xalan-j_2_4_1\bin\xercesImpl.jar 
org.apache.xalan.xslt.Process -IN filecab.xml -XSL filecab.xsl -OUT 
filecab.html


I:\Projects\xslt>dir
 Volume in drive I is Users
 Volume Serial Number is 18E4-1E48

 Directory of I:\Projects\xslt

12/20/02  02:01p        <DIR>          .
12/20/02  02:01p        <DIR>          ..
12/20/02  01:56p                   193 build.xml
12/20/02  02:01p                   368 filecab.html
12/06/02  04:29p                   167 filecab.xml
12/20/02  12:57p                   858 filecab.xsl
               6 File(s)          1,586 bytes
                             43,020,288 bytes free

I:\Projects\xslt>

-- 
Erik Husby
Group Lead for Software Quality Automation
Whitehead Institute/MIT Center for Genome Research
320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669
office: 617.258.9227
mhusby@genome.wi.mit.edu



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Style Task problems - no output no error messages.

Posted by Scott Stirling <sc...@rcn.com>.
> -----Original Message-----
> From: M. Erik Husby [mailto:mhusby@genome.wi.mit.edu]
>
> Well I have the answer to my problem.
>
> The directory I was doing my work in was a network drive. When I moved
> the files to the local disk, the Style task started working! Now if
> someone can supply an answer to the question as to why Style would have
> problems processing files from a network drive, I would be very
> interested.

Sorry, I just sent a reply to your first post before I noticed this one.
But I would say the same thing -- run the target in the location where you
were with -debug or -verbose and see if you get any exception or stack
trace.

Scott Stirling



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Style Task problems - no output no error messages.

Posted by "M. Erik Husby" <mh...@genome.wi.mit.edu>.
Well I have the answer to my problem.

The directory I was doing my work in was a network drive. When I moved 
the files to the local disk, the Style task started working! Now if 
someone can supply an answer to the question as to why Style would have 
problems processing files from a network drive, I would be very interested.


-- 
Erik Husby
Group Lead for Software Quality Automation
Whitehead Institute/MIT Center for Genome Research
320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669
office: 617.258.9227
mhusby@genome.wi.mit.edu



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Style Task problems - no output no error messages.

Posted by Scott Stirling <sc...@rcn.com>.
Hi Erik,

Try running your build script with -verbose and see what you get.  If that
doesn't give you more info, try -debug.  I wouldn't venture a guess without
more info.  If you get some from using these flags with Ant, let us know
what happens.

Best,

Scott Stirling

> -----Original Message-----
> From: M. Erik Husby [mailto:mhusby@genome.wi.mit.edu]
> Sent: Friday, December 20, 2002 2:53 PM
> To: ant-user@jakarta.apache.org
> Subject: Style Task problems - no output no error messages.
> Importance: Low
>
>
> I have an interesting problem with the Style task - no output, no error
> messages.
>
> Now I know the Style task works in my setup because I have it working
> with the CVS Changelog.xsl file. My problem is with an XSL file that
> I've written. The interesting thing is this xsl file works when I use
> the Xalan org.apache.xalan.xslt.Process program, so I am assuming that
> my xsl file is well structured.
>
> Here is my build.xml file
> <project name="xslt" default="dostyle" basedir=".">
> <target name="dostyle">
> <style in="filecab.xml"
>        out="filecab.html"
>        style="filecab.xsl" >
> </style>
> </target>
> </project>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>