Simply macro command to add attributes to an element

Posts: 1

Simply macro command to add attributes to an element

Thu May 25, 2017 11:34 am

I'm migrating to using Oxygen from Arbortext. Arbortext has the macro recorder, which I often used to do the following:
i) to insert elements such as <keyword conref="../common/vars.xml#prod"/> all at once without them having to insert the element, insert the attribute and then type the value of the attribute.
ii) to add multiple attributes (e.g. rev="pj44596" otherprops="pj44596on") to an existing tag element all at once.

I know that Oxygen offers code templates to automate some operations. They work well in the first case (inserting elements). However, it seems that they cannot be used to add attributes. Is there any simple way to add attributes at one go?
Posts: 5753

Re: Simply macro command to add attributes to an element

Thu May 25, 2017 3:28 pm


Thanks for the suggestions. We do have some plans to add support for macros in a future version so I will add your vote for that, we will update this forum thread when we implement the feature.
I'm interested in each of the cases in how you got around to do that in the previous XML editing tool, so telling us the sequence of steps you previously took for both (i) and (ii) would help us better realize how we could implement this issue ourselves.
Indeed for the first case you can create a code template which contains ${ask} editor variables and thus prompts the end user to enter various values when the code template gets inserted.
For (ii) as the attributes are profiling attributes, right now you can select all those elements that you want to mark in the Oxygen Outline view, then right click in the main editing area and choose "Edit Profiling Attributes", the attributes which you set there should be set on all the selected elements.
Another possibility for (ii) would be to implement a custom DITA action which can be called and which can modify the current selected element in various ways. So if you give me more details about how you previously did this, I could try to look into what it would take to implement a custom action for this.

Radu Coravu
<oXygen/> XML Editor

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

Who is online

Users browsing this forum: No registered users and 1 guest