Home > SOA Tips > XML Developer > RELAX NG, the XML Schema alternative
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

XML DEVELOPER

RELAX NG, the XML Schema alternative


Ed Tittel
10.25.2006
Rating: -3.75- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Those who've been knocking around the XML or Web development communities for any length of time have come across the work of James Clark, if not evidence of the man himself. His is a pretty fascinating story, which you can read more about on his bio page.

For the purposes of our discussion, let's just say he's been around the SGML and XML communities since the early 90s and has contributed a substantial and extremely useful body of work. His highlight reel includes an open source SGML parser he wrote in C, acting as technical lead during the development of the XML 1.0 Recommendations, enhancing SGML to make XML a formal subset of SGML, development of expat, "the world's fastest XML parser," co-authoring the XSL submission, editing the XSLT and XPath Recommendations, and last and most relevant, developing TREX, a schema language for XML that pre-dated (and many believe outclasses) XML Schema.

In fact, TREX plus another alternate XML schema language named RELAX, gave rise to RELAX NG (where NG stands for Next Generation), which is an OASIS development project and is now also enshrined as ISO/IEC standard 19757-2. This probably explains why most of Clark's recent work centers around RELAX NG and includes an open source validator for that markup language (Jing), a tool for converting XML DTDs into RELAX NG (DTDinst), a Java program that translates RELAX NG schemas into other formats (Trang) and a new XML mode for GNU Emacs that performs incremental XML parsing and does RELAX NG validation.

Why bother with RELAX NG when there's XML Schema, a W3C recommendation also available? Three short answers explain why this markup language is worth digging into:

  • The language is designed to be simple and easy to learn, which many would observe is not the case for XML Schema.
  • The language includes both an XML syntax and a compact non-XML syntax. It also supports XML namespaces and does not change the information set of any XML document it touches.
  • It works with XML Schema Datatypes (just as does XML Schema itself) and can draw on the expressive power of that markup language.

All of this goes to explain why RELAX NG is so widely used and why it still enjoys a reputation as an attractive, if not compelling, alternative to XML Schema to this very day. ISO Standard status doesn't hurt much, either, especially in Europe where this kind of official seal of approval often means more than it does in the states.

You can dig deeply into RELAX NG, through many avenues (including the aforementioned bio page for Clark himself), but the following sites offer outstanding entry points:

  • RELAX NG home page: though it hasn't been updated since September 2003, you'll still find lots of useful stuff here, including pointers to OASIS and ISO that do include completely current information.
  • As is so often the case with XML topics, Robin Cover's CoverPages provide excellent info and pointers to RELAX NG topics as well. Visit the RELAX NG page for more information.
  • Various items of interest are available at the ISO Web site, including the ISO/IEC19757-2:2003 home page and their download page for Freely Available Standards (you'll find two hits there related to RELAX NG).
  • Eric van der Vlist has also written a good book for O'Reilly Media entitled RELAX NG (July 2003, ISBN: 0596004214) that covers both the XML and compact syntax approaches quite well, and digs into best practices and integration with external type libraries and XML Schema regular expressions. It also provides lots of examples and illustrations that readers will find useful and illuminating.

Those who need to build schemas for XML documents or document collections and who've been frustrated by XML Schema may find RELAX NG preferable. Check it out, and you may come to share this viewpoint.

About the author

Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. Among his many XML projects is the 2002 Sybex book XML Schemas, which he co-authored with Chelsea Valentine and Lucinda Dykes (ISBN: 0792140459). E-mail Ed at etittel@techtarget.com with comments, questions or suggested topics or tools for review.


Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
XML Developer
WSDL 2.0, new messaging for Web services
Using RELAX NG For data integration
Efficient XML Interchange tackles data verbosity
XML to DDL imports, synchronizes database schemata
The basics of MathML 3.0
Migrating to XSLT 2.0
What's up with XML 2.0?
Say hello to XPath 2.0
Podcasting software covers many bases
The XML behind podcasting

XML and XML schema
Lock-in, security loom as dark side of Compute Cloud
Ganymede: Modeling tools target SOA, UML
Data services mashups emerge for SOA
Making sense of data services mashups
XML turns 10
SOA helps save 100-year-old business
Oracle maps heterogeneous data services strategy for SOA
Handling XML with Ajax
Efficient XML draft published
Intel boosts XML for SOA

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
class diagram  (SearchSOA.com)
Fast Infoset (FI)  (SearchSOA.com)
GeoRSS  (SearchSOA.com)
Keyhole Markup Language  (SearchSOA.com)
RELAX NG  (SearchSOA.com)
state diagram  (SearchSOA.com)
Universal Business Language  (SearchSOA.com)
Vector Markup Language  (SearchSOA.com)
XML infoset  (SearchSOA.com)
XML pipeline  (SearchSOA.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2001 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts