Actions
Bug #5264
closedUse of fn:highest in XSLT 4 with SaxonCS 11.1 gives error Failed to load built-in function library: function-library.sef.xml
Start date:
2022-02-02
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:
.NET
Description
This is a follow-up to the closed https://saxonica.plan.io/issues/5122, I have now tried to use fn:highest
with the latest SaxonCS 11.1 on Windows but an attempt to use that function in XSLT 4 fails with Saxon.Api.SaxonApiException, Failed to load built-in function library: function-library.sef.xml
.
Saxon.Api.SaxonApiException
HResult=0x80131500
Nachricht = Failed to load built-in function library: function-library.sef.xml
Quelle = SaxonCS
Stapelüberwachung:
at Saxon.Hej.s9api.Xslt30Transformer.callTemplate(QName templateName, Destination destination)
at Saxon.Api.Xslt30Transformer.CallTemplate(QName templateName, IDestination destination)
at SaxonCSRunXSLT4.Program.Main(String[] args) in C:\Users\marti\source\repos\SaxonCSRunXSLT4\SaxonCSRunXSLT4\Program.cs:line 37
C# test code
using System;
using System.IO;
using Saxon.Api;
namespace SaxonCSRunXSLT4
{
class Program
{
static void Main(string[] args)
{
var processor = new Processor();
//processor.SetProperty<bool>(Feature<bool>.TIMING, true);
var xsltCompiler = processor.NewXsltCompiler();
xsltCompiler.XsltLanguageVersion = "4.0";
XsltExecutable xsltExecutable;
using (var fs = File.OpenRead(args[0]))
{
xsltExecutable = xsltCompiler.Compile(fs);
}
Xslt30Transformer xslt40Transformer = xsltExecutable.Load30();
if (args.Length == 2)
{
using (var fs = File.OpenRead(args[1]))
{
xslt40Transformer.ApplyTemplates(fs, processor.NewSerializer(Console.Out));
}
}
else
{
xslt40Transformer.CallTemplate(null, processor.NewSerializer(Console.Out));
}
Console.WriteLine();
}
}
}
runs file highest-function-test1.xsl
:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="4.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:output method="adaptive" indent="yes" build-tree="no"/>
<xsl:template match="/" name="xsl:initial-template">
<xsl:sequence select="highest((1, 2, 3, 3, 2, 1))"/>
</xsl:template>
</xsl:stylesheet>
Updated by Norm Tovey-Walsh almost 3 years ago
- Status changed from New to In Progress
Updated by Norm Tovey-Walsh almost 3 years ago
- Status changed from In Progress to Resolved
The build has been amended to embed the SEF file in the DLL. The implementation of DotNetPlatform.locateResource()
has been updated to correctly handle the distinction between "/" in the call and "\" used as the separator on Windows.
Updated by Norm Tovey-Walsh almost 3 years ago
- Status changed from Resolved to Closed
- Applies to branch trunk added
- Fix Committed on Branch 11, trunk added
- Fixed in Maintenance Release 11.2 added
Please register to edit this issue
Actions