Carsten Ziegeler wrote:
> 
> > Stefano Mazzocchi wrote:
> >
> > Carsten,
> >
> > I've recently switched to the new source-resolving excalibur code and I
> > found that you use the following
> >
> >      File file = new File( this.systemId.substring( "file".length() ) );
> >
> Where did you see this? AFAIS it's ... "file:".length() ... for example
> in the URLSource

Yes, I adapted this for this email because people didn't know what FILE
pointed to.

> > to obtain the 'path' part of a 'file' URI. The above might work on UNIX,
> > but it clearly doesn't work on other operating systems, since URIs like
> > these
> >
> >     file:///c:/path/to/file
> >
> > are totally valid and your code is not able to handle them.
> >
> > Now, my suggestion would be to use the standard java.net API because
> > they already handle all these issues (file: protocol handling is
> > expecially tricky on regards of the number of slashes).
> >
> > NOTE: there is no official indication on how the file: URI should be
> > addressed, but all these
> >
> >     file:/file
> >     file://file
> >     file:///file
> >
> > are all valid URIs and should point to the same file (at least, this was
> > my understanding). It could be possible to add
> >
> >     file:file
> >
> > to indicate a relative location. This is normally achieved by avoiding
> > to indicate the protocol (such as in "file"), but since we need a
> > protocol to identify the handler, "file:file" might just be a way to
> > encode relativity in file positioning.
> >
> 
> Actually the code used in the "new" source resoling is the old code
> which is in Cocoon 2 since the early days. So if this is a problem it
> was there for "years".

No, search for 'M$' and you'll see something that it's not there
anymore.

> Can someone verify if it is a problem on some OS and then please
> do a patch?
> 
> >                                   - o -
> >
> > I just found another bug: the docs say that if you call
> >
> >    resolver.resolveURI()
> >
> > and the resource doesn't exist, you get a SourceNotFoundException. If yo
> > are accessing file resources, instead you get a FileNotFoundException,
> > which is not even inherited.
> Yes, this is true and it's a bug! I added the SourceNotFoundException
> recently
> but didn't have time to add the "throwing" code. So the docs are more
> upto-date
> than the code...
> Perhaps if someone could send a patch...
> 
> >
> > Expect more bug report soon since I'm getting pretty heavy on sources :)
> >
> This is good! Really! I didn't have the time to do as much testing as I
> wanted
> as we are currently working on some great things for Cocoon which will
> (hopefully)
> make Cocoon the number one web application framework and scare many big
> companies
> as this all will be open source ;)
> But currently I don't want to say more, I expect to finish most of it in
> late
> summer!

:)

Unfortunately, I don't have time to follow this now and I'm doing my
development on 2.0.3 not on 2.1 (not yet, I'll do this when I have time
and probably when Schecoon will be merged in the 2.1 tree since I need
it!)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<[EMAIL PROTECTED]>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to