Is there a way to disable the display of indexterms in .xml

Oxygen general issues.
shuber
Posts: 13
Joined: Tue Aug 27, 2013 5:56 pm

Is there a way to disable the display of indexterms in .xml

Post by shuber »

We use index terms and our .xml files are littered with them, so much so that it's difficult to find the actual words in the file! An example is:

Code: Select all


<context>
<p>(indexterm Installment bill (indexterm schedule indexterm)The mailed dates, initial(indexterm Discount (indexterm on installment bill indexterm)discounts, and (indexterm Penalty (indexterm installment bill indexterm)indexterm)penalties for each (indexterm Schedule, installment bill indexterm)indexterm)(indexterm Installment bill (indexterm penalty indexterm)indexterm)installment (indexterm Installment bill (indexterm discount on indexterm)indexterm)bill are as follows:<p>
Fun, huh? And that's one of the easier ones. These index terms were added by someone (who no longer works with us) when we used FrameMaker and now we're dealing with the aftermath in Oxygen. Is there any way to turn off the display of indexterms in the .xml files so I can edit my files without wanting to throw my computer out of the window?
Radu
Posts: 9445
Joined: Fri Jul 09, 2004 5:18 pm

Re: Is there a way to disable the display of indexterms in .

Post by Radu »

Hi Susan,

If you open the main CSS used to render DITA content in the Author visual editing mode:

OXYGEN_INSTALL_DIR\frameworks\dita\css_classed\dita.css

you can add an extra selector to the end of it:

Code: Select all


indexterm{
visibility:-oxy-collapse-text;
}
which will collapse all the text inside index terms but still leave those small triangles showing the element tags just so you know there are index terms there.

You can also create an alternate CSS which imports the "dita.css" and adds this extra selector. Then you can switch between the regular editing CSS and the alternate CSS if you sometimes you want to see the index term content and sometimes you want to hide them.
I gave some directions about creating an alternate CSS for the DITA Map document type here (directions which can be followed also for the DITA document type):

http://www.oxygenxml.com/forum/post3152 ... css#p31524

As a possible future practice, in our user manual we only define index terms in the prolog area on the topic like:

Code: Select all

<topic id="changing-user-interface-language">
<title>Localizing the User Interface</title>
<prolog>
<metadata>
<keywords>
<indexterm>Edit<indexterm>change the user interface language</indexterm><indexterm>localize
the user interface</indexterm></indexterm>
</keywords>
</metadata>
</prolog>
.........
Maybe you could create an automated process which migrates from each topic the index terms to the prolog area.

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