|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What are the characteristics of a good type system for XML
From: "J.Pietschmann" <j3322ptm@y...> > Dare Obasanjo wrote: > > the (a + b) + c != a + (b + c) problem if a is an xs:date > > and b and c are durations, > > You can have (a + b) + c != a + (b + c) with IEEE 754 floating > point numbers too. Calendar algebra isn't as easy as everybody > seems to think it should be, otherwise we'd have a standard for > it for years. In particular it seems to be impossible to > make it obey some axioms which hold for mathematical numbers. > That's not all that unusual. Get over it. I think the conventional answer is that uses of types outside the characteristics that the WXS specs set is application dependent. In other words, WXS does not tell you how to compare floats and doubles, but that does not mean it should not be done: it is just that the details belong to you (and your implementation's) decisions. My feeling about the types needed by schema languages are that by-and-large the types in the schema language only need to match the types of the subsequent processing systems. So Schematron using XSLT expressions is entirely appropriate for validating documents that then go to XSLT transformations, for example, and XML Schemas is overkill for that kind of use. On the other hand, for data going in to a database (in particular if the data is not really being validated by the DBMS on import but just being shovelled in) then a schema language with a type system like that of the DBMS is appropriate (*and* Schematron!). I kept out of the datatype side of WXS, but clearly numbers and dates are much more tricky to get even half workable than people often expect. Cheers Rick Jelliffe
|
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








