← Back to team overview

zorba-coders team mailing list archive

[Bug 867240] Re: assignment problem in flwor

 

** Changed in: zorba
       Status: Fix Released => Fix Committed

** Changed in: zorba
    Milestone: None => 2.1

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/867240

Title:
  assignment problem in flwor

Status in Zorba - The XQuery Processor:
  Fix Committed

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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/867240/+subscriptions