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.
To overcome these issues, XML Schema (W3C standard) and RELAX NG (OASIS standard) were introduced. Both of them are based on XML itself.
James Clark's post to promote RELAX NG is quite lengthy but philosophical. The follow up post by Eric Sedlar’s (Oracle Corporation) to defend XML Schema also has some valid points.
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.
No comments:
Post a Comment