Namespace Routing Language
James Clark Announces the Namespace Routing Language (NRL)
Date: Thu, 19 Jun 2003 22:34:40 +0700 From: James Clark <firstname.lastname@example.org> To: email@example.com Subject: Namespace Routing Language
The XML Namespaces Recommendation allows an XML document to be composed of elements and attributes from multiple independent namespaces. Each of these namespaces may have its own schema; the schemas for different namespaces may be in different schema languages. The problem then arises of how the schemas can be composed in order to allow validation of the complete document. NRL attempts to solve this problem.
NRL is the successor to my Modular Namespaces (MNS)  language and is intended to be another step on the path towards DSDL Part 4.
It provides the following features and benefits:
Supports schema language coexistence. For example, if you have a schema for XHTML in RELAX NG and a schema for SVG in W3C XML Schema, NRL allows you to validate an XHTML document that embeds SVG, without having to convert either of your schemas.
Allows extension of schemas not designed to be extended. For example, suppose you have an schema for XHTML which does not allow extension, but you want to embed SVG in XHTML. NRL allows you to do so without having to add wildcards to your XHTML schema.
Makes authoring of extensible schemas easier. Instead of having to clutter up a schema with wildcards, you can write a simple schema without wildcards and then use NRL to specify what kind of extension is allowed.
Supports "transparent" namespaces. By transparent namespace, I mean a namespace t where you want to validate <x><t:y><z/></t:y></x> like <x><z></x>. This is useful for namespaces that provide templates or versioning.
Allows contextual control of extension. If you have a W3C XML Schema that uses wildcards in different contexts, you can use NRL to control which namespaces are allowed in each context.
Allows concurrent validation. You can specify that a particular namespace or the whole document is validated with respect to multiple schemas, which may be in different schema languages. So you could validate a document against both a W3C XML Schema schema and a Schematron schema.
For RELAX NG, it can be used to provide some of the namespace-based modularity features that are built-in to XSD.
NRL is designed to allow an implementation to stream, and the sample implementation does so.
NRL is designed to allow the schemas that it combines to use arbitrary schema languages. The sample implementation has a SAX-based plug-in architecture that allows new schema languages to be added dynamically. It comes with support for RELAX NG (both XML and compact syntax), W3C XML Schema (via a wrapper around Xerces-J), Schematron and (recursively) NRL; it can also use any schema language with an implementation that supports the JARV interface.
 http://www.thaiopensource.com/relaxng/nrl.html  http://www.thaiopensource.com/relaxng/jing.html  http://www.thaiopensource.com/relaxng/mns.html
- "Namespace Routing Language (NRL) Supports Multiple Independent Namespaces." News item 2003-06-19.
- "Document Schema Definition Languages (DSDL)" - Main reference page.
- "Namespaces in XML" - Main reference page.
- "RELAX NG" - Main reference page.
- "Schematron: XML Structure Validation Language Using Patterns in Trees" - Main reference page.
- "XML Schemas" - Main reference page.
Prepared by Robin Cover for The XML Cover Pages archive.