Project

Profile

Help

Bug #4689

closed

IllegalStateException when getting XdmNode after chaining transformation

Added by Frank Weenink over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Low
Category:
.NET API
Sprint/Milestone:
Start date:
2020-08-21
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 9.9, trunk
Fix Committed on Branch:
10, 9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

After updating the version of the nuget package Saxon-HE from 9.7.0.8 to 9.9.1.7 a chained transformation stopped working.

The code looks like this:

var t1 = e1.Load();

var t2 = e2.Load();

var t3 = e3.Load();

var dest = new XdmDestination();

t1.InitialContextNode = doc;

t2.Destination = t3;

t3.Destination = dest;

t1.Run(t2);

dest.XdmNode // throws java.lang.IllegalStateException: The document has not yet been built

Actions #1

Updated by Martin Honnen over 4 years ago

On the Java side of Saxon 9.9.1.7 your approach seems to work, with .NET I only get the chaining of three Xslt30Transformers (instead of XsltTransformers) to work:

            var t1 = e1.Load30();

            var t2 = e2.Load30();

            var t3 = e3.Load30();

            t1.GlobalContextItem = doc;

            t1.ApplyTemplates(doc, t2.AsDocumentDestination(t3.AsDocumentDestination(dest)));
Actions #2

Updated by Michael Kay over 4 years ago

  • Assignee set to O'Neil Delpratt
Actions #3

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from New to In Progress
  • Applies to branch 10, 9.9, trunk added

Sorry for the delay in picking this bug issue up. I have managed to reproduce the problem with the code snippet above. In 9.9 when we added the Xslt30Transformer class, which involved some code refactoring. It seems the code to for create the internal Documentbuilder in the XdmDestination class seems to have been broken.

Actions #4

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Fix Committed on Branch 10, 9.9, trunk added

Bug fixed in the XsltTransformer class where we now set the destination on the internal Java transformer class.

Actions #5

Updated by O'Neil Delpratt about 4 years ago

  • Fixed in Maintenance Release 9.9.1.8 added

Bug fix applied on the Saxon 9.9.1.8 maintenance release. Leaving open until applied on the Saxon 10 maintenance release.

Actions #6

Updated by O'Neil Delpratt about 4 years ago

Bug fix applied in the Saxon 10.3 maintenance release

Actions #7

Updated by O'Neil Delpratt about 4 years ago

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

Please register to edit this issue

Also available in: Atom PDF