DITA framework customization: combining insertFragment + GenerateIDs

Post here questions and problems related to editing and publishing DITA content.
Bruno.Ballarin
Posts: 25
Joined: Thu Aug 07, 2014 3:40 pm

DITA framework customization: combining insertFragment + GenerateIDs

Post 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
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: DITA framework customization: combining insertFragment + GenerateIDs

Post 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
Bruno.Ballarin
Posts: 25
Joined: Thu Aug 07, 2014 3:40 pm

Re: DITA framework customization: combining insertFragment + GenerateIDs

Post by Bruno.Ballarin »

option 2, using ExecuteMultipleActionsOperation, solved my problem.

Thank you very much Sorin :)
Post Reply