OpenFind Resource finds when but not xsl:when?

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
RBVanDyke
Posts: 49
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

OpenFind Resource finds when but not xsl:when?

Post by RBVanDyke » Thu Mar 03, 2016 3:55 am

------
For oXygen XML Editor 17.1.

Why is it that I can use Open/Find Resource to find the word when by itself but NOT xsl:when?

■ If I type the word when by itself I immediately get results. The results include the word when when it is appended to xsl:.

■ If I modify that search to xsl:when, I get zero results.

■ I've verified that when is not in the list of oXygen XML Editor's stop words.

Regarding bullet item #2, the Help System's page https://www.oxygenxml.com/doc/versions/ ... urces.html leads me to believe that perhaps the colon character (":") has a special meaning in the search dialog(?) If so, it seems odd that a character so common to XML / XSL would be used in that way(?)

Regardless, I can't figure out why I can't Find Resource for an XSL tag of the form xsl:something but can search for the word something by itself-- it seems like Find-ing that construct would be a common use of Open/Find Resource?

Cheers & thanks for your help,
Riley
SFO

RBVanDyke
Posts: 49
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: OpenFind Resource finds when but not xsl:when?

Post by RBVanDyke » Thu Mar 03, 2016 4:00 am

Ohhhhh -- I just figured out the answer to my own question.

Evidently the Open/Find Resource text entry area by default uses REGEX search syntax(?) So I escaped the colon character in xsl:when so that my search read xsl\:when. Shazzam -- results galore!

Cheers & hope this helps somebody else,
Riley
SFO

adrian
Posts: 2586
Joined: Tue May 17, 2005 4:01 pm

Re: OpenFind Resource finds when but not xsl:when?

Post by adrian » Thu Mar 03, 2016 6:24 pm

Hello,

When searching in content, the Open/Find Resource dialog uses Apache Lucene - Query Parser Syntax. It's mentioned in the documentation, but I do agree it's not intuitive.
And yes, : is a special character in this syntax and must be escaped (\:) if you want to search for the actual : character.
All special characters that are part of the query syntax need to be escaped (use \ before each) when searched:

Code: Select all

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
I've logged an issue to investigate if we can somehow detect this situation, or at least provide an option for a literal search (so you don't have to escape any special characters).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

RBVanDyke
Posts: 49
Joined: Wed Feb 11, 2015 11:25 pm
Location: San Francisco, California USA
Contact:

Re: OpenFind Resource finds when but not xsl:when?

Post by RBVanDyke » Thu Mar 03, 2016 10:51 pm

Adrian:

Thanks. I finally found the special characters information via the URL to the Apache Lucene search syntax page at the top of this oXygen XML Editor 17.1 online help (OLH) page:

https://www.oxygenxml.com/doc/versions/ ... urces.html

I added a comment to that OLH page, the essence of which is that the information about Lucene's special search-string characters is at the very bottom of the linked-to page (who reads down that far?) AND that the information consists, as illustrated by your reply to this forum question, of only a small handful of characters. So my thought is to simply list those characters near the beginning of the oXygen OLH topic, then point the reader to the Apache Lucene page for more information. But that's just my opinion based on my immediate information needs...

Cheers, thanks 'gain, & hope this helps,
Riley

Post Reply