Project

Profile

Help

Bug #4740

XSLT Transform Error - .Net Core 3.1

Added by Muralidharan S about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
High
Assignee:
-
Category:
.NET API
Sprint/Milestone:
Start date:
2020-09-19
Due date:
% Done:

0%

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

Description

Get Error in .Net core 3.1 - System.TypeInitializationException: 'The type initializer for 'sun.util.calendar.ZoneInfoFile' threw an exception'.

sample file added.

bib.xml (1.18 KB) bib.xml Muralidharan S, 2020-09-19 15:22
transform.xsl (395 Bytes) transform.xsl Muralidharan S, 2020-09-19 15:22

History

#1 Updated by Muralidharan S about 1 month ago

public static void TestTransform(string xsltFile, string inputFile, string outputFile) { TextWriter writer = null; var xslt = new FileInfo(xsltFile); var input = new FileInfo(inputFile); var output = new FileInfo(outputFile);

        // Compile stylesheet
        var processor = new Processor(false);
        var compiler = processor.NewXsltCompiler();
        var executable = compiler.Compile(new Uri(xslt.FullName));


        using (var inputStream = input.OpenRead())
        {
            var transformer = executable.Load();
            transformer.SetInputStream(inputStream, new Uri(input.DirectoryName));

            Serializer serializer = processor.NewSerializer(writer);
            transformer.Run(serializer);
        }


    }

#2 Updated by Michael Kay about 1 month ago

Sorry, but Saxon is not supported on .NET Core. This is a limitation of the IKVM technology that we use for porting Saxon from Java to .NET. We have been exploring various options that might provide a way forward on this, but we can't promise anything imminent.

#3 Updated by Vladimir Nesterovsky about 1 month ago

Did you consider wrapping Saxon into web front end and exposing it through REST API? This would expose Saxon to a number of technologies you do not support out of the box now. It would create new optimization opportunities like allowing sharing names through whole process, and avoiding jvm warmup.

Please register to edit this issue

Also available in: Atom PDF