Project

Profile

Help

Bug #4045

closed

Null pointer exception when compiling stylesheet with template containing specific XSLT instructions

Added by Philip Fearon over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2018-11-21
Due date:
% Done:

100%

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

Description

Using Saxon 9.9.0.2 professional (java), the attached saxon9902issue.xsl stylesheet fails to compile, producing the following stack trace. With Saxon 9.9.0.1, no exception is thrown.

java.lang.NullPointerException
	at net.sf.saxon.expr.Expression.getRetainedStaticContext(Expression.java:461)
	at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:50)
	at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1216)
	at net.sf.saxon.style.XSLTemplate.optimize(XSLTemplate.java:1054)
	at net.sf.saxon.style.PrincipalStylesheetModule.optimizeTopLevel(PrincipalStylesheetModule.java:1446)
	at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1267)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:329)
	at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:258)
	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:107)
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:778)
	at net.sf.saxon.Transform.doTransform(Transform.java:730)
	at net.sf.saxon.Transform.main(Transform.java:80)
Fatal error during transformation: java.lang.NullPointerException:  (no message)

This issue can be reproduced using both the command-line interface or the Java API


Files

saxon9902issue.xsl (1006 Bytes) saxon9902issue.xsl Philip Fearon, 2018-11-21 14:05

Please register to edit this issue

Also available in: Atom PDF