Bug #4689

IllegalStateException when getting XdmNode after chaining transformation

Added by Frank Weenink about 1 year ago. Updated 11 months ago.

Start date:
Due date:
% Done:


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


After updating the version of the nuget package Saxon-HE from to 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;


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


#1 Updated by Martin Honnen about 1 year ago

On the Java side of Saxon 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)));

#2 Updated by Michael Kay about 1 year ago

  • Assignee set to O'Neil Delpratt

#3 Updated by O'Neil Delpratt about 1 year 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.

#4 Updated by O'Neil Delpratt about 1 year 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.

#5 Updated by O'Neil Delpratt 11 months ago

  • Fixed in Maintenance Release added

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

#6 Updated by O'Neil Delpratt 11 months ago

Bug fix applied in the Saxon 10.3 maintenance release

#7 Updated by O'Neil Delpratt 11 months 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