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

Aw: Re:  Re: passing a function as a parameter to tra

Subject: Aw: Re:  Re: passing a function as a parameter to transform()
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2021 13:30:34 -0000
Aw: Re:  Re:  passing a  function as a parameter to tra
The parameter passing needs to use the URI of the namespace
xmlns:local="data:,dpc" e.g.QName('data:,dpc','functionname&# 39;)

--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
gesendet.Am 14.05.21, 15:06 schrieb "Graydon graydon@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:

  On Fri, May 14, 2021 at 12:39:53PM -0000, Martin Honnen
  martin.honnen@xxxxxx scripsit:
  > Use $local:function

  Progress!

  If I invoke the passed-as-a-parameter function as

  <xsl:sequence select="$local:tiny('away')" />

  in the stylesheet called by transform(), it changes the error.

  <xsl:param as="function(xs:string) as text()" name="local:tiny" />
  now
  returns the error

  Engine name: Saxon-EE 10.3 (External)
  Severity: error
  Description: A value must be supplied for parameter $local:tiny
  because there is no default value for the required type

  oXygen binds the error to the parameter definition in the called
  stylesheet.

  Putting a default value in the select attribute via an anonymous
  function appears to override the passed-in function. It also gets
  impractically complex for a non-toy-example function, so that can't
  be
  right.

  required="no" does not help. Removing the "as" attribute changes the
  error to:

  The required item type of the target of the dynamic function call is
  function(*); the supplied value "" is an atomic value

  so I conclude that I can't have the param rely on the definition of
  whatever function gets passed to it.

  Trying to search for "function parameter" gets the parameters of
  functions, rather than this case, so I haven't been able to find an
  example.

  Thank you! being able to change the error produces hope.

  --
  Graydon Saunders | graydonish@xxxxxxxxx
  CC&s oferC)ode, C0isses swC! mC&g.
  -- Deor ("That passed, so may this.")

XSL-List info and archiveEasyUnsubscribe (by email)

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.