Search doesn't find text inside referenced elements

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

Search doesn't find text inside referenced elements

Post by B-E-N » Wed Apr 13, 2016 1:13 pm

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: 6453
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search doesn't find text inside referenced elements

Post by Radu » Wed Apr 13, 2016 1:38 pm

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

B-E-N
Posts: 122
Joined: Thu Mar 24, 2016 5:54 pm

Re: Search doesn't find text inside referenced elements

Post by B-E-N » Wed Apr 13, 2016 2:06 pm

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: 6453
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search doesn't find text inside referenced elements

Post by Radu » Wed Apr 13, 2016 2:10 pm

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