Project

Profile

Help

Bug #2483

closed

jt:java.lang.NullPointerException: Exception thrown by extension function typeAnnotation

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

Status:
Closed
Priority:
Normal
Category:
Schema-Aware processing
Sprint/Milestone:
Start date:
2015-10-23
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

Bug initially reported by Rik Smithies:

I have XSLT code that uses the saxon:type extension, to get the schema aware type of an element, and put that as a comment into the output.

It works in Oxygen 17, which has Saxon built in. But when I tried it in the java and .net command line versions of Saxon, I had some issues.

The exception thrown in Saxon 9.6:

Error on line 17 of saxontest.xsl:
  jt:java.lang.NullPointerException: Exception thrown by extension function {public static
  net.sf.saxon.om.ZeroOrOne
  com.saxonica.functions.extfn.Extensions.typeAnnotation(net.sf.saxon.expr.XPathContext,net.sf.saxon.om.ZeroOrOne)}: java.lang.NullPointerException
  in built-in template rule
Exception thrown by extension function {public static net.sf.saxon.om.ZeroOrOne com.saxonica.functions.extfn.Extensions.typeAnnotation(net.sf.saxon.expr.XPathContext,net.sf.saxon.om.ZeroOrOne)}: java.lang.NullPointerException

In Saxon 9.5 we get the following exception:

Error on line 17 of saxontest.xsl:
  jt:java.lang.NullPointerException: Exception thrown by extension function {public static
  net.sf.saxon.value.QNameValue
  com.saxonica.functions.extfn.Extensions.typeAnnotation(net.sf.saxon.expr.XPathContext,net.sf.saxon.om.Item)}: java.lang.NullPointerException
Transformation failed: Run-time errors were reported
Actions #1

Updated by O'Neil Delpratt over 8 years ago

  • Description updated (diff)
Actions #2

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from New to Resolved
  • Assignee set to O'Neil Delpratt
  • Found in version changed from 9.6 to 9.5 9.6

Patch made in the Extensions class where we get the prefix of the type annotation. We now handle the null case.

Bug fix applied to the 9.5, 9.6 and 9.7 branches.

Actions #3

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Bug fix applied to the Saxon 9.6.0.8 maintenance release.

I assume that this will not get fixed on the 9.5 therefore I am closing this bug issue.

Actions #4

Updated by O'Neil Delpratt over 8 years ago

  • Fixed in version set to 9.6.0.8
Actions #5

Updated by O'Neil Delpratt over 8 years ago

  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.8 added
Actions #6

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone set to 9.6.0.8

Please register to edit this issue

Also available in: Atom PDF