Pieter (4)
Usenet Archive
- Joined
- Nov 26, 2003
- Messages
- 3
- Reaction score
- 0
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other.
I've made a small list of some good and bad points of both. These points don't really go into the grammar aspects of these languages, but are more about secondary aspects. The grammar aspects are different, but both are suitable for validating an XML document. Both schema languages have good and bad points in them. Any comments on the languages themselves will therefore (at least in my opinion) not help to make a choice. However, points like support by tools and how widely spread the use is (are they both widely used? I don't know this and haven't been able to find much on it), do make a difference. W3C XMl Schema + versatile: not only useful for validation, but also for classification of elements and attributes, identifying their semantics. It can send documentation and application information to the processor. + it employs oop aspects + w3c recommendation + tools support
- complex
- documentation is hard to understand
Relax NG
+ especially the compact syntax is very clear and intuitive + was designed to be able to incorporate elements of other schema languages (e.g. the data types of w3c schema), which makes it easy to adapt the language to your needs + tool support is slowly expanding + draft standard of the Document Description and Processing Languages subcommittee of the ISO/IEC Joint Technical Committee
- only suitable for validation
- documentation and application information are not supported
- xslt 2.0 is designed to use schemas. From the working draft it seems that, although every schema language should be supported, w3c xml schema will be more supported than other schema languages
I don't believe this list is exhaustive or even entirely correct. However, I hope people on this list can help me make a choice. I suppose it therefore is useful to explain what the XML Schema will be used for. I'm working on a program that generates an XML document which contains a Java-like programming language. This document should be validated and then, with the help of XSLT, translated into XMI, which can then, for instance, be imported into rational rose in order to create class diagrams. I suppose that for the validation part both Relax NG and WXS could be used. However, for the transformation part, they might not be equally suited. Maybe this is not true, but I just do not know and hope people on this list can help me. Some demands for the choice of the schema are that is should be easy to read and understand, easy to change and easy to maintain.
I've made a small list of some good and bad points of both. These points don't really go into the grammar aspects of these languages, but are more about secondary aspects. The grammar aspects are different, but both are suitable for validating an XML document. Both schema languages have good and bad points in them. Any comments on the languages themselves will therefore (at least in my opinion) not help to make a choice. However, points like support by tools and how widely spread the use is (are they both widely used? I don't know this and haven't been able to find much on it), do make a difference. W3C XMl Schema + versatile: not only useful for validation, but also for classification of elements and attributes, identifying their semantics. It can send documentation and application information to the processor. + it employs oop aspects + w3c recommendation + tools support
- complex
- documentation is hard to understand
Relax NG
+ especially the compact syntax is very clear and intuitive + was designed to be able to incorporate elements of other schema languages (e.g. the data types of w3c schema), which makes it easy to adapt the language to your needs + tool support is slowly expanding + draft standard of the Document Description and Processing Languages subcommittee of the ISO/IEC Joint Technical Committee
- only suitable for validation
- documentation and application information are not supported
- xslt 2.0 is designed to use schemas. From the working draft it seems that, although every schema language should be supported, w3c xml schema will be more supported than other schema languages
I don't believe this list is exhaustive or even entirely correct. However, I hope people on this list can help me make a choice. I suppose it therefore is useful to explain what the XML Schema will be used for. I'm working on a program that generates an XML document which contains a Java-like programming language. This document should be validated and then, with the help of XSLT, translated into XMI, which can then, for instance, be imported into rational rose in order to create class diagrams. I suppose that for the validation part both Relax NG and WXS could be used. However, for the transformation part, they might not be equally suited. Maybe this is not true, but I just do not know and hope people on this list can help me. Some demands for the choice of the schema are that is should be easy to read and understand, easy to change and easy to maintain.