Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
am getting a FileNotFoundException when trying to execute query for a prepared expression. The core code looks like the following:
SaxonXQDataSource ds = new SaxonXQDataSource();
SaxonXQConnection conn = (SaxonXQConnection) ds.getConnection();
java.util.Properties prop = new Properties();
prop.setProperty( "method", "xml" );
prop.setProperty( "indent", "yes" );
File filDoc = new File( "C:\dev\ftp\data\feed.xml" );
File filXqj = new File( "C:\dev\ftp\data\filter.xq" );
FileInputStream fisDoc = new FileInputStream( filDoc );
FileInputStream fisXqj = new FileInputStream( filXqj );
SaxonXQPreparedExpression exp = (SaxonXQPreparedExpression) conn.prepareExpression( fisXqj );
xqResult = exp.executeQuery();
When it runs the executeQuery() it errors with the exception indicating that it cannot find the xml file: "C:\dev\ftp\feed.xml"! Somehow it wants to find the feed.xml in the parent directory of where it actually is. I should mention that I think the java app is actually executed from the "C:\dev\ftp" directory but I made sure that the File object does indeed point to C:\dev\ftp\data\feed.xml" and that the FileInputStream object can read which is the case up until I execute the bindDocument() function with the expression. After the bindDocument() is executed that is when the error occurs.
You raised the same question on the saxon-help mailing list, I'll deal with it there. (For anyone looking for the archives, go to http://saxon.markmail.org/ and search there).