assertion failure: "false && "nextImpl() called past iterator end"

Bug #1034942 reported by Markos Zaharioudakis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Markos Zaharioudakis

Bug Description

Triggered by the following query

import module namespace http = "http://www.zorba-xquery.com/modules/http-client";

declare function local:data-guide($x as element()) as element()
{
  local:collapse-nodes($x, 0)
};

declare function
local:collapse-nodes($x as node()*, $id as xs:integer) as node()*
{
  for $y in $x
  let $n := node-name($y)
  group by $n
  count $i
  return local:collapse-nodes-same-name($y, $id+$i)
};

declare function
local:collapse-nodes-same-name($x as node()+, $id as xs:integer) as node()
{
  let $f:= $x[1]
  let $n :=node-name($f)
  return
    if ($f instance of element())
    then
      element {$n} { local:collapse-nodes($x/@*, $id+1), $id+2, local:collapse-nodes($x/*, $id+3) }
   else
      attribute {$n} {$id}
};

local:data-guide(http:get("http://28william.s3.amazonaws.com/books.xml")[2]/*)

Changed in zorba:
status: New → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
milestone: none → 2.7
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.