Bug #5008


SaxonJS: Import XSLT2 from XSLT2 error

Added by Daniel Naab almost 3 years ago. Updated over 2 years ago.

XX compiler
Start date:
Due date:
% Done:


Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Alexander Stein - QN-C
Contact person:
Alexander Stein - QN-C
Additional contact persons:


With SaxonJS 2.2.0, given XSL v1, that imports v2, the following error is received:

Transformation failure: Error SESU0013 Serializer does not support the requested XML version: 2.0

This same set of files may be processed without error using Saxon-HE. Note: this error was encountered with the Schematron pipeline implemented here:

For a minimal reproduction, see here:

The details in the repro are below, for reference:

npx xslt3 -s:./source.sch -xsl:transform.xsl -o:./output.xsl


<?xml version="1.0" encoding="UTF-8"?>
    <sch:schema xmlns:sch="" queryBinding="xslt2">



<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
    <xsl:import href="import.xsl" />


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="" version="2.0">
    <xsl:output />
Actions #1

Updated by Debbie Lockett almost 3 years ago

  • Category set to XX compiler
  • Status changed from New to In Progress
  • Applies to JS Branch 2 added

Thanks for reporting the bug, and supplying the repro. I have reproduced the problem, and can confirm that this is a XX compiler issue.

Test (J-08) added to the xslt3_test.js mocha test set.

Actions #7

Updated by Debbie Lockett almost 3 years ago

  • Status changed from In Progress to Resolved
  • Fix Committed on JS Branch 2 added

Fix committed in XX compiler. In static.xsl line 996, add xsl:output to the list of excluded elements when $stylesheet-properties is copied to a child of xsl:stylesheet.

Actions #8

Updated by Alexander Stein over 2 years ago , visible to Alexander Stein - QN-C ( from Alexander Stein - QN-C

  • Company set to Alexander Stein - QN-C
  • Contact person set to Alexander Stein - QN-C


Can you please give a status update and indicate:

  1. When will this be part of a release of SaxonJS to npmjs?
  2. Do you offer alpha or beta releases of fixes in the SaxonJS library?
    We would like to help confirm the bug is fixed before having to re-open or
    create another issue if that is avoidable.

Thanks in advance for your help and cooperation.

Actions #9

Updated by Debbie Lockett over 2 years ago

Hi Alexander, answering the question of when the next release will be out is always a hard one. But understanding the importance of this bug fix to you certainly influences our plans. Clearly it would be useful for us to put out a new bug fixing maintenance release as soon as possible. As long as nothing unexpected crops up, hopefully we can get a maintenance release out in August.

Actions #10

Updated by Debbie Lockett over 2 years ago

  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 2.3

Bug fix applied in the Saxon-JS 2.3 maintenance release.

Actions #11

Updated by Debbie Lockett over 2 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF Tracking page