Page 1 of 1

URI's for local files

Posted: Wed Feb 16, 2005 8:39 pm
by madde001
George et al,

Can you help me get straight in my confused mind what format(s) I can/should use for uri references to local files inside my xml? I know this is a vexing issue in a lot of contexts, and I'm trying to figure out what oxygen's understanding is driven by (Java, oxygen envrinoment, the parser being used or something else).

The relevant RFC's are evidently debated, as I understand it, but in the (practical) Mozilla world, either of the following are equally valid uri's for a file foo.bar on the local Windows C: drive:
(1) file://localhost/C:/foo.bar
(2) file:///C:/foo.bar

but Mozilla will also accept (after forcing a change to (2)):
(3) file:/C:/foo.bar

In my xml source with oxygen, it seems like (2) and (3) are okay, but (1) gives java.io.FileNotFoundException.

Is that a function of the parser, or the oxygen shell, or Java or something else? What *should* I be using (is there a best practice?)

John

specifically...

Posted: Wed Feb 16, 2005 8:56 pm
by madde001
I should have been more specific, when I said "in my xml".

I mean, when the uri is used as the value of the the href attribute of an include element in an RNG file.

Posted: Thu Feb 17, 2005 5:08 pm
by Dan
Hello John,

We are using the expressions of type:

file://host/path

in the context of a MS Windows network, by resolving it to \\host\path (Windows shared folders). In this way the editor can access network resources and use only the URL format for keeping track to any loaded file.

We are commonly using the third variant you enumerated for the local files.

Let me know if you need more info.

Posted: Thu Feb 17, 2005 7:30 pm
by madde001
Dan,

Thanks, that helps a lot. My confusion was precisely the presumption of a Windows *share*-- which makes perfect sense (though may not always be the case while testing under development).

Just to show how screwed up this whole area is, I found a recent IETF draft proposal that doesn't really propose *anything* yet, but *does* give a nice discussion of all the various bizarre variants that are floating around out there.

http://www.ietf.org/internet-drafts/dra ... uri-03.txt


John