Project

Profile

Help

Bug #2634

closed

XQuery using saxon:stream fails when falling back to non-streaming and byte code generation is in effect

Added by Gunther Rademacher almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Streaming
Sprint/Milestone:
-
Start date:
2016-02-22
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

This had already been reported in Bug #2550, but I may have failed to make clear that for this one I am interested in saxon:stream's fallback to non-streaming mode, rather than getting it streaming. Later I got the impression that fallback might not be supported any more.

The query is

for $x in saxon:stream(doc('uriresolver:resolve')/*/*/element {node-name()} {node()}) return $x

and I am fine with no streaming being achievable for it. Rather I'd like to see it falling back to non-streaming.

This works with optimzation levels 1-9, and also with 10 when GENERATE_BYTE_CODE is turned off. However when turned on, it comes up with this exception:

net.sf.saxon.trans.XPathException: No watch found for xsl:element
	at com.saxonica.ee.bytecode.util.Callback.makeXPathException(Callback.java:143)
	at gen_SlashContextMappingFunction_1.map(Unknown Source)
	at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61)
	at net.sf.saxon.query.XQueryExpression$ErrorReportingIterator.next(XQueryExpression.java:836)
	at net.sf.saxon.s9api.XdmSequenceIterator.hasNext(XdmSequenceIterator.java:57)

A stack trace, and a complete test case is attached.


Files

TestSaxonStreamFallback.java (2.16 KB) TestSaxonStreamFallback.java TestNG test reproducing "No watch found for xsl:element" Gunther Rademacher, 2016-02-22 14:49
stacktrace.txt (2.28 KB) stacktrace.txt stack trace Gunther Rademacher, 2016-02-22 14:51

Please register to edit this issue

Also available in: Atom PDF