Actions
Bug #4727
closedNPE on bogus version number
Start date:
2020-09-09
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:
Description
Consider this stylesheet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://example.com/templates"
exclude-result-prefixes="#all"
version="3.0">
<xsl:output omit-xml-declaration="yes"/>
<xsl:use-package name="http://example.com/funcsynopsis"
package-version="'2.0.5'"/>
<xsl:template match="funcsynopsis">
<xsl:call-template name="t:funcsynopsis"/>
</xsl:template>
</xsl:stylesheet>
It produces:
Error at xsl:use-package on line 11 column 45 of pcustom.xsl:
XTSE0020 Error in package-version: For input string: "'2"
java.lang.NullPointerException
at net.sf.saxon.trans.packages.PackageLibrary.findPackage(PackageLibrary.java:183)
at net.sf.saxon.style.XSLUsePackage.findUsedPackage(XSLUsePackage.java:49)
at net.sf.saxon.style.PrincipalStylesheetModule.gatherOverridingDeclarations(PrincipalStylesheetModule.java:531)
at net.sf.saxon.style.PrincipalStylesheetModule.spliceUsePackages(PrincipalStylesheetModule.java:493)
at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:330)
at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:288)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:254)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:113)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:838)
at net.sf.saxon.Transform.doTransform(Transform.java:753)
at net.sf.saxon.Transform.main(Transform.java:82)
Fatal error during transformation: java.lang.NullPointerException: (no message)
Please register to edit this issue
Actions