Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

RELAX NG

Express the grammatical rules for an XML vocabulary

Contributors:  OASIS, ISO

Summary:  RELAX NG is a grammar-based XML schema language used to describe, define, and limit XML vocabularies. Find out why some people dislike Document Type Definition (DTD), and discover how RELAX NG aims to improve upon it.

Date:  25 Apr 2007 (Published 06 Feb 2007)
Level:  Intermediate

Activity:  3090 views
Comments:  

RELAX NG is a grammar-based XML schema language used to describe, define, and limit XML vocabularies. Find out why some people dislike Document Type Definition (DTD), and discover how RELAX NG aims to improve upon it.

RELAX NG [OASIS Committee Specification and ISO Standard ISO/IEC 19757- 2:2003] is an XML schema language, meaning it is a language that you can use to define and limit XML vocabularies. The original XML schema language is the DTD, defined in XML 1.0 itself. However, some people dislike DTD for its awkward syntax, limitations in the text and markup constructs it can express, and the difficulty of handling XML Namespaces. Several new XML schema languages have emerged to supplant or augment DTDs, including RELAX NG, which is renowned for its simplicity and expressiveness. The core specification of RELAX NG defines an XML syntax for schemata, but there is also a RELAX NG Compact Syntax [OASIS Committee Specification and ISO Standard ISO/IEC 19757-2:2003/Amd.1:2006], which defines a simple text syntax for RELAX NG schemata. The ISO versions of RELAX NG are now available for free from ISO's Freely Available Standards page.


Resources

  • Read Nicholas Chase's introductory tutorial Understanding RELAX NG, which gets you up to speed on both RELAX NG's simplicity and its power, including both its full XML-based and its compact syntax (developerWorks, December 2003).

  • David Mertz's XML Matters column on developerWorks focuses on RELAX NG in his series "Kicking back with RELAX NG":
    • Part 1 looks at the general semantics of RELAX NG and touches on datatyping (February 2003).
    • Part 2 continues the discussion by addressing a few additional semantic issues and looking at tools for working with RELAX NG (March 2003).
    • Part 3 explores the RELAX NG compact syntax in detail and explains the exact correspondences between compact syntax and XML syntax (May 2003).


  • Take a look at the official tutorials for RELAX NG's core and its compact syntax.

  • ZVON offers a combined tutorial for RELAX NG and W3C XML Schema language.

  • Many resources are linked from the RELAX NG home page.

  • ZVON offers a RELAX NG Reference.

  • One of the aspects of RELAX NG that might trip you up is expressing simple text patterns, so Uche Ogbuji provides some guidance in Tip: Use the right pattern for simple text in RELAX NG (developerWorks, October 2005).

  • RELAX NG allows you to define your own data types, as demonstrated by Elliotte Rusty Harold in RELAX NG with custom datatype libraries (developerWorks, November 2004).

  • Read about other XML standards: Index of XML standards.

  • Participate in any of several XML-centered forums: XML zone discussion forums.

  • Get involved in the developerWorks community: developerWorks blogs

  • Find out how you can become an IBM-Certified Developer in XML and related technologies at IBM XML certification.

  • See the developerWorks XML Zone for a wide range of technical articles and tips, tutorials, standards, and IBM Redbooks at XML technical library.

  • Stay current with technology in these sessions: developerWorks technical events and webcasts.

  • Build your next development project with trial software available for download directly from developerWorks: IBM trial software

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=193475
SummaryTitle=RELAX NG
publish-date=04252007