Project

Profile

Help

Bug #5698

closed

Changes for system-property()

Added by Debbie Lockett about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
XSLT Conformance
Sprint/Milestone:
Start date:
2022-09-28
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Saxon 11.4 introduced changes to the results from system-property(), following the fix for Bug #4962: SEF compiled with Saxon-EE returns system-property('xsl:product-name') as SAXON. From Saxon 11.4, to get compile-time results you must use a static expression; otherwise the evaluation is always deferred until run-time. e.g. using a static variable:

<xsl:variable name="prodVer" select="system-property('xsl:product-version')" static="yes"/>

Previously (with Saxon 11.3 and earlier), if the expression could be evaluated at compile-time (e.g. if this variable was not static), then it was, so compile-time information was returned. To get run-time information it was necessary to use an expression which was only evaluated at run-time. As explained in the documentation (https://www.saxonica.com/saxon-js/documentation2/index.html#!conformance/xslt30):

Generally, if the argument to fn:system-property() is a string literal, or a constant expression, then it is evaluated at compile time, and it gives information (such as the product version number) that applies to the product used when compiling the stylesheet. To get information about the run-time environment, supply an argument that can only be computed at run-time, or use a dynamic function call.

We need to update the SaxonJS documentation to explain this change, and update our tests, etc. which use system-property().

Furthermore, we should consider adding more (saxon namespace) properties to return compile-time infomation about the target processor and compiler. Currently we have xsl:product-name and xsl:product-version: when XJ-compiling for JS, evaluated statically these return for instance "SAXON" and "JS 11.4". Note that xsl:product-version is made up of the target edition and compiler version number; but we don't get the compiler edition (EE). The property saxon:platform can also be used (with SaxonJS) to get run-time information about the platform ("Node.js" or "Browser").


Related issues

Related to Saxon - Feature #5709: Compiler and target processor information from fn:system-property()NewMichael Kay2022-10-04

Actions
Related to Saxon - Bug #4962: SEF compiled with Saxon-EE returns system-property('xsl:product-name') as SAXONClosedMichael Kay2021-04-05

Actions

Please register to edit this issue

Also available in: Atom PDF Tracking page