[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: passing a function as a parameter to transform()

Subject: Re: passing a function as a parameter to transform()
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2021 13:35:33 -0000
Re:  passing a function as a parameter to transform()
I can't see what's wrong at this stage, but that's probably because I'm not
sure exactly what your code looks like after a series of changes.

Clearly the "called" stylesheet isn't picking up the supplied value for the
parameter. I can't see why, but I would look carefully at the rather weird
namespace that it's using.

Michael Kay
Saxonica

> On 14 May 2021, at 14:28, Graydon graydon@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, May 14, 2021 at 01:05:31PM -0000, Michael Kay mike@xxxxxxxxxxxx
scripsit:
>> You're calling <xsl:sequence select="local:tiny('away')" />, but there is
no function named local:tiny in scope. What there is is a variable (parameter)
named local:tiny, whose value is a function. So you need a dynamic call on the
function held in the variable, not a static call on a function named
local:tiny(). That is, you need
>>
>> <xsl:sequence select="$local:tiny('away')" />
>
> I do, but that shifts the error to the xsl:param:
>
> <xsl:param as="function(xs:string) as text()" name="local:tiny" />
>
> give the error:
>
> A value must be supplied for parameter $local:tiny because there is no
default value for the required type
>
> As noted to Martin, sticking an anonymous function in the select appears
> to override the function being passed.  And would get really complicated
> if this was a real function, so I am still baffled.
>
> Static params -- $DEBUG -- allows setting "no" by default and having the
> passed value override it, so I'm surprised.
>
> --
> Graydon Saunders  | graydonish@xxxxxxxxx
> CC&s oferC)ode, C0isses swC! mC&g.
> -- Deor  ("That passed, so may this.")

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.