Re: [xml] For Windows: Allow spaces in URI paths



On Sun, Aug 26, 2001 at 06:49:29PM +0100, Justin Fletcher wrote:
In message <71714C04806CD5119352009027289217FE1789 ausxmrr502 us dell com>
          Chris_Poblete Dell com wrote:

VERSIONS: libxml2-2.4.3
          libxslt-1.0.3

PROBLEM:
When used in Windows, the tag <xsl:include href="c:/Program Files/...">
is invalid since the URI string contained a space.

That's not a valid URI, is it ?

c isn't a protocol that I'm aware of. If you want to reference files on your
harddisc, you should be using file:///c%%3AProgram%20Files/... rather than
changing the interface to support your particular native filesystem.

Similar issues occur with the # character which is a valid character in a
windows filename (AIUI) but is not valid in a URI. All the more reason to
use URIs and not file paths.

  I confirm, the bug is in the XSLT stylesheet, the content of href
must be an URI-Reference, the normative specification associated is RFC 2396.
The fact that Windows filenames do not respect this syntax is not a reason
to accept this violation. The input is in error.

  As Justin said you must turn your filename into a valid URI-Reference,
in that case using a file URI is the right mechanism, it's defined in
RFC 1738 (section 3.10) and once escaped you should end up with:
    file:///c%3A/Program%20Files/...

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]