Page 1 of 1

Search for highlighted text

Posted: Thu Nov 11, 2021 12:50 am
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?

Re: Search for highlighted text

Posted: Thu Nov 11, 2021 12:14 pm
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

Re: Search for highlighted text

Posted: Thu Nov 11, 2021 6:06 pm
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!

Re: Search for highlighted text

Posted: Fri Nov 12, 2021 12:41 pm
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

Re: Search for highlighted text

Posted: Mon Nov 15, 2021 5:05 pm
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.

Re: Search for highlighted text

Posted: Tue Nov 16, 2021 8:06 am
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