Search for highlighted text

Having trouble installing Oxygen? Got a bug to report? Post it all here.
sdarnowsky
Posts: 6
Joined: Wed Apr 14, 2021 8:47 pm

Search for highlighted text

Post by sdarnowsky »

In our XML files, we often use highlighting to identify sections of the file that have changed. Is there a way to search an XML file for highlighted text?
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search for highlighted text

Post by Radu »

Hi,

If those color highlights are added in the Author visual editing mode maybe you can use our Find/Replace in Files dialog and search for <?oxy_custom_start, these are special processing instructions we use to serialize the highlight intervals.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sdarnowsky
Posts: 6
Joined: Wed Apr 14, 2021 8:47 pm

Re: Search for highlighted text

Post by sdarnowsky »

Thanks! We do add the highlights in Author mode, and the search technique you suggested seems to work! Sometimes multiple writers work on a single XML file, each using a different highlight color, so searching on the color attribute value (like 255,255,0) provides even better targeting.

I only tried this technique when Scope was set to All opened files, and it would be nice to be able to search a group of files that aren't open. We put hundreds of files in a given folder, so searching by file directory or path wouldn't be limiting enough. I hardly ever use the Project pane, but if I were to select a folder in that pane and select Selected project resources, would that limit the search to the files in that folder? It seems that you can't select anything in the Project pane with then dialog is already open.

Lastly, in the search results, it looks like you have to expand the first level of hits to be able to double-click the hit that actually takes you to the highlighted text, and even then, the cursor location isn't very precise. But I believe that's a known issue that will be fixed in a future release. In any case, being able to get to the general neighborhood of the highlight is still helpful.

Thanks for your suggestion!
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search for highlighted text

Post by Radu »

Hi,

You should try to create a new Oxygen project for your folders, it helps if you want to run batch find/replace operations, spell check, validation and so on.
An older webinar recording about setting up an Oxygen project and its benefits:

https://www.oxygenxml.com/events/2018/w ... setup.html

The Find/Replace in Files dialog is modal, but you can close it, select in the Project the right folder to search in and then show it again.

About the find results list view presented in Oxygen, there is a cogwheel-like drop down button in the right top part of the results view, you can choose for example "Ungroup all" if you want to present results flattened.
About the results not being properly matched in the Author mode, it's hard to match them there as in the Author mode that processing instruction is completely missing, it's present just in the XML serialization. So you can switch the opened XML document to the Text mode if you want to get a more precise localization.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sdarnowsky
Posts: 6
Joined: Wed Apr 14, 2021 8:47 pm

Re: Search for highlighted text

Post by sdarnowsky »

Thanks again for the additional details! We're not currently using DITA, but will be transitioning to it in the future. I'll check out the video and see if there's a way we can apply it to our current setup.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Search for highlighted text

Post by Radu »

Hi,

Sure, then I'm also adding a link to a more generic webinar about working with Oxygen Projects and their benefits:
https://www.oxygenxml.com/events/2016/w ... jects.html

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