can user input be passed to external tools?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
can user input be passed to external tools?
Post by Ron Van den Branden »
For a project, I have set up an Ant transformation that invokes different XSLT stylesheets depending on some choices offered to the user. Those choices are passed as Ant parameters, via a dialog that's generated with the ${ask('message', type, ('real_value1':'rendered_value1'; 'real_value2':'rendered_value2'; ...), 'default_value')} editor variable.
Yet, since probably more transformation scenarios will be required, I am considering if a dedicated menu button for each transformation wouldn't be easier for the project contributors. The simplest form (I can't program Java) seems the definition of such an action as an "external tool" that invokes Ant. However, can external tools make use of the editor variables that are available to XSLT/Ant transformations? In other words: is there a way to ask for user input with external tools? Or should I consider another option to provide this action in a dedicated button?
Best,
Ron
Yet, since probably more transformation scenarios will be required, I am considering if a dedicated menu button for each transformation wouldn't be easier for the project contributors. The simplest form (I can't program Java) seems the definition of such an action as an "external tool" that invokes Ant. However, can external tools make use of the editor variables that are available to XSLT/Ant transformations? In other words: is there a way to ask for user input with external tools? Or should I consider another option to provide this action in a dedicated button?
Best,
Ron
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: can user input be passed to external tools?
Hi Ron,
We have Java-based API which would allow you to build a plugin which contributes additional toolbar buttons, each button invoking a certain transformation scenario.
The external tools drop down can only invoke command lines defined in the External Tools Preferences page. When you edit an external tool, you can see for each field what editor variables are supported. Also they cannot invoke a certain transformation scenario.
Do the contributors edit the XML documents in the Author visual editing mode? Did you define a document type association for it? If so, I could give you a workaround which would not require Java knowledge.
Regards,
Radu
We have Java-based API which would allow you to build a plugin which contributes additional toolbar buttons, each button invoking a certain transformation scenario.
The external tools drop down can only invoke command lines defined in the External Tools Preferences page. When you edit an external tool, you can see for each field what editor variables are supported. Also they cannot invoke a certain transformation scenario.
Do the contributors edit the XML documents in the Author visual editing mode? Did you define a document type association for it? If so, I could give you a workaround which would not require Java knowledge.
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: can user input be passed to external tools?
Post by Ron Van den Branden »
Hi Radu,
I assume even a Java-illiterate like me could give the Java option a try/err, by copying/pasting from the documentation and e.g. the TEI framework.
Still, the other option you mentioned could just fit the bill, I'm very curious! Both conditions are fulfilled: the contributors edit in Author mode, and a document type association is defined in the xpr file.
Best,
Ron
I assume even a Java-illiterate like me could give the Java option a try/err, by copying/pasting from the documentation and e.g. the TEI framework.
Still, the other option you mentioned could just fit the bill, I'm very curious! Both conditions are fulfilled: the contributors edit in Author mode, and a document type association is defined in the xpr file.
Best,
Ron
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: can user input be passed to external tools?
Hi Ron,
After the action is created, go to the Toolbar tab and add it to the toolbar which will be shown when that type of XML document is edited in the visual Author editing mode.
In the same "Document type" edit dialog there is a Transformation tab in which you can create predefined transformation scenarios for your type of edited XML documents, scenarios which are then referenced by name from the action you have created.
You can try these steps and if you find a problem, just let me know and I'll try to provide more details.
Regards,
Radu
Great. You go to the Oxygen Preferences->Document Type Association page and edit your custom document type. In the Author tab go to the Actions tab and create a new action. Set an ID ("pdf.transform" for example), name ("PDF" for example or "XHTML") and description (will appear on tooltip). In the bottom Operations panel set the activation XPath expression to true() and use the Choose button to find an operation called ExecuteTransformationScenariosOperation. This operation has an argument called scenarioNames which should have as value the name of the transformation scenario to run when the action is executed.Still, the other option you mentioned could just fit the bill, I'm very curious! Both conditions are fulfilled: the contributors edit in Author mode, and a document type association is defined in the xpr file.
After the action is created, go to the Toolbar tab and add it to the toolbar which will be shown when that type of XML document is edited in the visual Author editing mode.
In the same "Document type" edit dialog there is a Transformation tab in which you can create predefined transformation scenarios for your type of edited XML documents, scenarios which are then referenced by name from the action you have created.
You can try these steps and if you find a problem, just let me know and I'll try to provide more details.
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: can user input be passed to external tools?
Post by Ron Van den Branden »
Hi Radu,
Wonderful, works like a charm! Thanks for your detailed help, you've pointed me to customized menus etc. at once.
Best,
Ron
Wonderful, works like a charm! Thanks for your detailed help, you've pointed me to customized menus etc. at once.
Best,
Ron
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