The W3C doesn't care about filesystems. :) encode-for-uri() just escapes 
illegal characters in URIs.

Fortunately, EXPath cares: the File module has functions to go back and forth. 
file:path-to-uri() converts a filesystem path to a file: URI, and 
file:path-to-uri() (which is a bit oddly named) does the reverse.

Note that those functions don't work "in an OS independent way" as you say - 
they work differently depending on the platform running the script. So 
file:path-to-uri("C:\foo") won't work on a Unix system. I'm not sure that's a 
problem, but if you think you need to be able to do that kind of conversion 
anywhere, that would be a new feature request for EXpath to consider.
Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to