Bug #635
closedxsl:number level="any" count="/ | node()"
0%
Description
SourceForge user: jkmathes
I have whittled the stylesheet down to only the part that causes
Saxon to crash.
Interestingly, this crashes in AnyNodeTest.java in Saxon 8.5, but in
PrecedingEnumeration.java for earlier versions of Saxon 8.x.
Attached are the .xsl and .xml which can be used to demonstrate
this.
Files
Updated by Anonymous over 19 years ago
SourceForge user: mhkay
Logged In: YES
user_id=251681
Title changed: was
OASIS conformance test bvt061 causes Saxon to crash
Thanks, now fixed, and a test case added.
Even where it's self-evident that there's a bug, I do prefer
incidents to be submitted on the saxon-help list or forum
(or via "support requests"), so that the bug register
describes the bugs after analysis, to help people searching
for known errors.
This problem affects any use of <xsl:number level="any">
with a count pattern that matches document nodes. I suspect,
but haven't confirmed, that it will also trigger if the
count pattern matches the element at the root of a
non-document tree.
Source fix: in PrecedingEnumeration add an else branch to
the if statement at line 39 (if !includeAncestors):
} else {
if (tree.depth[nextNodeNr] == 0) {
current = null;
position = -1;
return null;
}
Updated by Anonymous over 19 years ago
SourceForge user: mhkay
Logged In: YES
user_id=251681
This test actually reveals a second problem: with
level="any", if no ancestor or preceding node matches the
"from" pattern, which is the case here, then the result
should be () - an empty sequence. Saxon is treating this
case as if the from pattern were absent.
I've fixed this one too but won't provide a patch. Test case
numb41.
MK
Please register to edit this issue