Project

Profile

Help

Bug #6579

closed

In SEF file reference to extension function fails

Added by Joel Kalvesmaki 17 days ago. Updated 16 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
XSLT export
Sprint/Milestone:
-
Start date:
2024-11-07
Due date:
% Done:

0%

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

Description

I converted a simple XSLT file (attached) to an SEF file (attached) by Saxon-CS 11.5 on the command line. The XSLT has various references/uses of the file function library. When I run that SEF file, I get the following error message.

jkalvesmaki@LAPD08B4G3 MINGW64 /d/saxon/SaxonCS-11.5
$ ./SaxonCS transform -s:xslt-test.xsl -xsl:xslt-test.sef -o:output.xml         Error
  SXPK0002  Unknown system function Q{http://expath.org/ns/file}last-modified#1
Unknown system function Q{http://expath.org/ns/file}last-modified#1
Exiting with code 2

The error disappears when I comment out the last line of code in the XSLT file:

<xsl:comment>uris sorted {sort((base-uri(/), static-base-uri()), (), file:last-modified#1)}</xsl:comment>

So file:last-modified is okay when used directly (see lines 13, 15), but not in references.

It's unclear to me whether this is a bug, or actually a feature, because of the nature of function references. If the latter, I don't think there's much documentation to help programmers stay away from function references in code that will be deployed in SEF files. Perhaps provide a note at https://www.saxonica.com/documentation12/index.html#!using-xsl/compiling ?


Files

xslt-test.sef (4.33 KB) xslt-test.sef Source XSLT, compiled with Saxon-CE 11.5 Joel Kalvesmaki, 2024-11-07 02:53
xslt-test.xsl (1009 Bytes) xslt-test.xsl Source XSLT Joel Kalvesmaki, 2024-11-07 02:53

Please register to edit this issue

Also available in: Atom PDF