Re: File URLs will be the death of me

David Crossley <[email protected]>
Newsgroups gmane.text.xml.commons.devel
Message-ID <[email protected]>
Norman Walsh wrote:
> / Alexander Pavlenko <[email protected]> was heard to say:
> | Excuse me if I say obvious things but maybe it will help.
> |
> | "file" URLs usually should have one or three slashes following the scheme 
> | name, not two.
> |
> | file:/path - means missing authority part
> | file:///path - means empty authority name
> |
> | Both of the above imply the default authority:
> |
> | file://localhost/path
> |
> | If you use two slashes it means that you specify the authority explicitly 
> | and in case of "file" scheme the authority means host name.
> 
> Yes, I understand the semantics. Unfortunately, file: URIs interact
> badly with Windows style path names.
> 
> | By the way, I also actively use CatalogResolver and have encountered many 
> | times that it returns incorrect URLs like
> | file://c:/sofefolder/...

Alexander, were you using the trunk of xml-commons
resolver? As Norm said, those general problems had
already been fixed recently and we had tested it
on Windows.

> Could you try the patch I provided? I believe that I've plugged that
> hole. But I've also believed that before.

At Apache Forrest i upgraded our resolver.jar to use
the current xml-commons trunk (r395116). Fine for UNIX.
I asked our Windows users to test and yes, all is well.
However, we don't specifically use "user.dir" so i suppose
that we are just reporting that the new patch didn't break
other functionality.

-David

> | and...
> |
> | couldn't you use java.io.File.toURI()?  (J2SE1.4!)
> 
> I think XML Commons is still expected to support 1.3.
> 
>                                         Be seeing you,
>                                           norm
> 
> -- 
> [email protected] / XML Standards Architect / Sun Microsystems, Inc.
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.