DITA framework customization: combining insertFragment + GenerateIDs

Bruno.Ballarin
Posts: 24
Joined: Thu Aug 07, 2014 3:40 pm

DITA framework customization: combining insertFragment + GenerateIDs

Post by Bruno.Ballarin » Fri Aug 10, 2018 3:36 pm

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
Site Admin
Posts: 204
Joined: Mon May 09, 2016 9:37 am

Re: DITA framework customization: combining insertFragment + GenerateIDs

Post by sorin_carbunaru » Fri Aug 10, 2018 6:02 pm

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: 24
Joined: Thu Aug 07, 2014 3:40 pm

Re: DITA framework customization: combining insertFragment + GenerateIDs

Post by Bruno.Ballarin » Fri Aug 10, 2018 6:23 pm

option 2, using ExecuteMultipleActionsOperation, solved my problem.

Thank you very much Sorin :)

Post Reply