Bug #3733
closedBug in regexp matching when using '[/s/S]+'?
100%
Description
When I run the attached stylesheet in Oxygen 20 with Saxon EE 9.8.0.8 I get the result 'non-matching false foaf:name'.
When I run the same stylesheet with starting template start in Oxygen 19.1 with 9.7.0.18, I get 'name true name' which I expect.
I downloaded HE from maven and ran from command line with:
java -jar Saxon-HE-9.8.0-10.jar -it:start -xsl:matching-nonmatching.xsl -o:test.txt which returns 'non-matching false foaf:name'.
If I change around from '[\s\S]+' to '[\S\s]+' it seems to work.
The bundled java in Oxygen20 is 'java.runtime.version 1.8.0_121-b13' (Oracle) and I'm running it on a laptop with fedora 27. Java for command line is openjdk version "1.8.0_161"
.
Files
Updated by Michael Kay over 6 years ago
- Category set to XPath conformance
- Status changed from New to In Progress
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch trunk added
Appears to be because IntComplementSet.isEmpty() is incorrectly implemented as { size() != 0 } -- should obviously be { size() == 0 }.
Updated by Michael Kay over 6 years ago
While stepping through this in the debugger I noticed that \s is parsing as the set (9, 10, 32). It should surely be (9, 10, 13, 32)?
On investigation, the IntArraySet value is correct, but its toString() method incorrectly displays it as "9-10,32".
Updated by Michael Kay over 6 years ago
- Status changed from In Progress to Resolved
- Fix Committed on Branch 9.8, trunk added
Patches (to IntArraySet.toString() and IntComplementSet.isEmpty()) applied on 9.8 branch and trunk.
Updated by Michael Kay over 6 years ago
- Fix Committed on Branch 9.7 added
I've also applied these two patches on the 9.7 branch in case we do another 9.7 maintenance release.
Updated by O'Neil Delpratt over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.12 added
Bug fix applied in the Saxon 9.8.0.12 maintenance release.
Please register to edit this issue