RE: F&O Equality of binary values

Hi Ashok,

Yes, it addresses my concern.  It might be worth mentioning that the
length is measured in number of octets, since two base64Binary values
can have different "string" lengths but still be equal (because of
whitespace intermingled with the base64 characters).  But, since this is
stated in the XML Schema recommendation, perhaps it's unnecessary.  

Thanks!
Priscilla 

> -----Original Message-----
> From: Ashok Malhotra [mailto:ashokma@microsoft.com] 
> Sent: Friday, April 25, 2003 5:14 PM
> To: Priscilla Walmsley; public-qt-comments@w3.org
> Subject: RE: F&O Equality of binary values
> 
> 
> Priscilla:
> The value comparison should be done on the value space and not the
> lexical forms.  The value space for hexBinary and base64Binary are
> binary octets.  The F&O task force recommends that the definition of
> equality be changed from:
> 
> > "Returns true if $value1 and $value2 are of the same length and
> contain
> > the same code-points"
> 
> to:
> 
> + "Returns true if $value1 and $value2 are of the same length and
> contain
> + the same binary octets"
> 
> With this definition,
> 
> > hexBinary-equal(xs:hexBinary("0FB7"), xs:hexBinary("0fb7")) 
> 
> returns 'true'.
> 
> Would this change address your concern?
> 
> All the best, Ashok
> 
> > -----Original Message-----
> > From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> > request@w3.org] On Behalf Of Priscilla Walmsley
> > Sent: Tuesday, April 15, 2003 5:48 AM
> > To: public-qt-comments@w3.org
> > 
> > 
> > Hi,
> > 
> > The descriptions of hexBinary-equal and base64Binary-equal say:
> > 
> > "Returns true if $value1 and value2 are of the same length 
> and contain
> > the same code-points"
> > 
> > However, the way XML Schema defines these types, there can 
> be several
> > lexical representations for the same value.  For example, the
> hexBinary
> > values 0FB7 and 0fb7 are two different lexical 
> representations for the
> > same value.
> > 
> > Are the hexBinary-equal and base64Binary-equal functions intended to
> > take this into account?  In short, what does the following return:
> > 
> > hexBinary-equal(xs:hexBinary("0FB7"), xs:hexBinary("0fb7"))
> > 
> > 
> > The current wording seems to imply "false", but I think it should be
> > "true".
> > 
> > Also, "value2" should be preceded by a "$" in the above sentence.
> > 
> > Thanks,
> > Priscilla
> > 
> > 
> 
> 

Received on Wednesday, 30 April 2003 09:10:37 UTC