Project

Profile

Help

Bug #2269

EXPath File - whitespace in relative file paths

Added by John Lumley almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
EXSLT extensions
Sprint/Milestone:
Start date:
2014-12-18
Due date:
% Done:

100%

Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:

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()

History

#1 Updated by John Lumley almost 5 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.

#2 Updated by O'Neil Delpratt almost 5 years ago

  • Found in version changed from 9.6.0.1 to 9.6

#3 Updated by John Lumley almost 5 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 '/'.

#4 Updated by John Lumley almost 5 years ago

Corrections made to both 9.6 and 9.7 branches

#5 Updated by O'Neil Delpratt almost 5 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.

#6 Updated by O'Neil Delpratt almost 5 years ago

  • Status changed from Resolved to Closed

#7 Updated by O'Neil Delpratt almost 4 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

#8 Updated by O'Neil Delpratt almost 4 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)

#9 Updated by O'Neil Delpratt almost 4 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

Also available in: Atom PDF