
Hi Felix, In addition to Patrik's useful response, just to answer some of your original questions:
it seems not possible to trigger two operations via one action: "An action has one or mode operation modes. The evaluation of an XPath expression activates an operation mode. The first enabled operation mode is activated when you trigger the action."
Indeed, only one operation can be triggered in a certain XPath activation context. So besides using the XSLT Operation you could also implement a custom Java operation to set both attributes to the current element using our API.
Any ideas how to move forward? If the XSLTOperation is the way to go: is there an example in an existing framework that demonstrates how the operation is used?
A small example configuring an XSLT Operation can be found here: http://www.oxygenxml.com/doc/ug-oxygen/topics/dg-default-author-operations.h... Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 11/9/2013 11:51 AM, Felix Sasaki wrote:
Hi all,
For an oXygen framework (DocBook), I would like to exectue an operation that removes or adds two attributes at the same time after the user has clicked on a button.
The use case is that in my DocBook customization these attributes need to appear at the same time. Adding or removing just one of them would make the file invalid, and having two buttons is not an option, because there are many such combined attributes, the GUI would get too full.
The ChangeAttributeOperation at http://www.oxygenxml.com/doc/ug-oxygen/index.html#topics/dg-default-author-o... didn't work for me since I cannot have two of these operations associated with one button.
Looking at http://www.oxygenxml.com/doc/ug-oxygen/index.html#topics/the-action-dialog.h... it seems not possible to trigger two operations via one action: "An action has one or mode operation modes. The evaluation of an XPath expression activates an operation mode. The first enabled operation mode is activated when you trigger the action."
I also tried to evoke an XSLT transformation via XSLTOperation that removes the attributes. But although the "script" value IMO opinion points to the right location of the XSLT and that XSLT file is valid, I get an error from evoking the action, saying: "Couldn't exectute operation ro.sync.ecss.extensions.commons.operations.TransformOperation because ... cannot create Transformer: failed to compile stylesheet."
Any ideas how to move forward? If the XSLTOperation is the way to go: is there an example in an existing framework that demonstrates how the operation is used?
Thanks,
Felix _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user