[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: passing a sequence as a parameter
On 26/02/2008, Colin Adams <colinpauladams@xxxxxxxxxxxxxx> wrote: > On 26/02/2008, David Carlisle <davidc@xxxxxxxxx> wrote: > > > Actually I didn't understand Colin's statement that you couldn't use as= > > in this context, Colin, did you mean that was a restriction in the > > language or just of gesalt? > > > Both. > > That is, the language doesn't allow you to specify a type of two > booleans followed by an integer, for example. > > But you could do this via a user-defined type in a schema-aware > processor. And Gestalt is not schema-aware. Even with a schema-aware processor you couldn't pass a pre-typed atomic sequence as a parameter could you? You could pass elements that were typed, but not atomics? Maybe an example would help. A way around it is to pass in a delimited string and the create the sequence yourself: <xsl:param name="str" select="'foo, 1'" as="xs:string"/> <xsl:variable name="input"> <xsl:variable name="tokens" select="tokenize($str, ',')"/> <xsl:sequence select="(xs:string($tokens[1]), xs:integer($tokens[2]))"/> </xsl:variable> -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
|
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
|