Friday, January 19, 2007

RELAX-NG V.s W3C XML-Schema | Jing

As of start packaging Jing, the _RELAX NG validator_ to Debian, i was going with some bit of difference analysis between the RELAX-NG and the W3C XML-Schema language.

For some more info regarding _Jing _ , it implements :
* RELAX NG 1.0 Specification,
* RELAX NG Compact Syntax, and
* parts of RELAX NG DTD Compatibility,
specifically checking of ID/IDREF/IDREFS.


Firstly analyzing the advantages of XML-Schema over the DTD,

XML-Schema over DTD
-It provides much greater specificity than DTDs could. some of these specificities are namespace aware, and provide support for types.

Then the features not supported by RELAX-NG,

XML-Schema over RELAX-NG..:
-RELAX NG lacks any analog to
-RELAX NG has slightly poorer specificity, i.e., it is not possible to define a specific number or range of repetitions of patterns.
-XML-Schema has a formal mechanism for attaching a schema to an XML document.

Then what is better regarding RELAX-NG in:

RELAX-NG Over XML-Schema

-It is the compact and has an equivalent form that is much more like a DTD, but with greater specifiability
-Also it provides very strong support for unordered content.
-RELAX-NG also allows for non-deterministic content models.
-RELAX NG allows attributes to be treated as elements in content models while W3C XML Schema cannot specify such a dependency between the content of an attribute and child elements.
-Most RELAX NG schemas can be algorithmically converted into W3C XML Schemas and even DTDs (except when using RELAX NG features not supported by those languages, as above)

So at the same time that _Jing_ also has support for schema languages other than RELAX NG; specifically

* W3C XML Schema (based on Xerces-J);
* Schematron;
* Namespace Routing Language.



No comments: