OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] RE: XQuery subset (was RE: [xml-dev] WXS acronym?)

[ Lists Home | Date Index | Thread Index ]

> -----Original Message-----
> From: Jonathan Robie 
> [mailto:jonathan.robie@datadirect-technologies.com] 
> Sent: Friday, August 16, 2002 1:54 PM
> To: Dare Obasanjo; Simon St.Laurent
> Cc: xml-dev@lists.xml.org
> Subject: RE: [xml-dev] RE: XQuery subset (was RE: [xml-dev] 
> WXS acronym?)
>
> >It also has interesting type issues like what happens when I do this
> >
> >function is-integer(xs:decimal $d) returns xs:boolean{
> >   $d instance of xs:integer
> >}
> >
> >   is-integer(xs:integer(6661))
> >
> >Does the query return true or false? Both answers have unpleasant
> >ramifications.
> 
> The function conversion rules say that the integer is converted to a 
> decimal, so it returns false.

So function parameters are not polymorphic for numeric types? So if I
have a simpletype called myns:shoesize then 

	function is-integer(xs:decimal $d) returns xs:boolean{
	   $d instance of xs:shoesize
	}

   is-integer(myns:shoesize(11))

returns false? I'd love to explain that to our users. 

So are other types treated polymorphically (e.g. string types, complex
types) or do function conversion rules only discriminate against the
numeric types?

-- 
PITHY WORDS OF WISDOM 
Blessed are the meek for they shall inherit the Earth, minus 40%
inheritance tax.     

This posting is provided "AS IS" with no warranties, and confers no
rights. 






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS