Project

Profile

Help

Bug #5134

closed

SaxonCS fails if the local culture of the machine is not en-GB (or similar)

Added by Mårten Sörliden over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Localization
Sprint/Milestone:
-
Start date:
2021-10-19
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11
Fix Committed on Branch:
trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

I have made a new .Net 5 solution in Visual Studio. Added Examples.cs, samples/data and samples/styles from saxon-resources-11 in project SaxonEE. Added NuGet package SaxonCS v11.0.1 to the project. Added a xUnit tests project to run all 48 examples. I have an evaluation license for Saxon-EE. Almost all examples result with errors deep inside Saxon. I get the same result if I run SaxonEE.exe in a Command Prompt. What's wrong?

44 of 48 examples result with System.TypeInitializationException:

E.g.: XdmNavigation

System.TypeInitializationException The type initializer for 'Saxon.Eej.functions.extfn.EXPathFileFunctionSet' threw an exception. at Saxon.Eej.functions.extfn.EXPathFileFunctionSet.getInstance() at Saxon.Eej.config.EnterpriseConfiguration.getBuiltInExtensionLibraryList() at Saxon.Hej.sxpath.AbstractStaticContext.setDefaultFunctionLibrary(Int32 version) at Saxon.Hej.sxpath.IndependentContext..ctor(Configuration config) at Saxon.Eej.config.ProfessionalConfiguration.getSystemFunction(StructuredQName name, Int32 arity) at Saxon.Api.Processor.GetSystemFunction(QName name, Int32 arity) at SaxonEE.XdmNavigation.run(Uri samplesDir) in C:\Git\SaxonCS\SaxonEE\Examples.cs:line 264 at Tests.UnitTests.ExampleTest(Int32 index) in C:\Git\SaxonCS\Tests\UnitTests.cs:line 129

System.FormatException Input string was not in a correct format. at Singulink.Numerics.BigDecimal.Parse(ReadOnlySpan`1 s, NumberStyles style, IFormatProvider formatProvider) at Saxon.Eej.functions.extfn.EXPathFileFunctionSet..cctor()

XPathSchemaAware result with System.FormatException:

System.FormatException Input string was not in a correct format. at Singulink.Numerics.BigDecimal.Parse(ReadOnlySpan`1 s, NumberStyles style, IFormatProvider formatProvider) at Saxon.Eej.ee.schema.sdoc.VersionControlFilter..ctor(SchemaCompiler compiler, Receiver next) at Saxon.Eej.ee.schema.sdoc.SchemaReader.buildSchemaDocument(Source source, SchemaCompiler compiler, PipelineConfiguration pipe, SchemaElement referrer) at Saxon.Eej.ee.schema.sdoc.SchemaReader.read(Source source, SchemaCompiler compiler, PipelineConfiguration pipe, SchemaElement referrer) at Saxon.Eej.config.EnterpriseConfiguration.addSchemaSource(Source schemaSource, ErrorReporter errorReporter, SchemaCompiler compiler) at Saxon.Eej.config.EnterpriseConfiguration.addSchemaSource(Source schemaSource, ErrorReporter errorReporter) at Saxon.Eej.ee.s9api.SchemaManagerImpl.load(Source source) at Saxon.Api.SchemaManager.Compile(Uri uri) at SaxonEE.XPathSchemaAware.run(Uri samplesDir) in C:\Git\SaxonCS\SaxonEE\Examples.cs:line 2204 at Tests.UnitTests.ExampleTest(Int32 index) in C:\Git\SaxonCS\Tests\UnitTests.cs:line 129

XsltDisplayingErrors, XsltCapturingErrors and Validate are successful.

Please register to edit this issue

Also available in: Atom PDF