Actions
Bug #5648
closedSaxonCS with command line -ea:on triggers xs:assert but doesn't output the message inside
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Command Line
Sprint/Milestone:
-
Start date:
2022-08-17
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
11
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
.NET
Description
Perhaps this is related to the existing problem with xsl:message of SaxonCS but I am not sure, I find that the content of a triggered xsl:assert
in SaxonCS is not output, contrary to what SaxonJ does.
So
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:param name="input" as="xs:string" select="'abc'"/>
<xsl:template match="/" name="xsl:initial-template">
<xsl:comment>Run with {system-property('xsl:product-name')} {system-property('xsl:product-version')} {system-property('Q{http://saxon.sf.net/}platform')}</xsl:comment>
<xsl:assert test="$input castable as xs:integer">{$input} should be an integer</xsl:assert>
<int>{$input}</int>
</xsl:template>
<xsl:output indent="yes"/>
</xsl:stylesheet>
with options -it -ea:on -xsl:.\assert-test1.xsl
with CS gives only
Error at xsl:assert on line 12 column 6 of assert-test1.xsl:
XTMM9001 Processing terminated by xsl:assert at line 12 in assert-test1.xsl
at template xsl:initial-template on line 10 column 4 of assert-test1.xsl:
Processing terminated by xsl:assert at line 12 in assert-test1.xsl
Exiting with code 2
while SaxonJ outputs
abc should be an integer
Error at xsl:assert on line 12 column 54 of assert-test1.xsl:
XTMM9001 Processing terminated by xsl:assert at line 12 in assert-test1.xsl
at template xsl:initial-template on line 10 column 55 of assert-test1.xsl:
Processing terminated by xsl:assert at line 12 in assert-test1.xsl
Tested with 11.4 under Windows.
Related issues
Please register to edit this issue
Actions