[oXygen-user] Removing or adding two attributes at the same time

George Cristian Bina george at oxygenxml.com
Mon Nov 11 07:20:06 CST 2013


Hi Felix,

We will consider updating the XSLTOperation to allow also setting a URL 
to an XSLT script instead of the XSLT content. We can do this either by 
automatically detecting that you added a file instead of XSLT code or we 
can add an additional parameter to the operation, for example scriptURL.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 11/11/13, 2:55 PM, Felix Sasaki wrote:
> Thanks a lot, Radu and Patrick. Indeed Patrick described my mistake and
> the XSLT call is working fine now.
>
> Best,
>
> Felix
>
> Am 11.11.13 11:09, schrieb Oxygen XML Editor Support:
>> 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.html
>>
>> 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-operations.html
>>> 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.html#the-action-dialog
>>> 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 at oxygenxml.com
>>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>>
>> _______________________________________________
>> oXygen-user mailing list
>> oXygen-user at oxygenxml.com
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list