Search doesn't find text inside referenced elements

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Anonymous1

Search doesn't find text inside referenced elements

Post by Anonymous1 »

If I want to find a certain term or sentence, I open the ditamap in the DITA Maps Manager, press Ctrl+F, type in the search term and click Find All. This works very well.

However, if the term I am looking for is inside a referenced element (section, parml, etc.), the search is not able to find it. As a workaround, I can click "Open Map in Editor with resolved topics" and perform a search in the Editor. In this case, the search is able to find text inside referenced elements.

I imagine it is difficult for the search to see the content of a referenced element before it is resolved.
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search doesn't find text inside referenced elements

Post by Radu »

Hi Ben,

The "Find/Replace in Files" feature you are using should search in all topics referenced directly in the DITA Map.
Probably you have a special topic containing reusable content and you conref to that content from various places.
As a best practice in general, those topics containing reusable content should also be linked in the DITA Map with a processing-role="resource-only" attribute set on the topicref. Something like:

Code: Select all

<topicref href="reusables/reusables.dita" processing-role="resource-only" toc="no"/>
If you do that, the Find/Replace in Files will start looking also in that particular topic.

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

Re: Search doesn't find text inside referenced elements

Post by Anonymous1 »

That is a great idea. It would also help to have more focus on the topics that only contain reusable content. They normally never appear in any of our ditamaps.

Thanks Radu!
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search doesn't find text inside referenced elements

Post by Radu »

Hi Ben,

Right, usually it is recommended to have a special DITA Map which only refers to such topics which contain reusable topics. And then in the master DITA map to have a reference to this submap containing all the reusables collection.
My DITA Reuse Strategies blog post should have more hints about best practices:

http://blog.oxygenxml.com/2015/11/dita- ... orial.html

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