[XML-SIG] problems with PyXML 0.6.3

Uche Ogbuji uche.ogbuji@fourthought.com
Wed, 14 Feb 2001 12:44:46 -0700

> On Wed, 14 Feb 2001, Uche Ogbuji wrote:
> > So can we think of a better algorithm than the current "check for file, and if 
> > it doesn't exist, just blindly toss it to urllib)?
> If running windows, and the second character of the 'url' is a colon,
> replace it with a pipe and prepend file: to the url?
> > This problem affects 4Suite as well.
> I had to use a similar hack when generating a CATALOG file for Narval, for
> use with xmlproc, since urllib would choke on C:\fooo\dtd_base\, and whine
> until it got C|\fooo\dtd_base\
> Maybe what we need is a new function in os.path or similar that would
> perform the file -> URL conversion described above. This would ease the
> work of application writers. I, for one, would be much more at ease if I
> knew that no implicit assumptions are made on what I pass. If the API
> requires an URI/URL, then this is what it should get. 

Here's what Tom Passim suggested to us a while back

- Handle "file:" with no slashes because rightly or wrongly they're
- For Windows, allow constructions like


even though it isn't in the rfc, because this form too is used a lot
started it, Netscape or Tim BL??)(The rfc doesn't require or  suggest
replacing a colon with a bar).
- For Windows, treat file:///c:\.... as an opaque url and just use the
embedded path literally.
- For Windows, treat file:///c:/... as a parsable path starting at c:\,
or at
least replace the forward with back slashes.
- Make sure that file://localhost/ acts the same as file:///   because
the rfc
says to do so.

- What have I missed? Something for the Mac?

I meant to implement these heuristics for 4Suite, but I forgot.

Any comments?

Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python