Hi,
So:
With an individual value in @key, while the other attributes have to be filled by the user. The schema validates @key against a closed list. The schema does with the framework.
When you customize a framework configuration, after you create an Author action instead of adding it to the contextual menu, in the Author tab there is a "Content completion" tab which allows you to add the action in the content completion window (the one which appears when you press ENTER in the Author visual editing mode and which has key search). So this might be another possibility.
At the moment I generate an action for each allowed value of @key. Alternatively I could implement one action offering all the @key values in a dropdown via ${ask('message', combobox,('key':'value';'key2':'value2'). IS that what you mean?
Could I add other form fields to that dialog for the other attributes?
The "ask" editor variable is quite limited in functionality.
When you create a new Author action in your custom framework, the action can have various activation modes (usually it has only one) and each activation mode can invoke an operation. Oxygen has lots of predefined available operations, among which the operation which inserts an XML fragment at the caret position:
https://www.oxygenxml.com/doc/versions/ ... operations
but using our Maven-based
Author SDK you can also provide your custom Author operation implementations:
https://www.oxygenxml.com/doc/versions/ ... a-api.html
This would mean that when the action is pressed, Oxygen would invoke your custom Java code which could for example create a dialog using the Swing libraries showing a list of choices to the end user. Then using the Oxygen SDK API you could insert XML content at the caret position.
But you would need fair knowledge of Java to do that.
There is also a predefined operation called "JSOperation" which allows you to call the Oxygen API directly from some custom Javascript code, you can look as an example for "JSOperation" here:
https://www.oxygenxml.com/doc/versions/ ... tions.html
As an example I created a Javascript-based operation implementation which asks the end user to pick a key value and then inserts an XML fragment containing it:
https://github.com/oxygenxml/javascript ... XMLFrag.js
Is there a way to read those values ad-hoc form the supplied RNG schema? Or would that not be wise?
What do you mean by "values"? Do you mean the possible values for the @key attribute?
Regards,
Radu