Project

Profile

Help

Bug #3270

closed

NullPointerException with missing xsl:namespace-alias/@stylesheet-prefix

Added by Gerben Abbink almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2017-06-13
Due date:
% Done:

100%

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

Description

I get a NullPointerException when running this test file:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:myxsl="http://www.myxsl.com">

<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

<xsl:namespace-alias result-prefix="xsl"/>

</xsl:stylesheet>

Here is the stack dump:

net.sf.saxon.style.PrincipalStylesheetModule.collectNamespaceAliases(PrincipalStylesheetModule.java:1061)

net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:379)

net.sf.saxon.style.Compilation.compilePackage(Compilation.java:224)

net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)

net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:101)

net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:858)

XMLBlueprintS9APIXSLTProcessor.transform(XMLBlueprintS9APIXSLTProcessor.java:39)

I am using SaxonHE9-7-0-18J

Actions #1

Updated by Michael Kay almost 7 years ago

  • Subject changed from another NullPointerException to NullPointerException with missing xsl:namespace-alias/@stylesheet-prefix
  • Category set to Diagnostics
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
Actions #2

Updated by Michael Kay almost 7 years ago

I added this as W3C test-case namespace-alias-1906, and also added the counterpart in which @result-prefix is omitted as namespace-alias-1907.

Actions #3

Updated by Michael Kay almost 7 years ago

  • Status changed from New to In Progress
  • Applies to branch 9.7, 9.8, trunk added
  • Fix Committed on Branch 9.7, 9.8, trunk added

Fixed in XSLNamespaceAlias.prepareAttributes() by allocating dummy values to stylesheetPrefix and resultPrefix if the attributes are absent, so the recovery path does not crash.

Patch committed on 9.7 branch, commit for 9.8 is pending repository build.

Actions #4

Updated by Michael Kay almost 7 years ago

  • Status changed from In Progress to Resolved
  • Applies to branch deleted (trunk)
  • Fix Committed on Branch deleted (trunk)

Fix now committed on 9.8 branch also.

Actions #5

Updated by O'Neil Delpratt almost 7 years ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.8.0.2 added

Patch applied in the Saxon 9.8.0.2 maintenance release. Leaving bug issue marked as resolved until applied in the next Saxon 9.7 maintenance release.

Actions #6

Updated by O'Neil Delpratt almost 7 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.7.0.19 added

Bug fix applied in the 9.7.0.19 maintenance release.

Please register to edit this issue

Also available in: Atom PDF