Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

5 Using key() on rhs of "/" - ID: 687946
Last Update: Settings changed ( mhkay )

Using the key() function (or other functions that
depend on the context document, for example id(),
unparsed-entity-uri()) on the right hand side of the
"/" operator in a path expression causes a failure when
lazy evaluation of the expression is attempted. The
failure is:

java.lang.IllegalStateException: Expression still has
dependencies (64) after reduction
at
net.sf.saxon.expr.Expression.lazyEvaluate(Expression.java:152)

Lazy evaluation occurs in a number of situations, for
example when the expression is used in the xsl:result
of a stylesheet function.

Reported by Katarzyna Marszalek [km@toya.net.pl]

Test case added: idky31

Source code fixed. The following change fixes this
problem, though it has not been fully regression tested.

At line 271 of net.sf.saxon.expr.PathExpression, change

(Dependency.XSLT_CONTEXT | Dependency.CONTEXT_DOCUMENT)

to

(Dependency.XSLT_CONTEXT)

Michael Kay


Michael Kay ( mhkay ) - 2003-02-17 12:27

5

Closed

Fixed

Michael Kay

XSLT conformance

v7.4

Public


Comments

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
resolution_id None 2003-06-27 18:58 mhkay
summary Using key() on rhs of "/" 2003-06-27 18:58 mhkay
close_date - 2003-06-27 18:58 mhkay
status_id Open 2003-06-27 18:58 mhkay