Resolution of environment variable in Project definition file.

<oXygen/> general issues.
matsek
Posts: 12
Joined: Tue Nov 01, 2011 12:24 pm

Resolution of environment variable in Project definition file.

Post by matsek » Sun Mar 21, 2021 11:04 am

Hi,

I would like to add the folder My Documents to my project, without adding the folder path literally, as the path may change depending on the environment in which I open the project.

I tried the following:

<folder path="file://${homeDir}/Documents/Folder"/>

But this didnt work. The variable didn't get resolved when opening the project in the editor.

Help appreciated!

adrian
Posts: 2736
Joined: Tue May 17, 2005 4:01 pm

Re: Resolution of environment variable in Project definition file.

Post by adrian » Mon Mar 22, 2021 2:47 pm

Hello,

I'm afraid that's not possible. Environment variables are not resolved as part of paths. The project file locations indicated by folder/@path are usually paths relative to the project folder or absolute paths, if they are on a different file system or drive.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply