We all know that the following limitations in DTD pushed for a new schema standard.
- DTD is expressed in its own language. We need to master another set of notations to work with DTD.
- We have no way to specify data types and data formats.
There’s been a schema war among industry experts for a quite some time. You won’t disagree with me that XML schema enjoys a wider acceptance in the current software market (at least in the areas I am working on). But, which one is better, XML Schema or RELAX NG? I being a novice in this area, went on to browse through old archives at IETF XML USE newsgroup.
I agree that RNG is easy to understand with this excellent tutorial. At the same time, I was able to grab the concept behind XML Schema (which I currently use) quite easily. On the surface, it seems to me that the major difference lies in the style: while XML Schema categorize patterns into distinct components such as elements, attributes, complex/simple types, etc., RNG introduces generic patterns. I need to dive deep into both schemas in order to provide an objective and practical comparison. Wait..what about Schematron? I like the fact that it (schematron) does not impose any ordering of sibling elements (in contrary to XML Schema and RNG), which is quite valid and sufficient for data centric applications.