Project

Profile

Help

Bug #4740

closed

XSLT Transform Error - .Net Core 3.1

Added by Muralidharan S about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
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:
Platforms:

Description

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

sample file added.


Files

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
Actions #1

Updated by Muralidharan S about 4 years 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);
        }


    }
Actions #2

Updated by Michael Kay about 4 years 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.

Actions #3

Updated by Vladimir Nesterovsky about 4 years 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.

Actions #4

Updated by Michael Kay over 3 years ago

  • Status changed from New to Closed
  • Priority changed from High to Normal

Closing this. Saxon for .NET is not supported on .NET Core, due to IKVM limitations. We have a new product under development to fill this gap, see https://dev.saxonica.com/blog/mike/2021/03/saxon_cs_hello_world.html -- but of course we can offer no dates and no commitments.

Please register to edit this issue

Also available in: Atom PDF