Page 1 of 1

Search doesn't find text inside referenced elements

Posted: Wed Apr 13, 2016 1:13 pm
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.

Re: Search doesn't find text inside referenced elements

Posted: Wed Apr 13, 2016 1:38 pm
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

Re: Search doesn't find text inside referenced elements

Posted: Wed Apr 13, 2016 2:06 pm
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!

Re: Search doesn't find text inside referenced elements

Posted: Wed Apr 13, 2016 2:10 pm
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