Searching in Oxygen - "Ignore extra white spaces" not working properly
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Searching in Oxygen - "Ignore extra white spaces" not working properly
Post by Anonymous1 »
Hi,
our XML topics can sometimes contain line breaks or white spaces that somehow influence the Oxygen search function.
For example
I want to search a certain keyword. In the Oxygen Text view, the keyword can look like this:
In the search window, I type <keyword keyref="product_name"/> and activate "Ignore extra white spaces". The result shows me some matches for the search term, but not necessarily all matches. I would expect to find all matches for the search term, no matter how many white spaces are included in the term in the topics.
Am I expecting too much from the "Ignore extra white spaces" function? I thought it's intended for this exact use case.
Thanks,
Benjamin
our XML topics can sometimes contain line breaks or white spaces that somehow influence the Oxygen search function.
For example
I want to search a certain keyword. In the Oxygen Text view, the keyword can look like this:
Code: Select all
<keyword keyref="product_name"
/>
Am I expecting too much from the "Ignore extra white spaces" function? I thought it's intended for this exact use case.
Thanks,
Benjamin
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Searching in Oxygen - "Ignore extra white spaces" not working properly
Hi Benjamin,
I think your expectations are correct.
If you describe a precise case in which this does not work (paste in a codeblock some DITA content) we could try to fix it.
Regards,
Radu
I think your expectations are correct.
If you describe a precise case in which this does not work (paste in a codeblock some DITA content) we could try to fix it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Searching in Oxygen - "Ignore extra white spaces" not working properly
Post by Anonymous1 »
If I reference the topic (code below) in a ditamap and then use the "Find/Replace in Files" dialog to search for the product name keyword, I get different results depending on how many white spaces I put in the "Text to find" field. "Ignore extra white spaces" is alway activated. Using Oxygen 19.0 with a custom framework.
Wrong search result when searching for:
Correct search result when searching for:
Wrong search result when searching for:
Code: Select all
<keyword keyref="product_name"/>
Code: Select all
<keyword keyref="product_name"
/>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:smtg:dita:rng:smtg_concept.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="urn:smtg:dita:rng:smtg_concept.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<concept xml:lang="en-US" id="test_topic_c">
<title>Test title</title>
<shortdesc>This is a test.</shortdesc><prolog>
<author>Test</author>
<critdates>
<created date="2017-07-15"/>
<revised modified="2017-12-21"/>
</critdates>
</prolog>
<conbody>
<p>Hello how are you <keyword keyref="product_name"
/>, test test test.</p>
<p><keyword keyref="product_name"
/> test test test.</p>
</conbody>
</concept>
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Searching in Oxygen - "Ignore extra white spaces" not working properly
Hi Ben,
Thanks, I understand now.
Instead of that special checkbox you can probably enable regular expressions and search for <keyword(\s*)keyref="product_name"(\s*)/>.
The "Ignore extra white spaces" basically also uses regular expressions underneath, if you try to search for <keyword keyref="product_name"/> it will try to compose a regular expression looking like this: <keyword(\s+)keyref="product_name"/> so that no matter how many whitespaces are between the keyword and the attribute it will still match them. But it does not do anything about relaxing the match of the "/>" with possible previous white spaces.
I will add an internal issue on our side, maybe based on your example we can improve the behavior.
Regards,
Radu
Thanks, I understand now.
Instead of that special checkbox you can probably enable regular expressions and search for <keyword(\s*)keyref="product_name"(\s*)/>.
The "Ignore extra white spaces" basically also uses regular expressions underneath, if you try to search for <keyword keyref="product_name"/> it will try to compose a regular expression looking like this: <keyword(\s+)keyref="product_name"/> so that no matter how many whitespaces are between the keyword and the attribute it will still match them. But it does not do anything about relaxing the match of the "/>" with possible previous white spaces.
I will add an internal issue on our side, maybe based on your example we can improve the behavior.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Searching in Oxygen - "Ignore extra white spaces" not working properly
Post by Anonymous1 »
That would be nice. Getting more familiar with regular expressions is also a good idea. Thanks for providing an example for this.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service