Bug #2269
closedEXPath File - whitespace in relative file paths
100%
Description
From Hans-Juergen Rennau:
extension functions file:xxx throw an error if a file name contains whitespace. The EXPath spec [1], however, lists examples with such file names [2] which supposedly should be processed without error, e.g.
my file.xml: A relative path, pointing to a file in the current working directory.
I know that the spec is still in progress, but I think it makes sense for the file module to be as robust as possible - the idea is to work with the file system as it is, and file names are not URIs - at least in my opinion..
Needs a little attention in EXPathFile.toString()
Updated by John Lumley almost 10 years ago
This 'bug' is a consequence of the fix for https://saxonica.plan.io/issues/2037 which corrected problems on Macs and Unixen, but introduced 'no spaces' errors for relative file path names.
Updated by O'Neil Delpratt almost 10 years ago
- Found in version changed from 9.6.0.1 to 9.6
Updated by John Lumley almost 10 years ago
- Status changed from New to Resolved
Corrected to accomodate spaces and backslashes. Additional tests (@EXPath-file-exists-009->012@) added to EXPath Github test suite (https://github.com/expath/expath-cg/tree/master/tests/qt3/file). Tested on Windows machines, but will require others to test on Macs or Unixen.
Note - Hans-Jurgen raised an issue about;
file:exists('/projects/infospace/pcol/h.txt'),
file:exists('file:/projects/infospace/pcol/h.txt')
=> false true
This has not been addressed, as I am somewhat unclear what on a Windows machine '/projects' means - on Unix derivatives it is an absolute path. Looking at http://en.wikipedia.org/wiki/Path_%28computing%29 shows that only cmd.exe
seems to support it. Enlightenment needed. Alternatively we could mandate that if you mean absolute use file:
and if relative don't start with '/'.
Updated by John Lumley almost 10 years ago
Corrections made to both 9.6 and 9.7 branches
Updated by O'Neil Delpratt almost 10 years ago
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.4
Bug fix applied in the Saxon 9.6.0.4 maintenance release.
Updated by O'Neil Delpratt almost 10 years ago
- Status changed from Resolved to Closed
Updated by O'Neil Delpratt almost 9 years ago
- Sprint/Milestone set to 9.6.0.4
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.4 added
Updated by O'Neil Delpratt almost 9 years ago
- Sprint/Milestone changed from 9.6.0.4 to 9.6.0.3
- Fixed in Maintenance Release 9.6.0.3 added
- Fixed in Maintenance Release deleted (
9.6.0.4)
Updated by O'Neil Delpratt almost 9 years ago
- Sprint/Milestone changed from 9.6.0.3 to 9.6.0.4
- Fixed in Maintenance Release 9.6.0.4 added
- Fixed in Maintenance Release deleted (
9.6.0.3)
Please register to edit this issue