Fix Illegal character in ODD path on Windows#782
Conversation
|
Hi @daliboris — good to see you in Kraków! Hmmm … my oXygen (27.1) does not list Does it work? I do not have any way to test it. I worry that the notes |
|
I have assigned this to myself, and given it a BUG label, but not a CONFIRMED label because I do not have a Windows system and thus cannot reproduce the error. But I do not plan on merging this until somebody who is not @daliboris reviews and verifies that it works properly on Windows. I haven’t assigned any other reviewers, though, because (in general) I do not know who has easy access to a Windows system to test. |
I'm glad I was part of this nice event.
Here are screenshots from my laptop copy of existing transformation scenario without any modifications:
Here is list of all available variables.
You are right, it's my fault: the code adds extra slashes, but surprisingly local paths on my PC works also with these "extra" slashes. This version returns the correct file URI: <xsl:value-of select="string-join(('file://', if(matches($currentDirectory, '^[A-Z]:\\$'))
then translate($currentDirectory, '\', '') else translate($currentDirectory, '\', '/'), $loc), '/')"/>
|
|
Oh! So it is a parameter — and look at that, it is documented as a path, not a URL. I learned something new, thank you. Do you want to commit the extra-slash-that-is-technically-incorrect-but-seems-to-work fix? If not, I think gitHub will actually let me commit something to your branch, but I am not 100% on that. |
|
Windows path to URI functionality has now been fixed. Thank you for your prompt cooperation. |



Fixes issues on Windows machine, where
$currentDirectoryvariable contains path in Windows format, for exampleC:\Data\Works.This type of path occurs, for example, in the oXygen XML Editor, where the path is passed to ANT in the
inputFileparameter as the editor variable${cf}.In Windows, this led to the following error: