xsl-list
[Top] [All Lists]

Re: [xsl] Declaring more than one type for a parameter in xsl:function?

2008-01-09 07:16:09
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(_dot_)schmitz(_at_)heitec(_dot_)de> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





-- 
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--