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
[EMAIL PROTECTED]



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

Reply via email to