Subject: Re: [xsl] Declaring more than one type for a parameter in xsl:function? From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Wed, 9 Jan 2008 06:15:35 -0800 |
> I'm working with a xsl:function that should accept to different sequence > types in the same parameter (e.g. element a or b), or even an element > node and an atomic value like xs:string. Probably not a good design? On the other side, I have raised the problem of some needed missing super-types such as xs:numeric. -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play On Jan 9, 2008 2:44 AM, Georges Schmitz <georges.schmitz@xxxxxxxxx> wrote: > Hi, > > I'm working with a xsl:function that should accept to different sequence > types in the same parameter (e.g. element a or b), or even an element > node and an atomic value like xs:string. > > Pseudo example: > > <xsl:function name="myf:funct" as="xs:string"> > <xsl:param name="t" as="element(a) | element(b)"/> > ... > or > > <xsl:function name="myf:funct" as="xs:string"> > <xsl:param name="t" as="element(b) | xs:string"/> > ... > > Only one sequence type is allowed and function overloading with > different types doesn't work. So does a simple solution exist here? > > Thanks in advance, > Georges > > -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Declaring more than one t, Abel Braaksma | Thread | RE: [xsl] Declaring more than one t, Michael Kay |
Re: [xsl] Filtering a node-set, David Carlisle | Date | [xsl] XSLT 2.0 Multi-level groupin, Robert Zegwaard |
Month |