Re: [xsl] Parameter of type xs:anyURI

Subject: Re: [xsl] Parameter of type xs:anyURI
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 24 Aug 2010 14:10:34 +0100
On 24/08/2010 14:06, Martynas Jusevicius wrote:
So what do I do? Just change the parameter type to xs:string?

If you want to use the command line processor yes. If you want to use xsl:uri internally then have a parameter that you set as a string and a global variable that is the parameter cast to xs:anyURI and then just use the variable in the code. I use that technique quite a lot for numeric parameters;


<xsl:param name="version"/>
<xsl:variable name="versionnum" select="number($version)"/>

that way you can use

saxon ..... version=22

on the commandline but within the code use $versionnum which means that you get numeric rather than lexicographic ordering for example.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________


Current Thread