Project

Profile

Help

Bug #5916

open

Using xsl:merge with xsl:merge-source for-each-source="'input1.xml'" select="some-xpath" gives error XPDY0002 "Focus for / is absent"

Added by Martin Honnen over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
XSLT Conformance
Sprint/Milestone:
Start date:
2023-03-12
Due date:
% Done:

0%

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

Description

I have tried to run an XSLT 3 example using XSLT 3's new xsl:merge through SaxonJS 2.5's xslt3 command line tool under Windows 11 with Node 16, a simple example using e.g.

  <xsl:template name="xsl:initial-template">
      <list>
         <xsl:merge>
            <xsl:merge-source name="master" for-each-source="'input1.xml'" sort-before-merge="yes" select="/list/item">
               <xsl:merge-key select="@id" order="ascending"/>
            </xsl:merge-source>

gives an error

Transformation failure: Error XPDY0002 at sheet1.xsl#7
  Focus for / is absent
Error XPDY0002 at sheet1.xsl#7
  Focus for / is absent

The code runs fine through Saxon HE 11.5 Java.

Full files attached; command line xslt3 -t -it -xsl:sheet1.xsl gives output

SaxonJS 2.5 from Saxonica
Node.js version v16.17.1
Compiling stylesheet C:\Users\marti\OneDrive\Documents\xslt\blog-xslt-3-by-example\nested-merge\sheet1.xsl
Stylesheet compilation time: 0.342s
Initial template: Q{http://www.w3.org/1999/XSL/Transform}initial-template
Asynchronous transform with options: stylesheetText={"N":"package","version":"30",(string), stylesheetBaseURI=file://C:/Users/marti/OneDrive(string), stylesheetParams=[object Object](string), outputProperties=[object Object](string), extraOptions=[object Object](string), destination=stdout(string), baseOutputURI=file://C:/Users/marti/OneDrive(string), logLevel=2(string), initialTemplate=Q{http://www.w3.org/1999/XSL/T(string),
SEF generated by SaxonJS 2.5 at 2023-03-12T13:32:13.485+01:00
Transformation failure: Error XPDY0002 at sheet1.xsl#7
  Focus for / is absent
Error XPDY0002 at sheet1.xsl#7
  Focus for / is absent

Files

input1.xml (269 Bytes) input1.xml Martin Honnen, 2023-03-12 13:39
input2.xml (225 Bytes) input2.xml Martin Honnen, 2023-03-12 13:39
sheet1.xsl (3.18 KB) sheet1.xsl Martin Honnen, 2023-03-12 13:39
signature.asc (833 Bytes) signature.asc John Lumley, 2023-03-12 19:27

Please register to edit this issue

Also available in: Atom PDF Tracking page