Data Types Undefined in XML Schema? (2/2) - exploring XML
Data Types Undefined in XML Schema?
Whose concept is it anyway?
A controversial question is also whether it is at all possible to define a type hierarchy that satisfies the document writer, the software developer and the database programmer at the same time: A writer would concede that every type is foremost a string, as every value consists of characters that then get interpreted in different ways. A software developer only sees non-numeric values as strings. In a SQL context the story is slightly different again.
Some people argue that a data type can only be defined by a grammar, maybe using EBNF notation, plus some rules that express constraints, such as "a valid credit card number must have the following checksum." Alas, no prevalent language for specifying these rules and algorithms has emerged.
Recommendations
XML Schema needs a major overhaul, especially in the data type section:
- Data types need to be defined by validation grammars and rules, not inheritance trees.
- A language for validation algorithm for data types needs to be defined.
- Type libraries need to be made pluggable, as they are in RELAX NG.
- A registry for type libraries is needed.
Without these much-needed improvements, XML Schema might become the most cumbersome or the most ignored specification in the XML suite. Various data type library efforts are underway, most in the RELAX NG camp. Watch this space for relevant coverage.
Acknowledgements
This critical view on XML Schema datatypes was inspired by a more opinionated piece on the same topic.
Produced by Michael Claßen
URL: https://www.webreference.com/xml/column61/2.html
Created: Aug 05, 2002
Revised: Aug 05, 2002