[Fwd: Re: [xml] hexBinary schema datatype patch]



I intended to reply to the list.
--- Begin Message ---
On Mon, 2003-07-07 at 04:12, Peter Sobisch wrote:

Hi guys,

I have a question about hexBinary-implemantation from Charles:
why is the hexBinary restricted to 12 bytes ?

Purely for pragmatic reasons. I reused the same structure that is used
for decimal (and it's derived types) which has 3 long ints for storing
the value.


---cut----
+             if (i > 24)
+               goto return1;
---end of cut ---

I read the spec part 2 and couldn't find anything that says hexBinary has max 
length of 12. 
Have a look at 
http://www.w3.org/XML/2001/05/xmlschema-test-collection/resultNIST_hexBinary.htm
as I can see, there are much longer hexBinary values than 12 bytes.

I suppose a better implementation would be to store copies of the
hexBinary strings representations instead of converting them to values.
I think it is doable but I don't know when I will have time.


best Regards,
Peter

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml


--- End Message ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]