A case of superfluous type checking for parameters (p:with-param and xsl:param) ?

Hi,

Using XML Calabash, v1.0.2 (for Saxon 9.4.x). In my pipeline I have a
p:xslt step with
   <p:with-param name="scale" select="$scale"><p:empty/></p:with-param>
where $scale is a required option from the command line. The parameter
to be received in the XSLT is defined with
   <xsl:param name="scale" as="xs:decimal"/>
and this results in an error: "XPTY0004:Required item type of value of
variable $scale is xs:decimal; supplied value has item type
xs:string".

But when I invoke the XSLT from the command line directly, Saxon
converts the type with no problem and I would expect it to work the
same way in the pipeline. If I remember correctly this is not required
nor forbidden by the 2.0 specification (hopefully will be defined in
XSLT 3.0), but implemented in Saxon for some time now (certainly in
9.3 and 9.4).

Q1: Can Calabash drop this check?
Q2: The best workaround for the user?

Kind Regards,
Manfred

Received on Thursday, 16 February 2012 16:59:51 UTC