Project

Profile

Help

Bug #2308

closed

NullPointerException using xsl:choose when streaming

Added by Michael Kay almost 10 years ago. Updated almost 9 years ago.

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

100%

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

Description

Originally raised here: http://sourceforge.net/p/saxon/support-requests/71/

Saxon-EE 9.6.0.4J

In XSLT 3.0 streaming mode, evaluating a tunnelled parameter in a boolean context (xsl:if) causes a null pointer exception. See attached stylesheet, which references 'test.xml' consisting of:

java -jar saxon9ee.jar -it:main -xsl:stylesheet.xsl -o:/dev/null

stack trace:

java.lang.NullPointerException

at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:449)

at net.sf.saxon.expr.Expression.effectiveBooleanValue(Expression.java:511)

at com.saxonica.ee.stream.adjunct.ChooseAdjunct$1.makeWatch(ChooseAdjunct.java:87)

at com.saxonica.ee.stream.Inversion.getWatch(Inversion.java:340)

at com.saxonica.ee.stream.TemplateInversion.getWatch(TemplateInversion.java:55)

at com.saxonica.ee.stream.watch.ApplyTemplatesAction.startSelectedParentNode(ApplyTemplatesAction.java:270)

at com.saxonica.ee.stream.watch.Trigger.startSelectedParentNode(Trigger.java:70)

at com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:215)

at net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)

at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:178)

at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)

at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)

at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)

at net.sf.saxon.event.Sender.send(Sender.java:146)

at net.sf.saxon.functions.DocumentFn.sendDoc(DocumentFn.java:821)

at net.sf.saxon.functions.Doc.sendDocument(Doc.java:271)

at com.saxonica.ee.stream.StreamingApplyTemplates.apply(StreamingApplyTemplates.java:82)

at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:247)

at net.sf.saxon.expr.instruct.Template.expand(Template.java:371)

at net.sf.saxon.Controller.transformDocument(Controller.java:2118)

at net.sf.saxon.Controller.transform(Controller.java:1704)

at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)

at net.sf.saxon.Transform.processFile(Transform.java:1056)

at net.sf.saxon.Transform.doTransform(Transform.java:659)

at net.sf.saxon.Transform.main(Transform.java:80)

Fatal error during transformation: java.lang.NullPointerException: (no message)


Files

stylesheet.xsl (529 Bytes) stylesheet.xsl Problem stylesheet Michael Kay, 2015-02-04 12:34

Please register to edit this issue

Also available in: Atom PDF