Project

Profile

Help

Bug #3790

Saxon-JS documentation app search problems

Added by Debbie Lockett 10 months ago. Updated 6 months ago.

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

100%

Applies to JS Branch:
1.0
Fix Committed on JS Branch:
1.0
Fixed in JS Release:
SEF Generated with:
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 Saxon-JS - Bug #3910: Error using fn:replace() with "q" flag when search string contains "-" character Closed 2018-09-19 Actions

History

#1 Updated by Debbie Lockett 9 months ago

  • Description updated (diff)

#2 Updated by Debbie Lockett 9 months 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.

#3 Updated by Debbie Lockett 9 months 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.

#4 Updated by Debbie Lockett 6 months ago

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

#5 Updated by Debbie Lockett 6 months 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