renaming certain <b> elements with <uicontrol>

Questions about XML that are not covered by the other forums should go here.
Ronser
Posts: 10
Joined: Thu Apr 12, 2018 5:33 pm

renaming certain <b> elements with <uicontrol>

Post by Ronser » Mon Apr 30, 2018 6:21 pm

Hello,

After migrating to DITA, all strong formatting was transposed as a <b> element. Some of these are ok to remain as <b>, but some of this content should be refactored as <uicontrol>. What would be the quickest way to search through the content, and easily refactor <b> elements as <uicontrol> where desired?

The quickest method I've found is to use the xpath "//b[1]" to find all bold elements, and then manually change the tags to <uicontrol> where needed. I was just wondering if there was a quicker way anyone could think of?

Radu
Posts: 6582
Joined: Fri Jul 09, 2004 5:18 pm

Re: renaming certain <b> elements with <uicontrol>

Post by Radu » Wed May 02, 2018 8:57 am

Hi,

In the Oxygen Tools main menu there is an "XML Refactoring" action which has a "Rename element" possibility. There is a preview which could be used to see all matched places and possibly also exclude certain resources. Unfortunately you can exclude entire topics but not exclude individual renames from inside a topic. Maybe you could duplicate your entire project to some other folder, use the XML Refactoring rename to rename all matches in the duplicate project and then use Oxygen's "Compare directories" to decide which renames to keep and which to revert.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply