specify editor variable as default value for 'url' parameter
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
specify editor variable as default value for 'url' parameter
Post by Ron Van den Branden »
Hi,
For some parameters in a transformation scenario I'm developing for a project, I'm gathering user input with the ${ask()} variable. In order to let the user select files, the ${ask()} variable of type 'url' seems quite convenient. However, I'm wondering whether it is possible to define a default value dynamically (preferably using another editor variable).
I've tried this:
...in an attempt to define the current file URL as default value for this parameter. Yet, the ${cfdu} variable doesn't seem to be resolved; instead of the current file URL, just the literal text "${cfdu}" is pre-filled in the dialog window:

Is there a way to define the default text for an 'url' parameter with editor variables?
Best,
Ron
For some parameters in a transformation scenario I'm developing for a project, I'm gathering user input with the ${ask()} variable. In order to let the user select files, the ${ask()} variable of type 'url' seems quite convenient. However, I'm wondering whether it is possible to define a default value dynamically (preferably using another editor variable).
I've tried this:
Code: Select all
${ask('folder or file', url, ${cfdu})}

Is there a way to define the default text for an 'url' parameter with editor variables?
Best,
Ron
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: specify editor variable as default value for 'url' param
Hi Ron,
Usually the ask editor variables should be expanded after all other editor variables have been expanded. Unfortunately this does not happen for ANT or DITA parameters. We had a previous report about this and we'll work to fix the problem in Oxygen 17.0 which should be released in the Spring of 2015.
I will update this forum thread when this happens.
Regards,
Radu
Usually the ask editor variables should be expanded after all other editor variables have been expanded. Unfortunately this does not happen for ANT or DITA parameters. We had a previous report about this and we'll work to fix the problem in Oxygen 17.0 which should be released in the Spring of 2015.
I will update this forum thread when this happens.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
Re: specify editor variable as default value for 'url' param
Post by Ron Van den Branden »
Hi Radu,
I thought I had seen evaluation of ${ask()} variables mentioned in some changelogs for version 17.0, but when I tried to specify the project folder of an Oxygen Project as default folder in the ${ask()} variable (in the latest build 2015052917):
I noticed now that the default value is empty:

Yet, when clicking the "browse" icon, the default location is not the project folder, but instead the folder of the currently opened file.
Does this mean this bug has not been fixed yet, or is this another bug related to using ${pdu} inside ${ask()}?
Best,
Ron
I thought I had seen evaluation of ${ask()} variables mentioned in some changelogs for version 17.0, but when I tried to specify the project folder of an Oxygen Project as default folder in the ${ask()} variable (in the latest build 2015052917):
Code: Select all
${ask('folder or file', url, ${pdu})}

Yet, when clicking the "browse" icon, the default location is not the project folder, but instead the folder of the currently opened file.
Does this mean this bug has not been fixed yet, or is this another bug related to using ${pdu} inside ${ask()}?
Best,
Ron
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
Re: specify editor variable as default value for 'url' param
Post by Ron Van den Branden »
Ah,
I stand corrected: it does seem to work in Oxygen 17.0. In my previous attempt I had forgotten to wrap the default value (including the ${pdu} variable) in quotation marks. This is the correct version:
Now, the value of the project folder is filled in the "folder or file" dialog, and that folder is selected by default when the browse button is clicked.
For completeness, this issue seems to have been fixed in Oxygen 17.0; in Oxygen 16 the "folder or file" dialog shows the literal string "${pdu}" instead of the expanded value of that variable.
Apologies for the confusion, and thanks for the fix.
Best,
Ron
I stand corrected: it does seem to work in Oxygen 17.0. In my previous attempt I had forgotten to wrap the default value (including the ${pdu} variable) in quotation marks. This is the correct version:
Code: Select all
${ask('folder or file', url, '${pdu}')}
For completeness, this issue seems to have been fixed in Oxygen 17.0; in Oxygen 16 the "folder or file" dialog shows the literal string "${pdu}" instead of the expanded value of that variable.
Apologies for the confusion, and thanks for the fix.
Best,
Ron
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: specify editor variable as default value for 'url' param
Hi Ron,
Thanks for providing the solution for this. Sorry I did not update the forum thread after the fix was made.
Regards,
Radu
Thanks for providing the solution for this. Sorry I did not update the forum thread after the fix was made.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service