Removing element with Find/Replace

Questions about XML that are not covered by the other forums should go here.
melster10
Posts: 3

Removing element with Find/Replace

Thu Feb 11, 2016 12:15 am

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.
mihaela
Posts: 189

Re: Removing element with Find/Replace

Thu Feb 11, 2016 4:58 pm

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
Mihaela Calotescu
http://www.oxygenxml.com
melster10
Posts: 3

Re: Removing element with Find/Replace

Thu Feb 11, 2016 7:43 pm

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
mihaela
Posts: 189

Re: Removing element with Find/Replace

Fri Feb 12, 2016 10:27 am

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
Mihaela Calotescu
http://www.oxygenxml.com

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests