A common fallacy: DTD is API
The fallacy is: the structure of an XML resource should also be the API to the information it contains.
- Trying to make the element structure also be the API makes it impossible to have both a good interchange structure and a good API. The attempt introduces inefficiency and invites unreliability of information interchange.
The Document Object Model (DOM) is an API to the generic structure of XML resources. It is not and can never be the API to the information sets conveyed by all vocabularies.
- If, e.g., the XLL vocabulary's functionality gets built into the DOM, what vocabulary's functionality shouldn't be built into the DOM?
- No committee can possibly do all this work!