On Saturday 13 September 2008 11:43:03 am Benson Margulies wrote: > Mapping either of these to a restricted xsd:string runs them straight > into the 'valid XML 1.0 Unicode subset' issue. More fun yet, a Java > 'character' will hold a non-BMP Unicode character, and those range > from 0 to 2**32-1, sort of. I think that mapping them to restrictions > on positive integers makes more sense.
Well, I'm not so sure. A Java String COULD be mapped to a list of Integers for the same reason, but I don't think anyone would argue that's the best option. :-) Seriously, is there anyway to make it configurable. The main reason is that I think on some platforms/toolkits, if they see a String with maxLength 1, they'll map it to a char. Thus, it may make a little more sense for them. Also, if you get an "integer", it's up to the caller to then realize that it represents a unicode value and they would need to handle the codepage conversion and such. That's easy in Java, but not so easy in things like C/C++. If it's a String, it's kind of assumed the underlying toolkit has done whatever is needed to convert it to whatever is needed on that platform. Anyway, if it could be at all configurable, I think that would be great. I think the restricted string would work for 95% of the usecases. -- Daniel Kulp [EMAIL PROTECTED] http://www.dankulp.com/blog
