You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eliot Stock <el...@practiv.com> on 2000/09/07 02:10:39 UTC

XSLProcessorException: file not found

I'm using the style task like so:

<project name="origo" default="transform" basedir="C:\wip">
  <target name="init">
    <property name="xmlsrc" value="FPArchVersion3\media\xml" />
    <property name="xmloutput"  value="output" />
  </target>
  <target name="transform" depends="init">
    <style	processor="xalan"
    		basedir="${xmlsrc}"
    		destdir="${xmloutput}"
		extension="java"
		includes="origo.xml"
		style="business-process-controller-set.xsl"/>
  </target>
</project>

and I have Xalan and Xerces in the classpath, plus the JAXP jars. But it
seems my xml file can't be found, even though it's using the right path.
Here's my output and stack trace:

C:\wip>ant
Buildfile: build.xml

init:

transform:
    [style] Transforming into C:\wip\output
    [style] Loading stylesheet
C:\wip\FPArchVersion3\media\xml\business-process-
controller-set.xsl
C:\wip\FPArchVersion3\media\xml\origo.xml; Line 0; Column 0
XSL Error: Could not parse C:\wip\FPArchVersion3\media\xml\origo.xml
document!
XSL Error: SAX Exception
    [style] Failed to process C:\wip\FPArchVersion3\media\xml\origo.xml

BUILD FAILED

build.xml:13: org.apache.xalan.xslt.XSLProcessorException: File
"C:\wip\FPArchVersion3\media\xml\origo.xml" not found.
org.apache.xalan.xslt.XSLProcessorException: File
"C:\wip\FPArchVersion3\media\xml\origo.xml" not found.
        at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1674)
        at
org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.j
ava:894)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java,
Compiled Code)
        at
org.apache.tools.ant.taskdefs.optional.XalanLiaison.transform(XalanLiaison.j
ava:83)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:301)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java, Compiled
Code)
        at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:717)
        at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
        at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:107)
---------
org.xml.sax.SAXParseException: File
"C:\wip\FPArchVersion3\media\xml\origo.xml"
not found.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:975)

        at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(Defa
ultEntityHandler.java:499)
        at
org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:303)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:860)
        at org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:249)
        at
org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.j
ava:880)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java,
Compiled Code)
        at
org.apache.tools.ant.taskdefs.optional.XalanLiaison.transform(XalanLiaison.j
ava:83)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:301)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java, Compiled
Code)
        at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
        at org.apache.tools.ant.Project.runTarget(Project.java:717)
        at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
        at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:107)

Total time: 3 seconds

I also saw this on the Xerces FAQ....
DOS filenames are not legal URIs as required by the XML 1.0 specification.
Therefore, it was an error for the parser to accept DOS filenames. This bug
is now fixed.
DOS filenames can be converted to legal URIs, however. For example, the DOS
filename "c:\xerces\data\personal.xml" would become
"file:///c:/xerces/data/personal.xml", which is a legal URI.
... and wondered if Ant is properly prepending the "file:///" to the DOS
path?

Any clues anyone?

Eliot Stock
Practiv NZ


Re: XSLProcessorException: file not found

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "ES" == Eliot Stock <el...@practiv.com> writes:

 ES> Do you mean the problem is in Xalan 1.2D02, not in Ant?

No, I wanted to say that the fix applies to the xalan version of
<style> while I'm not sure about the XSL:P version.

Stefan

RE: XSLProcessorException: file not found

Posted by Eliot Stock <el...@practiv.com>.
Do you mean the problem is in Xalan 1.2D02, not in Ant?

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@bost.de]
Sent: Thursday, 7 September 2000 6:31 p.m.
To: ant-user@jakarta.apache.org
Subject: Re: XSLProcessorException: file not found

>>>>> "ES" == Eliot Stock <el...@practiv.com> writes:

 ES> and wondered if Ant is properly prepending the "file:///" to the
 ES> DOS path?

This is supposed to have been fixed in CVS (at least for Xalan).

Stefan


Re: XSLProcessorException: file not found

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "ES" == Eliot Stock <el...@practiv.com> writes:

 ES> and wondered if Ant is properly prepending the "file:///" to the
 ES> DOS path?

This is supposed to have been fixed in CVS (at least for Xalan).

Stefan