Maintenance. Planio will be undergoing a scheduled maintenance this weekend. Between Saturday, July 24 at 9:00 UTC and Sunday, July 25, 22:00 UTC your account might observe occasional downtimes which may last up to several minutes in some cases.

Bug #4794

Output method saxon:base64Binary throws exception

Added by Jiri Dolejsi 9 months ago. Updated 9 months ago.

Saxon extensions
Start date:
Due date:
% Done:


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


.NET 4.7, SaxonEE 10.2 Exception - Saxon.Api.DynamicError: Cannot create user-supplied output method. Failed to load base64Binary

`using System; using Saxon.Api; using System.IO;

namespace TestSaxon { class Program { static Processor processor = new Processor(true);

    static String xslt =
    @"<xsl:transform version='3.0' xmlns:xsl='' xmlns:xs='' xmlns:saxon=''>" +
    @"<xsl:output method='saxon:base64Binary'/>" +
    @"<xsl:template name = 'xsl:initial-template'>" +
    @"SU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH" +
    @"4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==" +
    @"</xsl:text>" +
    @"</xsl:template>" +

    static void Main()

        XsltCompiler comp = processor.NewXsltCompiler();
        Xslt30Transformer transformer = comp.Compile(new StringReader(xslt)).Load30();
        Serializer ser = processor.NewSerializer();
        MemoryStream ms = new MemoryStream();
        transformer.CallTemplate(null, ser);
        var x = ms.ToArray();




#1 Updated by Michael Kay 9 months ago

  • Category set to Saxon extensions
  • Assignee set to O'Neil Delpratt

#2 Updated by Michael Kay 9 months ago

  • Status changed from New to In Progress
  • Assignee changed from O'Neil Delpratt to Michael Kay

I've added JUnit test TestSerializer/testBinarySerialization and I'm getting the same error on the Java platform.

#3 Updated by Michael Kay 9 months ago

At SerializerFactory#309 we're expecting the method name to be a Clark name {uri}local but it's actually an EQName (Q{uri}local).

Note that the constants in SaxonOutputKeys are Clark names.

I'm inclined to do some lazy programming here and accept either format.

#4 Updated by Michael Kay 9 months ago

  • Status changed from In Progress to Resolved
  • Applies to branch 10, trunk added
  • Fix Committed on Branch 10, trunk added


#5 Updated by O'Neil Delpratt 9 months ago

Bug fix applied in the Saxon 10.3 maintenance release

#6 Updated by O'Neil Delpratt 9 months ago

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

Please register to edit this issue

Also available in: Atom PDF