excalibur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solprovi...@apache.org
Subject Re: Bug in FileSource?
Date Mon, 28 Jan 2008 14:30:55 GMT
Thanks.  Needed the sanity check because I had been programming for 20
hours. I'll file a jira and check the source tomorrow.

solprovider

On Jan 28, 2008 5:02 AM, Carsten Ziegeler <cziegeler@apache.org> wrote:
> Hi,
>
> this seems to be a bug - can you file a bug please?
>
> Thanks
> Carsten
>
>
> solprovider@apache.org wrote:
> > FileSource incorrectly repeats the drive specification on Windows.
> > This causes errors retrieving files relative to the FileSource.
> >
> > We are receiving this error using excalibur-sourceresolve-2.2.3.jar
> > (from Cocoon-2.1.11)
> > cause: java.io.FileNotFoundException: F:\F:\mydirectory\page2xhtml.xsl
> > (The filename, directory name, or volume label syntax is incorrect)
> > org.apache.cocoon.ProcessingException: Unable to get transformer
> > handler for F:///F:/myDirectory/page2xhtml-homepage.xsl
> >
> > FILE: page2xhtml-homepage.xsl (relatively imports page2xhtml.xsl.)
> > <?xml version="1.0"?>
> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <xsl:import href="page2xhtml.xsl"/>
> > </xsl:stylesheet>
> >
> > JAVA TEST:
> > import java.io.File;
> > import org.apache.excalibur.source.Source;
> > import org.apache.excalibur.source.impl.FileSource;
> > public class mySourceFactory implements SourceFactory{
> >   public Source getSource(String location, Map parameters) throws
> > IOException, MalformedURLException {
> >       File file = new File(myDirectory, location);
> >       if(!file.exists()) throw new IOException("Bad file.");
> >       filepath = file.getAbsolutePath(); //Original assignment is
> >       print(filepath);  \\ "F:\myDirectory\myfile.xsl"
> >       FileSource source = new FileSource(filepath);
> >       print(source.getURI()); \\"F:///F:/myDirectory/myfile.xslt"
> >       return source;
> >    }
> > }
> >
> > Are we doing something wrong?  Does FileSource.getURI() contain a bug?
> >  What is the workaround?
> >
> > TIA,
> > solprovider
> Carsten Ziegeler

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@excalibur.apache.org
For additional commands, e-mail: user-help@excalibur.apache.org


Mime
View raw message