Project

Profile

Help

Bug #3790

closed

Saxon-JS documentation app search problems

Added by Debbie Lockett over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Category:
-
Sprint/Milestone:
-
Start date:
2018-05-17
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0
Fix Committed on JS Branch:
1.0
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

In the documentation app, we search for the supplied search term in all the section documents using substring matching with fn:contains(), but then highlight using regex pattern matching with xsl:analyze-string. Unsurprisingly, this can produce some dodgy results (e.g. searching for "." means all text gets highlighted; searching for "?" results in an uncaught Saxon-JS error "Invalid regular expression /?/").


Related issues

Related to SaxonJS - Bug #3910: Error using fn:replace() with "q" flag when search string contains "-" characterClosedDebbie Lockett2018-09-19

Actions
Actions #1

Updated by Debbie Lockett over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Debbie Lockett over 6 years ago

  • Status changed from New to In Progress

The flag "q" can be used with the regex in xsl:analyze-string to achieve the required result. i.e. (from the Path 3.1 F&O Spec): "All characters in the regular expression are treated as representing themselves, not as metacharacters. In effect, every character that would normally have a special meaning in a regular expression is implicitly escaped by preceding it with a backslash."

Before discovering this flag, I attempted to do the escaping of special characters (as described in the second sentence) explicitly, but hit some problems with Saxon-JS. I'll raise a separate bug.

Actions #3

Updated by Debbie Lockett over 6 years ago

  • Status changed from In Progress to Resolved
  • Fix Committed on JS Branch 1.0 added

Fix in findtext.xsl stylesheet committed. SEF regenerated and updated online.

Actions #4

Updated by Debbie Lockett about 6 years ago

  • Related to Bug #3910: Error using fn:replace() with "q" flag when search string contains "-" character added
Actions #5

Updated by Debbie Lockett about 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.2.0

Bug fix applied in the Saxon-JS 1.2.0 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page