|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is there any benefit to creating a variable and s
> On 17 Jun 2024, at 02:41, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > >> > > >> That "as" clause says the ICAO param is a string value. Well, everything is a string. > > > > Nonsense. Saying as="xs:string" stops the caller from supplying (say) a boolean, a number, or a map. > > I was under the impression that the quoted global parameter declaration was for a value supplied on the command-line that invoked the XSLT processor: > > > <xsl:param name="ICAO" as="xs:string"/> > > In this case Roger would be right that specifying the type as xs:string would not be too-useful, or is this not so? > Yes, if it's only ever called from the Saxon command line, then specifying as="xs:string" achieves very little. It does however prevent someone supplying, say, an integer using the command line syntax ?ICAO=42, or a date using ?ICAO=current-date(). It also has documentary value, and it will come into its own if someone in the fullness of time attempts to invoke the stylesheet using a different processor or a different API. Michael Kay Saxonica
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








