RE: MS-FO-LC1-100: Promotion of untyped values in fn:distinct-val ues?

 

*	untypedAtomic values are cast to string 



Just for comparison or also in the result? 

 

Good question. Since the most likely scenario is that if any values are
untyped, then all values are untyped, it probably makes most sense to leave
them as untyped in the result.

 

Michael Kay 

 

Michael

 


  _____  


From: Kay, Michael [mailto:Michael.Kay@softwareag.com] 
Sent: Thursday, August 14, 2003 3:55 PM
To: Michael Rys; Ashok Malhotra; public-qt-comments@w3.org
Subject: RE: MS-FO-LC1-100: Promotion of untyped values in
fn:distinct-values?

 

I think the rules for fn:distinct-values should be: 

* untypedAtomic values are cast to string 
* non-comparable values are allowed, and treated as distinct 

Michael Kay 

> -----Original Message----- 
> From: Michael Rys [mailto:mrys@microsoft.com <mailto:mrys@microsoft.com> ]

> Sent: 14 August 2003 20:06 
> To: Ashok Malhotra; public-qt-comments@w3.org 
> Subject: RE: MS-FO-LC1-100: Promotion of untyped values in 
> fn:distinct-values? 
> 
> 
> 
> This seems incorrect. We should not change the type of the 
> values in the result. We should only use a certain type for 
> the comparison. Also, with the wording below, what would the 
> semantics be, if you have the static type 
> 
> (Xdt:untypedAtomic | xs:string | xs:decimal)* 
> 
> and a sequence of values of each of the member types? 
> 
> Best regards 
> Michael 
> 
> > -----Original Message----- 
> > From: Ashok Malhotra 
> > Sent: Sunday, August 10, 2003 8:30 AM 
> > To: Michael Rys; public-qt-comments@w3.org 
> > Subject: RE: MS-FO-LC1-100: Promotion of untyped values in 
> fn:distinct- 
> > values? 
> > 
> > fn:distinct-values does not say how values of type xdt:untypedAtomic 
> are 
> > handled.  I suggest we use the same rule that we use for aggregate 
> > functions, namely  "Values of type xdt:untypedAtomic are cast to the 
> type 
> > of the other items in $arg. If all values in $arg are of type 
> > xdt:untypedAtomic they are converted to xs:string." 
> > 
> > All the best, Ashok 
> > 
> > > -----Original Message----- 
> > > From: public-qt-comments-request@w3.org 
> [mailto:public-qt-comments- <mailto:public-qt-comments->  
> > > request@w3.org] On Behalf Of 
> Michael Rys 
> > > Sent: Wednesday, July 09, 2003 2:33 AM 
> > > To: public-qt-comments@w3.org 
> > > Subject: MS-FO-LC1-100: Promotion of untyped values in 
> fn:distinct- 
> > values? 
> > > 
> > > 
> > > Class: Technical 
> > > 
> > > Section 15.1.11: Are values of type xdt:untypedAtomic promoted? If 
> so 
> > > how? 
> > > 
> 
> 
> 

Received on Friday, 15 August 2003 13:11:29 UTC