Skip to Content
Professional XML
book

Professional XML

by Thiru Thangarathinam, Bill Evjen, Alessandro Vernet, Sam Ferguson, Kent Sharkey, Michael Kay
April 2007
Intermediate to advanced
886 pages
21h 31m
English
Wrox
Content preview from Professional XML

Chapter 7. RELAX NG

The previous two chapters looked at two of the more commonly used formats for defining XML vocabularies. This chapter continues this survey of schema languages by looking at RELAX NG. This is a relatively new XML schema definition language from the Organization for the Advancement of Structured Information Standards (OASIS). OASIS is a standards body — similar to the W3C — that was originally created as an improved version of DTDs, and can leverage some of the functionality of XML Schema. To further these goals, RELAX NG was designed to provide a highly readable format that could be used to define complex vocabularies.

This chapter will look at the two forms of the RELAX NG specification: the standard form and the compact form. It will show the way you use these two forms to define XML vocabularies, and compare it with DTDs and XML Schemas. Along the way, you will see how RELAX NG integrates with XML tools and programming languages for validating XML documents and creating objects that map to RELAX NG schemas.

Why Another Schema Language?

At first glance, there seems to be little need for yet another schema language. DTDs have been around since SGML, so most people are aware of them, and most applications can work with them. XML Schema is also commonly available, integrated with many XML tools, and ratified by the W3C. Still, there are great reasons why you should consider using RELAX NG.

The primary reason to use RELAX NG is simplicity. Anyone who has read the W3C ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XML: Visual QuickStart Guide, Second Edition

XML: Visual QuickStart Guide, Second Edition

Kevin Howard Goldberg
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 9780471777779Purchase book