Page 1 of 1

Removing element with Find/Replace

Posted: Thu Feb 11, 2016 12:15 am
by melster10
How do you use the Find/Replace dialog in Author to remove a node element? I'd like to remove all the <prolog> elements and their contents from our dita files, since they contain <indexterms> that we don't want showing up in our webhelp output anymore. I tried using an Xpath query but am lost. Thanks.

Re: Removing element with Find/Replace

Posted: Thu Feb 11, 2016 4:58 pm
by mihaela
Hi,

In general, if you want to remove elements from different topics from your dita map you can use the "XML Refactoring" action that can be found in the DITA Maps Manager contextual menu.
Here is the documentation of the XML Refactoring dialog (you have to use "Delete element" action):
https://www.oxygenxml.com/doc/versions/ ... ments.html

Regarding your use-case, maybe it is better to just hide the "Index" tab from the webhelp output, instead of removing the prolog elements from your dita documents. To do that you have to specify a custom CSS in the Parameters tab of the webhelp transformation scenario in which the index tab has display none. Here is the documentation:
https://www.oxygenxml.com/doc/versions/ ... n-css.html
The css file must have the following content:

Code: Select all


#index {
display:none;
}
Regards,
Mihaela

Re: Removing element with Find/Replace

Posted: Thu Feb 11, 2016 7:43 pm
by melster10
Hi,
I have Oxygen Author so I don't see the XML Refactoring dialog, however the css code to hide the Index tab in the webhelp output worked great, thanks!

~ Mary Elise

Re: Removing element with Find/Replace

Posted: Fri Feb 12, 2016 10:27 am
by mihaela
Hi,

Indeed, Oxygen Author does not include the XML Refactoring feature. I'm glad that your problem is solved with the css customization.

Best regards,
Mihaela