Project

Profile

Help

Bug #4914

open

Parameters supplied in SaxonJS.transform options not converted correctly for typed array required types

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

Status:
New
Priority:
High
Category:
-
Sprint/Milestone:
Start date:
2021-02-18
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

Using the stylesheetParams option for SaxonJS.transform, strong conversion (as documented at https://www.saxonica.com/saxon-js/documentation/index.html#!xdm/conversions) for a stylesheet parameter with a typed array required type (i.e. which specifies the types of the array members), e.g. array(xs:string) or array(xs:integer), does not work correctly.

For instance supplying:

"stylesheetParams": {"arrayStr": [["a","b","c"]]}

For the stylesheet parameter:

<xsl:param name="arrayStr" select="['x','y']" as="array(xs:string)"/>

Results in the error:

"Supplied value [xs:untypedAtomic('a'),xs:untypedAtomic('b'),xs:untypedAtomic('c')] does not match required type array(xs:string) in stylesheet parameter Q{}arrayStr"

It appears that the function conversion rules have not been applied to the array members, so they have not been cast to the required type.

Please register to edit this issue

Also available in: Atom PDF Tracking page