Page 1 of 1

DITA framework customization: combining insertFragment + GenerateIDs

Posted: Fri Aug 10, 2018 3:36 pm
by Bruno.Ballarin
Hi,

I am trying to combine 2 operations into a single custom action button within DITA framework:

1rst operation:
Image

2nd operation:
Image

for some reason the 2nd operation does not seam to work, the fn element is created but no ID is generated in the fn element.

If I create another button with only the 2nd action, and click this second button on an existing fn, it works, the ID is generated.

Note: I have added a line with "fn" in DITA menu, under ID options.

Cheers,

Bruno

Re: DITA framework customization: combining insertFragment + GenerateIDs

Posted: Fri Aug 10, 2018 6:02 pm
by sorin_carbunaru
Hello Bruno,

Unfortunately for you, oXygen will trigger only the first operation whose activation XPath is fulfilled, even though there might be several operations whose activation XPath expressions are also fulfilled.

For your use-case, in the DITA framework you could define only the operation that inserts the XML fragment, and then add the element name for which you want to generate an ID to the list of element for which the ID generation is automatically performed (DITA menu > ID Options...). See more at: https://www.oxygenxml.com/doc/versions/ ... odes2.html.

By the way, for more complicated use-cases, when you want to execute multiple operations on a single action, use ExecuteMultipleActionsOperation :).

All the best wishes,
Sorin Carbunaru
oXygen XML

Re: DITA framework customization: combining insertFragment + GenerateIDs

Posted: Fri Aug 10, 2018 6:23 pm
by Bruno.Ballarin
option 2, using ExecuteMultipleActionsOperation, solved my problem.

Thank you very much Sorin :)