W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2012

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

From: Manfred Staudinger <manfred.staudinger@gmail.com>
Date: Thu, 16 Feb 2012 17:59:24 +0100
Message-ID: <CAA-wEZQUJ6hM3ofmLLe7jSfuosVNhOS6i1yzEZfNtCdxH6OHKA@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 16 February 2012 16:59:51 GMT