Project

Profile

Help

Revision 3ec2d492

Added by Michael Kay about 12 years ago

Fix bug 2859151 (N to M) in XPath 1.0 compatibility mode

View differences:

latest9.1/bj/net/sf/saxon/expr/RangeExpression.java
38 38
        operand0 = visitor.typeCheck(operand0, contextItemType);
39 39
        operand1 = visitor.typeCheck(operand1, contextItemType);
40 40

  
41
        boolean backCompat = visitor.getStaticContext().isInBackwardsCompatibleMode();
41 42
        RoleLocator role0 = new RoleLocator(RoleLocator.BINARY_EXPR, "to", 0);
42 43
        //role0.setSourceLocator(this);
43 44
        operand0 = TypeChecker.staticTypeCheck(
44
                operand0, SequenceType.OPTIONAL_INTEGER, false, role0, visitor);
45
                operand0, SequenceType.OPTIONAL_INTEGER, backCompat, role0, visitor);
45 46

  
46 47
        RoleLocator role1 = new RoleLocator(RoleLocator.BINARY_EXPR, "to", 1);
47 48
        //role1.setSourceLocator(this);
48 49
        operand1 = TypeChecker.staticTypeCheck(
49
                operand1, SequenceType.OPTIONAL_INTEGER, false, role1, visitor);
50
                operand1, SequenceType.OPTIONAL_INTEGER, backCompat, role1, visitor);
50 51

  
51 52
        return makeConstantRange();
52 53
    }

Also available in: Unified diff