Project

Profile

Help

Bug #2269

closed

EXPath File - whitespace in relative file paths

Added by John Lumley almost 10 years ago. Updated almost 9 years ago.

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

100%

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

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

Actions #1

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.

Actions #2

Updated by O'Neil Delpratt almost 10 years ago

  • Found in version changed from 9.6.0.1 to 9.6
Actions #3

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 '/'.

Actions #4

Updated by John Lumley almost 10 years ago

Corrections made to both 9.6 and 9.7 branches

Actions #5

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.

Actions #6

Updated by O'Neil Delpratt almost 10 years ago

  • Status changed from Resolved to Closed
Actions #7

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
Actions #8

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)
Actions #9

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

Also available in: Atom PDF