Apply ${ask as variable

Questions about XML that are not covered by the other forums should go here.
rogerhadley
Posts: 9

Apply ${ask as variable

Wed Dec 02, 2015 4:06 am

Is it possible to have the users input become a variable?

I am creating a DITA map template, for use in the New File dialog box. I want to use the ${ask Editor Variable to get a value from the user. Then I want that value written into the new DITA map in several places. The only way I can make it work is to use multiple ${ask Editor variables, one at each place that I want the value written into the map. The result is that the user has to enter the same value multiple times. Obviously the user should only have to enter the value once.
Radu
Posts: 5585

Re: Apply ${ask as variable

Wed Dec 02, 2015 9:42 am

Hi Roger,

This is not possible right now.
Could you give me more details about your particular situation?
Maybe in the DITA Map you could have that value in only one place and in all other places have conrefs to it. Because you can use conrefs also in map content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rogerhadley
Posts: 9

Re: Apply ${ask as variable

Wed Dec 02, 2015 7:48 pm

Thanks for the reply, Radu. Conref won't work in my case. The template is for a dedicated relationship table map. We have a standard way of naming maps, so the input from the user is the core part of the map name, which is used in various comments and references in the new map.
Radu
Posts: 5585

Re: Apply ${ask as variable

Thu Dec 03, 2015 12:08 pm

Hi Roger,

Right now we do not have this support to reuse the value returned by the ask variable in multiple places. I will add an issue for it and it will be discussed.
One possibility if you have a Java developer could be to implement an Oxygen plugin and use our API to add a custom editor variables resolver. If you are interested in this approach I could try to give you more details.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5585

Re: Apply ${ask as variable

Tue Jun 19, 2018 7:39 am

Hi,

As an update we released Oxygen 20.1 which has a new editor variable called ${answer}, you can see an usage example here:

https://www.oxygenxml.com/doc/versions/20.1/ug-editor/topics/editor-variables.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests