<p>David, </p>
<p>It certainly is a bug: both expressions should cause an error. A variant of this was reported as a bug a few days ago, so the problem is known. </p>
<p>Thanks, </p>
<p>Wolfgang</p>
<div class="gmail_quote">Am 23.02.2012 03:05 schrieb "Birnbaum, David J" <<a href="mailto:djbpitt@pitt.edu">djbpitt@pitt.edu</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear x-query list,<br>
<br>
Using eXist 2.0-tech-preview-rev15878-20120213 (sandbox), I understand why:<br>
<br>
  let $all := collection('/db/twitter')//tweet<br>
  return $all[1 to 10]<br>
<br>
returns an error, since a numeric predicate isn't supposed to be a<br>
sequence of more than one atomic value. The error report is:<br>
<br>
  err:FORG0006: effectiveBooleanValue: first item of '(1, 2, 3, 4, 5, 6,<br>
7Š'<br>
  is not a node, and sequence length > 1<br>
<br>
What I don't understand is why the following *doesn't* return an error:<br>
<br>
  let $all := collection('/db/twitter')//tweet<br>
  let $range := 1 to 10<br>
  return $all[$range]<br>
<br>
When I run this second FLWOR, I retrieve my first ten tweets.<br>
<br>
What am I misunderstanding?<br>
<br>
Thanks,<br>
<br>
David<br>
<a href="mailto:djbpitt@gmail.com">djbpitt@gmail.com</a><br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk" target="_blank">http://x-query.com/mailman/listinfo/talk</a><br>
</blockquote></div>