Project

Profile

Help

Bug #635

closed

xsl:number level="any" count="/ | node()"

Added by Anonymous over 19 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Legacy ID:
sf-1261320
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

bug1.xsl (9.56 KB) bug1.xsl Anonymous, 2005-08-16 20:33
bug1.xml (9.56 KB) bug1.xml Anonymous, 2005-08-16 20:54
Actions #1

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;

        }
Actions #2

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

Also available in: Atom PDF