Project

Profile

Help

Bug #4137

XsltTransformer.transform() starting at xsl:initial-template

Added by Michael Kay almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2019-02-14
Due date:
% Done:

100%

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

Description

It appears from https://stackoverflow.com/questions/54638824/setting-string-parameter-using-saxon-he-9-9-fails/54640211?noredirect=1#comment96179154_54640211 that in Saxon 9.8 it was possible (despite the absence of anything in the Javadoc saying so) to run a transformation starting at xsl:initial-template by calling XsltTransformer.transform() with no previous call on setSource() or setInitialTemplate(); and that this no longer works in Saxon 9.9

History

#1 Updated by Michael Kay almost 3 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.9, trunk added
  • Fix Committed on Branch 9.9, trunk added

I have reinstated the 9.8 behaviour and added Javadoc comments to make it official, and I have added a unit test.

#2 Updated by Michael Kay almost 3 years ago

The change was found to cause some existing unit tests to fail, particularly in the case where both a source and an initial template name were supplied. The logic is now:

  1. if an initial template name is supplied, use call-template() on that template name, whether or not setSource() was called;
  2. otherwise, if setSource() was called, do an apply-templates() on that source
  3. otherwise (no initial template name and no source), attempt call-template() on xsl:initial-template.

#3 Updated by O'Neil Delpratt almost 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.2 added

Bug issue fixed in the Saxon 9.9.1.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF