Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

5 NullPtrException evaluating variable used in attribute - ID: 799095
Last Update: Settings changed ( mhkay )

in XQuery, a Null Pointer Exception occurs evaluating a
variable reference within an attribute of a direct
element constructor (<e att="{$var}"/>) if the variable
has been "promoted" during expression evaluation; that
is, if the variable is initialized using a let
expression that has been moved outside a containing for
expression because it does not depend on the iterand of
the for expression.

Test case: users/campesato/checkerboard

Source code fixed. The fix is to add the lines

if (valueExpression != null) {
valueExpression =
valueExpression.promote(offer);
}

to the promoteInst() method of
net.sf.saxon.instruct.Attribute. Similar changes are
needed for Comment and ProcessingInstruction.

MK


Michael Kay ( mhkay ) - 2003-09-02 12:01

5

Closed

Fixed

Michael Kay

XQuery conformance

v7.6.5

Public


Comments

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2003-10-06 16:08 mhkay
resolution_id None 2003-10-06 16:08 mhkay
close_date - 2003-10-06 16:08 mhkay
artifact_group_id None 2003-09-02 12:03 mhkay