assignment problem in flwor

Bug #867240 reported by David Graf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
David Graf

Bug Description

Zorba seems to have problem s with assignments in the flwor expression.

Example:

variable $mode := "option";
for $i in (1,2,3,4)
return
       switch ($mode)
               case "option" return {
                       fn:trace($mode, "option mode");
                       $mode := "value";
               }
               case "value" return {
                       fn:trace($mode, "value mode");
                       $mode := "option";
               }
               default return "default";

Expected output:

<?xml version="1.0" encoding="UTF-8"?>
option mode [0]: xs:string(option)
value mode [0]: xs:string(value)
option mode [0]: xs:string(option)
value mode [0]: xs:string(value)

Result:

<?xml version="1.0" encoding="UTF-8"?>
option mode [0]: xs:string(option)
option mode [0]: xs:string(value)
option mode [0]: xs:string(value)
option mode [0]: xs:string(value)

Tags: core-runtime
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

fix commit in trunk rev. #11992

Revision history for this message
David Graf (davidagraf) wrote :

It works!

Changed in zorba:
status: Fix Released → Fix Committed
milestone: none → 2.1
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.