Sorry for the delay in responding to this one.

It is logged here:

https://saxonica.plan.io/issues/2031

and fixed.

Michael Kay
Saxonica

On 26 Feb 2014, at 11:00, Rademacher, Gunther <Gunther.Rademacher@softwareag.com> wrote:

This is not something where I am stuck, but while writing a query to peek at the first result
from a large document, I saw an NPE being thrown from this one:
 
let $x := saxon:stream(doc('uri')/*/*)[1] return $x
 
It works fine when inlining $x. The stack trace is shown below.
 
Best regards
Gunther
 
java.lang.NullPointerException
        at com.saxonica.stream.StreamingCopy.iterate(StreamingCopy.java:303)
        at CE_main_1693202348.iterate(Unknown Source)
        at com.saxonica.bytecode.CompiledExpression.iterate(CompiledExpression.java:169)
        at net.sf.saxon.query.XQueryExpression.iterator(XQueryExpression.java:346)
        at net.sf.saxon.s9api.XQueryEvaluator.iterator(XQueryEvaluator.java:426)
 

Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Dr. Wolfram Jost, Arnd Zinnhardt; - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Andreas Bereczky -http://www.softwareag.com
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help