Project

Profile

Help

Bug #2416

closed

NPE with expand-text and empty text element

Added by O'Neil Delpratt almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Internals
Sprint/Milestone:
Start date:
2015-07-15
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

The following stylsheet throws a Null pointer exception. Reported by Patrik Stellmann:

<xsl:stylesheet xmlns:xsl        = "http://www.w3.org/1999/XSL/Transform"
       version="3.0" expand-text="yes">
       <xsl:template match="/">
               <xsl:text/>
       </xsl:template>
</xsl:stylesheet>

Exception thrown:

java.lang.NullPointerException
	at com.saxonica.config.pe.StyleNodeFactoryPE.compileContentValueTemplate(StyleNodeFactoryPE.java:315)
	at net.sf.saxon.style.XSLText.compile(XSLText.java:101)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:1833)
	at net.sf.saxon.style.XSLTemplate.compileDeclaration(XSLTemplate.java:447)
	at net.sf.saxon.style.StylesheetPackage.compile(StylesheetPackage.java:1055)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:201)
	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:94)
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:543)
	at net.sf.saxon.Transform.doTransform(Transform.java:601)
	at net.sf.saxon.Transform.main(Transform.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Fatal error during transformation: java.lang.NullPointerException:  (no message)

Please register to edit this issue

Also available in: Atom PDF