Re: [basex-talk] File module path encodings
Hi Andy, I agree with you. The latest snapshot now does what it is supposed to do. Thanks, Christian ___ On Wed, Apr 3, 2013 at 4:20 PM, Andy Bunce bunce.a...@gmail.com wrote: Hi, The following two expressions create a file called d d.txt (Windows, BaseX 7.6) file:write(c:\temp\d d.txt,what) file:write(c:\temp\d%20d.txt,what) I wonder if it would not be better if the second would create a file d%20d.txt? My use case is creating a file name that encodes a path e.g. lib%5Cfile.txt. The currently gives an error, as it is looking for a folder lib. I read http://expath.org/spec/file#d3e112 as meaning url encoded file names must start file:/// and if no file:/// the name should be used as is. /Andy ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] File module path encodings
Hi, The following two expressions create a file called d d.txt (Windows, BaseX 7.6) file:write(c:\temp\d d.txt,what) file:write(c:\temp\d%20d.txt,what) I wonder if it would not be better if the second would create a file d%20d.txt? My use case is creating a file name that encodes a path e.g. lib%5Cfile.txt. The currently gives an error, as it is looking for a folder lib. I read http://expath.org/spec/file#d3e112 as meaning url encoded file names must start file:/// and if no file:/// the name should be used as is. /Andy ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] File module path encodings
Andy Bunce wrote: Hi, I read http://expath.org/spec/file#d3e112 as meaning url encoded file names must start file:/// and if no file:/// the name should be used as is. Yes, that's what I understand as well. And that's why I think it would be probably a good idea to deal only with URIs on the one hand (for parameters of the File Module functions, like file:write()), and use another couple of functions to explicitly convert between native paths and URIs when needed (like in the section http://expath.org/spec/file#d3e1404). Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk