Project

Profile

Help

Bug #5198

NodeJS run from command-line with '-it:main' arg results in error when using specific XSLT

Added by Philip Fearon 20 days ago. Updated 16 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2022-01-08
Due date:
% Done:

0%

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

Description

This fails with SaxonJS 2.3 but the same XSLT runs OK using the Java version of Saxon. Here is the SaxonJS standard output:

Saxon-JS
2.3

    ==== Watch Variables ====
      doc:     books
    
Transformation failure: TypeError: Cannot read properties of undefined (reading 'Ib')
Cannot read properties of undefined (reading 'Ib')
The terminal process "npx 'xslt3', '-xsl:/Users/philipf/video-demos/init-template/test.xsl', '-it:main', '-o:/Users/philipf/video-demos/init-template/xslt-out/result1.xml'" terminated with exit code: 2.

The input file 'input.xsl' and the stylesheet file 'test.xsl' are attached. The actual command-liine used is in the error message above.

I'm guessing that the xsl:for-each instruction in test.xsl is not setting the context item required by xsl:copy as one would expect.

test.xsl (1.18 KB) test.xsl stylesheet Philip Fearon, 2022-01-08 11:29
input.xml (64 Bytes) input.xml xml source Philip Fearon, 2022-01-08 11:29

History

#1 Updated by Martin Honnen 16 days ago

I think it is the mode="#current" that lets Saxon-JS struggle, use no mode attribute on the apply-templates or mode="#default" as a workaround.

Please register to edit this issue

Also available in: Atom PDF Tracking page