|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Schema Datatype Limitations - Data Architecture Insights
> Case 1. Monetary amounts. Our source systems allow amounts to be > represented in a number of ways. 1,000.00 and 1000.00 are the same thing > and can be resolved by the receiving RDBMS. This seems ridiculously > complicated to validate with XML Schemas as a pattern would need to be > written that accounts for the possible comma that can occur every three > digits out. Does anyone have such a pattern written already? Since a big reason for XML Schema is to provide interoperability, the lexical representations of data types are restricted. For the decimal data type, that means commas are prohibited. You can not use commas in a value that is represented by decimal, or derived from decimal. There is no patern in the world that will allow you to violate the lexical representation rules. > Case 2. Dates. Dates are also too complicated to work with in many cases > with XML Schemas. I won't get into this one but I'm sure many of you have > seen the issues surrounding custom dates (which is a big issue since dates > can be described in so many patterns). Dates are based on ISO-8601 and must be represented that way. It appears you may be declaring everything as a string instead of using built in data types. Also, just because the lexical representation is limited, that does not mean you need to display these values as is or store them as is. They only need to follow the rules when they are in an XML instance and you want to validate against a schema. Dave
|
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








