The symptom is the crash:
java.lang.IllegalStateException: evaluateItem called on
non-singleton variable reference at
net.sf.saxon.expr.VariableReference.evaluateItem(VariableReference.java:202
)
at
net.sf.saxon.expr.Expression.lazyEvaluate(Expression.java:161)
at
net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:45)
This occurs when the Saxon optimizer rewrites an
expression that includes a filter containing a
subexpression whose value is independent of the
context, and is potentially multi-valued, for example
$a[xyz = $nnn/@a]
where $nnn can return more than one item.
Occurs with Saxon 7.4 only.
Reported by Steve Muench.
A circumvention is to make the subexpression appear to
depend on the context, by changing it to:
$a[xyz = ./$nnn/@a]
Source code fixed - add the following method to
net.sf.saxon.expr.LetExpression.java:
public RequiredType getRequiredType() {
return new RequiredType(sequence.getItemType(),
Type.ANY_ITEM, Cardinality.ZERO_OR_MORE);
}
Original repro is in users/muench/saxonbug, not yet
added to regression test suite.
Michael Kay
XPath conformance
v7.4
Public
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2003-06-27 18:58 | mhkay |
| resolution_id | None | 2003-06-27 18:58 | mhkay |
| close_date | - | 2003-06-27 18:58 | mhkay |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use