DITA framework customization: combining insertFragment + GenerateIDs

Bruno.Ballarin
Posts: 6

DITA framework customization: combining insertFragment + GenerateIDs

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: 153

Re: DITA framework customization: combining insertFragment + GenerateIDs

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: 6

Re: DITA framework customization: combining insertFragment + GenerateIDs

Fri Aug 10, 2018 6:23 pm

option 2, using ExecuteMultipleActionsOperation, solved my problem.

Thank you very much Sorin :)

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest