Home arrow XML arrow An Introduction to RELAX NG
XML

An Introduction to RELAX NG


RELAX NG is not a capitalized misspelling of something you probably get to do all too rarely as a busy programmer and web designer. If you use XML to any great degree, you'll want to take a close look at it. It can help make your life as a web developer easier, allowing you to relax a little more. Keep reading to learn what it is, and the advantages to using it. This is the first part of a three-part series.

Author Info:
By: Peyton McCullough
Rating: 5 stars5 stars5 stars5 stars5 stars / 5
July 28, 2008
TABLE OF CONTENTS:
  1. · An Introduction to RELAX NG
  2. · Getting started with elements
  3. · Adding child elements
  4. · Adding attributes

print this article
SEARCH DEVARTICLES

An Introduction to RELAX NG
(Page 1 of 4 )

RELAX NG is one of several schema languages available for XML. Based on RELAX (REgular LAnguage description for XML) and TREX (Tree Regular Expressions for XML), RELAX NG offers a nice alternative to W3C-recommended XML Schema. RELAX NG aims to be a simple and easy-to-use language, and, perhaps as a result of this, it has become quite popular. In this article, we'll take a look at RELAX NG and some of the features it provides.

One of the most interesting things about RELAX NG is that it actually has two syntaxes. Either syntax can be used to create a schema definition, and the same results can be achieved.

The first syntax is an XML-based syntax, which, of course, makes sense because RELAX NG is, after all, a schema language for XML. However, describing something with XML doesn't always produce a concise result. XML's structure often lends itself to verbose results.

The second syntax is very different. It's called the “compact syntax.” It's not based on XML, and it can create some pretty concise results while still being very readable.

Rather than expand on the merits of both syntaxes and steer you one way or the other, I'll leave you to decide which syntax to use for your projects. This article will cover both syntaxes.


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials