Actions
Bug #4794
closedOutput method saxon:base64Binary throws exception
Start date:
2020-10-16
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:
Description
.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='http://www.w3.org/1999/XSL/Transform' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:saxon='http://saxon.sf.net/'>" +
@"<xsl:output method='saxon:base64Binary'/>" +
@"<xsl:template name = 'xsl:initial-template'>" +
@"<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAA" +
@"LEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBH" +
@"SU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH" +
@"4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==" +
@"</xsl:text>" +
@"</xsl:template>" +
@"</xsl:transform>";
static void Main()
{
XsltCompiler comp = processor.NewXsltCompiler();
Xslt30Transformer transformer = comp.Compile(new StringReader(xslt)).Load30();
Serializer ser = processor.NewSerializer();
MemoryStream ms = new MemoryStream();
ser.SetOutputStream(ms);
transformer.CallTemplate(null, ser);
var x = ms.ToArray();
}
}
}`
Updated by Michael Kay over 3 years ago
- Category set to Saxon extensions
- Assignee set to O'Neil Delpratt
Updated by Michael Kay over 3 years 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.
Updated by Michael Kay over 3 years 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.
Updated by Michael Kay over 3 years ago
- Status changed from In Progress to Resolved
- Applies to branch 10, trunk added
- Fix Committed on Branch 10, trunk added
Fixed.
Updated by O'Neil Delpratt over 3 years ago
Bug fix applied in the Saxon 10.3 maintenance release
Updated by O'Neil Delpratt over 3 years 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
Actions