Download





RELAX NG

RELAX NG (pronounced "relaxing") is the real sleeper of schema languages, but it has the potential to become the most popular schema language of all. Where the W3C XML Schema Language can feel a bit intimidating at times, RELAX NG is far simpler and cleaner, perhaps because RELAX NG is primarily the product of two smart developers (James Clark and Murata Makoto) rather than a design by committee. RELAX NG can do everything DTDs can do except define entities and notations, and it can do everything the W3C Schema Language can do except define new data types. However, RELAX NG does enable you to reference different data type libraries, including the W3C's own set of XML Schema primitive types.

Key features of RELAX NG include the following:

  • Extensive support for parent–child structures

  • Exceptional support for order-independent structures and constraints

  • External data type libraries that support various kinds of simple data types

  • Namespace-aware validation

  • Annotation of elements

  • Great ease of writing and reading, both in XML and non-XML forms

RELAX NG is most appropriate when:

  • Most validation is concerned with element and attribute structure, not with the content of elements and attributes.

  • Simple data types are sufficient.

  • Ease of schema authoring is a primary concern.

  • Very complicated validation rules require a traditional programming language to implement; for example, a key element contains a prime number or a time element contains a value in the past.

RELAX NG is least appropriate when:

  • Element constraints are based on sibling, ancestor, or descendant relationships rather than parent–child relationships.

Because RELAX NG does not come with the W3C imprimatur, it has not gained as broad a mind share as the W3C XML Schema Language. However, as more developers experiment with schemas and discover that the W3C XML Schema Language is just too baroque for their tastes, many of them are choosing RELAX NG instead. Most recently the members of the OASIS OpenOffice XML Format Technical Committee have committed to writing their schemas in RELAX NG instead of the W3C XML Schema Language. If you need something with all the expressivity of the W3C XML Schema Language but none of its complexity and verbosity, you really can't do better than RELAX NG.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows