Skip to main content


developerWorks  >  XML  >

Understanding RELAX NG

developerWorks

Level: Intermediate

Nicholas Chase (nicholas@nicholaschase.com), Author, Studio B

04 Dec 2003

Register now or sign in using your IBM ID and password.

As many developers get frustrated with both the limitations of DTDs and the complexity of XML Schemas, many are gravitating towards RELAX NG. This tutorial gets you up to speed on both RELAX NG's simplicity and it's power, looking at both its full XML-based and its compact syntax.

Prerequisites

This tutorial is for developers who want to learn the concepts behind RELAX NG in both its XML and compact forms. In the tutorial, you'll learn how to use RELAX NG to validate a single source file. The tutorial doesn't actually build an application but uses a command-line application to simply validate the document against the schema document.

This tutorial assumes that you have a basic understanding of XML.


System requirements

You'll need JavaScript enabled in your browser.

To verify the schema files you create, you'll need a validator. RELAX NG validators exist for a number of different languages, including:

  • Java technology -- Jing (http://www.thaiopensource.com/relaxng/jing.html) and MSV (http://wwws.sun.com/software/xml/developers/multischema/)
  • C -- Libxml2 (http://www.xmlsoft.org/)
  • C# -- Tenuto (http://sourceforge.net/projects/relaxng)
  • Python -- XVIF (http://freshmeat.net/projects/xvif/?topic_id=868)
  • ActiveX -- a DLL, VBRELAXNG (http://www.geocities.co.jp/SiliconValley-Bay/4639/vbrelaxng/vbrelaxng.html)

For more information on available tools, check out http://www.relaxng.org/#software.

Before beginning the tutorial, install your chosen software according to its instructions and make sure you know how to actually validate a file.



Duration

Under one hour


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed