ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eliot Stock" <eliot.st...@practiv.com>
Subject XSLProcessorException: file not found
Date Thu, 07 Sep 2000 00:10:39 GMT
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


Mime
View raw message