[XML-SIG] Problem with 4xslt in Python on Windows

Thomas B. Passin tpassin@comcast.net
Mon, 15 Jul 2002 08:04:15 -0400


[Andrew Ittner]

> On the line where I make oStyle, I've tried setting the fromStream's 2nd
> argument, a valid URI, to the following:
> D:\Internet\_XML_\
> file://D:/Internet/_XML_/halls.xsl
> file://localhost/D:/Internet/_XML_/halls.xsl
> http://tephyr8.home.attbi.com/listofcompanies.xsl
>
> Only the last one works (when I post the included XSL files to it).
>
> What must I do to make the Python script see the XSL included files on my
> local drive?  Since the 4xslt command-line works fine with the exact same
> files in the exact same location, I assume I'm missing something, but I
> can't figure what.
>

Chances are you have to use the correct url syntax for a file:

(1) file:///d:\Internet\..............

If that does not work, try this incorrect version:

(2) file:/d:\Internet\..............

The double slash version is the one that is least likely to work, because it
is both incorrect by the RFC and also never came into (incorrect) use.  (1)
is technically correct according to the RFC,  (2) is not correct but is the
form that the Python libraries used to support.  I'm not sure but I am
pretty sure that (1) is now supported.

If all else fails you could try

(3) file:///d:/Internet/..............

The RFC is ambiguous as to whether forward or back-slashes should be used
when the file system uses backslashes, and some systems are very particular
about it.  I do not think you need to here, though.

Cheers,

Tom P