Removing element with Find/Replace

Questions about XML that are not covered by the other forums should go here.
melster10
Posts: 3
Joined: Wed Oct 30, 2013 10:13 pm

Removing element with Find/Replace

Post 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.
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Removing element with Find/Replace

Post 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
Mihaela Calotescu
http://www.oxygenxml.com
melster10
Posts: 3
Joined: Wed Oct 30, 2013 10:13 pm

Re: Removing element with Find/Replace

Post 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
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Removing element with Find/Replace

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