Project

Profile

Help

Support #4809

open

How to use collections in Saxon-JS?

Added by Jerry Jackson about 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-10-26
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 a very simple stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
   <xsl:template name="xsl:initial-template">
      <xsl:apply-templates select="collection('file:/C:/temp/mydir')"/>
   </xsl:template>
</xsl:stylesheet>

When I run this with Saxon-JS on the command-line (xslt3 "-xsl:test.xsl"), I get this error:

Transformation failure: Error FODC0002 at test.xsl#4
    Unknown collection (no collectionFinder supplied)
Transformation failed: Error FODC0002 at test.xsl#4
    Unknown collection (no collectionFinder supplied)

I have tried to run it with the API, and reading the documentation I see I can supply a collectionFinder in the transform method, but i'm not sure on how to implement it to get the same result as when running it in Saxon-Java.

Please register to edit this issue

Also available in: Atom PDF Tracking page