Project

Profile

Help

Bug #2378

closed

NullPointerException using saxon:next-in-chain via JAXP interfaces

Added by Michael Kay almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
2015-05-13
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

When a stylesheet containing saxon:next-in-chain is executed using the JAXP TransformerFactory interface, a NullPointerException occurs in SerializerFactoryPE.prepareNextStylesheet), because the PipelineConfiguration that is passed has a null Controller.

Actions #1

Updated by Michael Kay almost 9 years ago

  • Status changed from New to Resolved

Solution (a bit of a hack...) is to create method Serializer.getReceiver(PipelineConfiguration) and call this instead of Serializer.getReceiver(Configuration) from XsltTransformer.getDestinationReceiver(), supplying a PipelineConfiguration that knows about the Controller for the first stylesheet.

Patch committed for 9.6 and 9.7. Only tested for this one case currently.

Actions #2

Updated by O'Neil Delpratt almost 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.6

Bug fix applied in the Saxon 9.6.0.6 maintenance release.

Actions #3

Updated by Michael Kay almost 9 years ago

  • Status changed from Closed to In Progress

Reopened. The patch solved the NullPointerException and allowed the test to run successfully, but the results are wrong.

Actions #4

Updated by Michael Kay almost 9 years ago

What was happening was that the serialization properties for the first transformation, including the saxon:next-in-chain property, were being used for the second transformation as well. This was causing a pipeline of three transformations instead of two (A B B rather than A B), so the second stylesheet was applied twice. The solution is to adjust the way serialization properties are set on the second transformation.

Actions #5

Updated by Michael Kay almost 9 years ago

  • Status changed from In Progress to Resolved

Committed a new patch for 9.6 and 9.7 which ignores the saxon:next-in-chain option if set on a s9api Serializer.

Actions #6

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from Resolved to Closed
  • Fixed in version changed from 9.6.0.6 to 9.6.0.7

Bug fix applied in the Saxon 9.6.0.7 maintenance release.

Actions #7

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.7 added
Actions #8

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone set to 9.6.0.7

Please register to edit this issue

Also available in: Atom PDF