Variable default value for $ask()
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 23
- Joined: Mon May 19, 2014 11:38 am
Variable default value for $ask()
Dear Board Members,
I am setting up an author action for a certain framework. The action is relatively simple and uses the ChangeAttributeOperation to, well, change an attribute of the node that has been right-clicked.
I use the "editor variable" ${ask} and the user is prompted for the desired value.
I'd like to set the text field that the user gets first to the current value of the attribute. To this end I have to put an xpath expression into the 'default' argument of the ${ask} expression. Is this somehow possible? Is there another solution?
More generally, is it possible to use xpath anywhere in the arguments of the author operations?
Thank you in advance.
I am setting up an author action for a certain framework. The action is relatively simple and uses the ChangeAttributeOperation to, well, change an attribute of the node that has been right-clicked.
I use the "editor variable" ${ask} and the user is prompted for the desired value.
I'd like to set the text field that the user gets first to the current value of the attribute. To this end I have to put an xpath expression into the 'default' argument of the ${ask} expression. Is this somehow possible? Is there another solution?
More generally, is it possible to use xpath anywhere in the arguments of the author operations?
Thank you in advance.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Variable default value for $ask()
Hi Alexey,
In Oxygen 15.2 you do not have this possibility.
We plan to release Oxygen 16.0 this week and in Oxygen 16.0 you will have a brand new editor variable called xpath_eval. You will be able to use it inside the ask editor variable like and it will return for example the value of the ID attribute on the current element.
Basically the entire ChangeAttributeOperation parameter value will be something like:
Regards,
Radu
In Oxygen 15.2 you do not have this possibility.
We plan to release Oxygen 16.0 this week and in Oxygen 16.0 you will have a brand new editor variable called xpath_eval. You will be able to use it inside the ask editor variable like
Code: Select all
${xpath_eval(@id)}
Basically the entire ChangeAttributeOperation parameter value will be something like:
Code: Select all
${ask('Set new ID attribute', generic, '${xpath_eval(@id)}')}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 23
- Joined: Mon May 19, 2014 11:38 am
Re: Variable default value for $ask()
Thank you, Radu,
I am looking forward to the release.
As for now, I have come up with a workaround through CSS using oxy_editor with a value composed of the necessary XPath expressions.
However, I still cannot force a default value into the combo, so that the user does not start with an unset value. Is there a way to set a default value for an oxy_editor combo?
I am looking forward to the release.
As for now, I have come up with a workaround through CSS using oxy_editor with a value composed of the necessary XPath expressions.
However, I still cannot force a default value into the combo, so that the user does not start with an unset value. Is there a way to set a default value for an oxy_editor combo?
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Variable default value for $ask()
Hi Alexey,
The presented combo box has nothing in it probably because the XML element does not have a value set for that attribute.
Did you somehow want that when the user click inside the combo box to automatically set an initial value for him to start with? As far as I know we do not have such functionality, you would need to create your own Java-based implementation of a form control for this so it would take some development effort.
Oxygen 16.0 has just been released on our web site, the xpath_eval function is now described here:
http://www.oxygenxml.com/doc/ug-editor/ ... ables.html
Regards,
Radu
The presented combo box has nothing in it probably because the XML element does not have a value set for that attribute.
Did you somehow want that when the user click inside the combo box to automatically set an initial value for him to start with? As far as I know we do not have such functionality, you would need to create your own Java-based implementation of a form control for this so it would take some development effort.
Oxygen 16.0 has just been released on our web site, the xpath_eval function is now described here:
http://www.oxygenxml.com/doc/ug-editor/ ... ables.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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