|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML "Universal Types".
> Simple types are very low-level (and programming language specific) > 'Universal' types do not exist. In the field of mathematics, I would dare say there are many conceptual types that are universal. I don't think there's any disagreement about what an integer is, for instance. It's when we convert these conceptual types to physical ones that can be represented on a computer that problems arise: there's no universal physical binary representation of an integer, nor are their common value ranges in the various computing languages. I'm sure someone, somewhere in academia has done work in identifying universal conceptual types (meta-types?) for strings, etc. What I wonder is if we need to explicitly adopt universal types as a basis for specifications, and then develop sets of restricted physical specifications for languages, machines, etc. On top of that we can build validation engines for type conversions. Now, now, hear me out... Take the set of conceptual integers i. We have a set of values allowed in XML Schema for integers S(i) which happens to be equivalent: S(i)=i. [1] The set of XML Schema ints (call this I[i]), is not equivalent to i ([2]); I(i) is a proper subset of i. However, for every i[x] in i, we should be able to say if there's an equivalent I(i[x]). That equivalency check would amount to a constraint check between a physical type and a conceptual type. Okay, so what's the point? The point is to divide the constraint checking into two parts: the conceptual check vs. the physical. First question: is value x a member of conceptual type T? If so, x is conceptually type valid. But the next question is: is x a member of my physical type system, P? If not, x is conceptually valid but phyically type invalid for type system P. Which means x is correct, but not representable in my application's physical type system. Because an XML document may have to move through many physical type systems as it jumps from process to process, it may be useful to distinguish conceptual validity from that of physical representability. As in "Yeah, x is an integer, all right. But I can't do a thing with it." Which has the consequence that as long as you don't have to store x internally, you can leave it in its textual representation and regurgitate it out to some other process down the chain. I think that would be useful; but then again, I just got back from vacation. [1] http://www.w3.org/TR/xmlschema-2/#integer [2] http://www.w3.org/TR/xmlschema-2/#int
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








