Re: [xslt] forward and back slashes in URI
- From: Thomas Broyer <tbroyer ltgt net>
- To: xslt gnome org
- Subject: Re: [xslt] forward and back slashes in URI
- Date: Thu, 9 Aug 2001 02:35:28 +0200
Le 09/08/01 02:16:02, "Vakoc, Mark" a écrit :
> on win32 the directory deliminator in a path is a backslash '\' instead
> of a forward slash '/'.
>
> When using URI functions such as document(), it currently works using
> full paths built using a forward slash for the path, i.e.
> <xsl:variable name="test"
> select="document('f:/some%20directory/file.xml')"/>
>
> but wouldn't work using
> <xsl:variable name="test"
> select="document('f:\some%20directory\file.xml')"/>
>
> Is this the correct (to spec) behavior?
Yes. The document() function treats its first argument as an URI, and an
URI is defined to use forward slashes.
http://www.ietf.org/rfc/rfc2396.txt
Also note that f:/somedir/file.xml isn't an URI referencing the file
file.xml in the directory somedir in the F: hard-disk of the local machine.
This file's URI is file:///f:/somedir/file.xml
f:/somedir/file.xml is an URI with a scheme-part equal to f and a path-part
equal to /somedir/file.xml.
> However, shouldn't a URI be able to use the native
> deliminating convention?
No.
Tom.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]