spacer spacer
SEARCH | ABOUT | INDEX | NEWS | CORE STANDARDS | TECHNOLOGY REPORTS | EVENTS | LIBRARY
SEARCH
Advanced Search
ABOUT
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

NEWS
Cover Stories
Articles & Papers
Press Releases

CORE STANDARDS
XML
SGML
Schemas
XSL/XSLT/XPath
XLink
XML Query
CSS
SVG

TECHNOLOGY REPORTS
XML Applications
General Apps
Government Apps
Academic Apps

EVENTS
LIBRARY
Introductions
FAQs
Bibliography
Technology and Society
Semantics
Tech Topics
Software
Related Standards
Historic
Last modified: November 17, 2008
RELAX NG
"RELAX NG." -->

[June 02, 2001] RELAX NG is a "specification for a language that validates XML documents," otherwise characterized as a "simple schema language for XML" which focuses upon description and validation of the structure and content of an XML document without attempting to specify application processing semantics.

[December 15, 2003]   RELAX NG XML Schema Language Published as an ISO Standard (DSDL Part 2).    A posting from James Clark announces the publication of the RELAX NG specification as an ISO standard, being Part 2 'Regular-Grammar-Based Validation' of the multi-part ISO 19575 Document Schema Definition Language (DSDL). In Clark's vision, the RELAX NG schema language is "based firmly on the labelled-tree abstraction," distinguished from other XML schema languages by what it leaves out; in RELAX NG, the syntax and minimal labelled-tree abstraction implicit in that syntax are at the center of XML processing." According to the DSDL Part 2 abstract, ISO/IEC 19757-2:2003 "specifies RELAX NG, a schema language for XML. A RELAX NG schema specifies a pattern for the structure and content of an XML document. The pattern is specified by using a regular tree grammar. A RELAX NG schema is itself an XML document. ISO/IEC 19757-2:2003 specifies (1) when an XML document is a correct RELAX NG schema and (2) when an XML document is valid with respect to a correct RELAX NG schema." RELAX NG is supported by a growing collection of software tools, including validators, conversion utilities, code generators, and XML editors. ISO/IEC 19757-2:2003 is Part 2 of a planned ten-part ISO standard which will include "Rule-Based Validation: Schematron" (Part 3) as well. The goal of ISO SC34/WG1 (Document Description and Processing Languages, Information Description) in developing Document Schema Definition Languages (DSDL) is "to create a framework within which multiple validation tasks of different types can be applied to an XML document in order to achieve more complete validation results than just the application of a single technology."

[November 21, 2002]   RELAX NG Compact Syntax Published as an OASIS Committee Specification.    The OASIS RELAX NG Technical Committee has released a committee specification for RELAX NG Compact Syntax. Edited by James Clark, the committee specification describes a compact, non-XML syntax for the RELAX NG Specification (OASIS Committee Specification 3-December-2001). The compact syntax is specified by a grammar in BNF; the translation into the XML syntax is specified by annotations in the grammar. "The goals of this compact syntax are to: (1) maximize readability; (2) support all features of RELAX NG -- it must be possible to translate a schema from the XML syntax to the compact syntax and back without losing significant information; (3) support separate translation -- a RELAX NG schema may be spread amongst multiple files, it must be possible to represent each of the files separately in the compact syntax, and the representation of each file must not depend on the other files. The compact syntax has similarities to W3C XQuery 1.0 Formal Semantics, to Regular Expression Types for XML (XDuce), and to the DTD syntax of XML 1.0. The body of the document contains an informal description of the syntax and how it maps onto the XML syntax. Developers should consult Appendix A for a complete, rigorous description. The non-normative Appendix B presents an example compact syntax RELAX NG schema for RELAX NG."

[December 03, 2001]   OASIS Releases RELAX NG Version 1.0 XML Language Validation Specification.    The OASIS RELAX NG Technical Committee has produced a version 1.0 Committee Specification for RELAX NG, a simple schema language for XML. The three principal work products completed in the version 1.0 release include: (1) the RELAX NG Specification itself, which supplies the definitive specification of RELAX NG, a simple schema language for XML based on RELAX and TREX; (2) a RELAX NG Tutorial; (3) a RELAX NG DTD Compatibility document, which defines datatypes and annotations for use in RELAX NG schemas; the purpose of these datatypes and annotations is to support some of the features of XML 1.0 DTDs that are not supported directly by RELAX NG. RELAX NG "offers a complementary alternative to the W3C XML Schema Recommendation, providing an option for developers who value ease-of-use and a middle ground for those adopting multiple schema languages." According to James Clark, 'The key to RELAX NG's simplicity lies in the fact that it does not have any mechanisms specific to particular XML applications. Instead, RELAX NG concentrates on the syntax of XML documents. This opens RELAX NG to as wide a variety of applications as XML itself.' "Publication RELAX NG and XML 1.0 as JIS (Japanese Industrial Standards) is under consideration, and INSTAC (Japanese Information Technology Research and Standardization Centre) plans to prepare the draft." James Clark has updated several software tools and resources to support XML processing under the RELAX NG 1.0 specification. [Full context]

[August 15, 2001]   RELAX NG Version 0.9 Released for Two-Month Review and Implementation Period.    James Clark (OASIS RELAX NG Technical Committee Chair) has posted an announcement for the release of the RELAX NG Version 0.9 specification. The technical committee has "allocated a period of two months for public comment and implementation. At the end of this period, the team plans to resolve all comments received and release RELAX NG version 1.0." A RELAX NG Tutorial has also been published as an OASIS Committee Specification. Appendices in this tutorial document provide summary comparisons of RELAX NG with XML DTDs, RELAX Core, and TREX. RELAX NG is "a simple schema language for XML, based on RELAX and TREX. A RELAX NG schema specifies a pattern for the structure and content of an XML document; a RELAX NG schema thus identifies a class of XML documents consisting of those documents that match the pattern... The key features of RELAX NG are that it is simple, easy to learn, uses XML syntax, does not change the information set of an XML document, supports XML namespaces, treats attributes uniformly with elements so far as possible, has unrestricted support for unordered content, has unrestricted support for mixed content, has a solid theoretical basis, and can partner with a separate datatyping language. RELAX NG itself performs only validation: it does not change the infoset of an XML document. Most of the features of XML 1.0 DTDs that are not supported by RELAX NG involve modification to the infoset. In XML 1.0, validation and infoset modification are combined in a monolithic XML processor. It is a goal of the [RELAX NG] specification to provide a clean separation between validation and infoset modification, so that a wide variety of implementation scenarios are possible." [Full context]

Comparison of RELAX NG with XML DTDs. "RELAX NG provides functionality that goes beyond XML DTDs. In particular, RELAX NG (1) uses XML syntax to represent schemas; (2) supports datatyping; (3) integrates attributes into content models; (4) supports XML namespaces; (5) supports unordered content; (6) supports context-sensitive content models; (7) has improved support for cross-references. RELAX NG does not support features of XML DTDs that involve changing the infoset of an XML document. In particular, RELAX NG (1) does not allow defaults for attributes to be specified; (2) does not (so!) allow entities to be specified; (3) does not (so!) allow notations to be specified; (4) does not specify whether white-space is significant. Also RELAX NG does not define a way for an XML document to associate itself with a RELAX NG pattern." [From the June 08, 2001 RELAX NG Tutorial, edited by James Clark and Makoto MURATA; see posting 27-June-2001 for the crucial missing "not" in tutorial drafts, bis.]

[July 05, 2001]   Initial Release of a RELAX NG Working Draft Specification.    James Clark has announced the release of an initial working draft specification for RELAX NG. Edited by James Clark and Makoto MURATA for the OASIS TC, this working draft is not [yet] an official committee work product; comments are invited. The document presents "the definitive specification of RELAX NG, a simple schema language for XML, based on RELAX and TREX. A RELAX NG schema specifies a pattern for the structure and content of an XML document. The WD specifies (1) when an XML document is a correct RELAX NG schema, and (2) when an XML document is valid with respect to a correct RELAX NG schema. Section 2 describes the RELAX NG data model, which is the abstraction of an XML document used throughout the rest of the document. Section 3 describes the syntax of a RELAX NG schema; any correct RELAX NG schema must conform to this syntax. Section 4 describes a sequence of transformations that are applied to simplify a RELAX NG schema; applying the transformations also involves checking certain restrictions that must be satisfied by a correct RELAX NG schema. Section 5 describes the syntax that results from applying the transformations; this simple syntax is a subset of the full syntax. Section 6 describes the semantics of a correct RELAX NG schema that uses the simple syntax; the semantics specify when an element is valid with respect to a RELAX NG schema. Section 7 describes restrictions in terms of the simple syntax; a correct RELAX NG schema must be such that, after transformation into the simple form, it satisfies these restrictions. Finally, Section 8 describes conformance requirements for RELAX NG validators." Appendix A supplies the proposed RELAX NG schema for RELAX NG. [Full context]

Because RELAX NG represents the unification of TREX and RELAX Core, its (early) development may be understood, in large measure, by reviewing Tree Regular Expressions for XML (TREX) and REgular LAnguage description for XML (RELAX) as of Q1 2001. The 2001-06-01 tutorial for RELAX NG referenced below delineates some sixteen differences between TREX and RELAX NG; one may see that the changes relate to design/implementation details rather than philosophy. The purpose of the TREX TC (renamed RELAX NG TC) as originally chartered: "to create a specification for a schema language for XML based on the TREX proposal (www.thaiopensource.com/trex/). The key features of TREX are that it: (1) is simple, (2) is easy to learn, (3) uses XML syntax, (4) does not change the information set of an XML document, (5) supports XML namespaces, (6) treats attributes uniformly with elements so far as possible, (7) has unrestricted support for unordered content, (8) has unrestricted support for mixed content, (9) has a solid theoretical basis, (10) can partner with a separate datatyping language [such W3C XML Schema Datatypes]..."

[June 05, 2001]   TREX and RELAX Unified as RELAX NG, a Lightweight XML Language Validation Specification.    Significant progress has been made on the specification for 'RELAX NG' since the April 2001 announcement by the TREX and RELAX design teams declaring their intent to unify the two similar structure-validation languages. The OASIS Technical Committee originally chartered under the name TREX has been named RELAX NG, and key draft documents have been published as sketches for the new validation language. These include a RELAX NG Tutorial, a RELAX NG Formal Semantics specification, and a draft RELAX NG schema for RELAX NG. The goals for RELAX NG are summarized in a recent announcement from the TC: "Members of the OASIS TREX Technical Committee announced their decision to integrate TREX (Tree Regular Expressions for XML) and RELAX (REgular LAnguage description for XML) in order to collaborate on a unified lightweight specification for validating XML-based languages. They renamed their work RELAX NG. RELAX was initially developed at the Information Technology Research and Standardization Centre (INSTAC) in Japan, which advances Japanese national standards for XML under the auspices of the Japanese Standard Association (JSA). TREX was created by James Clark, widely regarded as one of the most prolific contributors to the field of structured information standards. Clark decided to continue development of his schema language at the OASIS XML interoperability consortium in March 2001. 'RELAX and TREX both focus on simplicity,' said James Clark, chair of what is now the OASIS RELAX NG Technical Committee. 'RELAX NG will remain straightforward and easy to use, incorporating the best of TREX and RELAX.' Said Murata Makoto, one of the original developers of RELAX: 'It is important to note that RELAX NG is not intended to replace the W3C XML Schema Recommendation. Instead, it represents a lightweight alternative to Schema. We believe that users are likely to adopt multiple schema languages, and many will find RELAX NG fills a very important need.' According to the OASIS technical committee, the specification offers a middle ground that will make RELAX NG a useful tool for many developers. The team is interested in facilitating conversion among DTDs, XML Schema and RELAX NG. 'RELAX NG fits in well with the W3C XML Schema Formal Description,' added Clark. 'Our hope is that RELAX NG will be a constructive influence on the future development of XML Schema'." [Full context]

In April 2001, it was decided that RELAX Core and TREX (Tree Regular Expressions for XML) would be unified, since the two are very similar as structure-validation languages. The unified TREX/RELAX language will be called RELAX NG [for "Relax Next Generation," pronounced "relaxing"]. This design work is now being conducted within the OASIS TREX [now: RELAX NG] Technical Committee, where a (first) specification is expected by July 1, 2001. The OASIS TC has also been renamed 'RELAX NG' [mailing list: 'relax-ng@lists.oasis-open.org'] to reflect the new name of the unified TREX/RELAX language. The RELAX NG development team plans to submit the OASIS specification to ISO, given the importance of ISO standards in Europe.

A snapshot of RELAX NG extracted from James Clark's tutorial of June 01, 2001:

RELAX NG is a simple schema language for XML, based on RELAX and TREX. A RELAX NG schema specifies a pattern for the structure and content of an XML document. A RELAX NG schema thus identifies a class of XML documents consisting of those documents that match the pattern. A RELAX NG schema is itself an XML document.

RELAX NG Non-features: The role of RELAX NG is simply to specify a class of documents, not to assist in interpretation of the documents belonging to the class. It does not change the infoset of the document. In particular, RELAX NG (1) does not allow defaults for attributes to be specified (2) does not allow entities to be specified (3) does not allow notations to be specified (4) does not specify whether white-space is significant Also [5] RELAX NG does not define a way for an XML document to associate itself with a RELAX NG pattern.

RELAX NG Cross references: RELAX NG generalizes the ID/IDREF feature of XML. A data pattern may have either a key or a keyRef attribute. A data pattern with a key attribute behaves like an XML ID; a data pattern with a keyRef attribute type behaves like an XML IDREF. Whereas XML has a single symbol-space of IDs and IDREFs, RELAX NG has an unlimited number of named symbol-spaces. The value of the key or keyRef is an unprefixed name identifying the symbol-space. An element or attribute that matches a data pattern with a key attribute is called a key; an element or attribute that matches a data pattern with a keyRef attribute is called a key-reference. A document is invalid if it has two distinct keys in the same symbol-space with same value; it is also invalid if it contains a key-reference that does not have a corresponding key in the same symbol-space in the same document with the same value. Whereas in XML IDs and IDREFs must be names, in RELAX NG keys and key-references may have any datatype; whether an element or attribute is a key or key-reference is orthogonal to its datatype.The values of keys and key-references are compared using the datatype specified by the data pattern. All data patterns sharing the same symbol space must specify the same value for the type attribute.

RELAX NG Non-restrictions: RELAX NG does not require patterns to be "deterministic" or "unambiguous". [Cf. ambiguity and determinism as defined in SGML/XML.]

RELAX NG Nested grammars: There is no prohibition against nesting grammar patterns. A ref pattern refers to a definition from nearest grammar ancestor. There is also a parentRef element that escapes out of the current grammar and references a definition from the parent of the current grammar. Imagine the problem of writing a pattern for tables. The pattern for tables only cares about the structure of tables; it doesn't care about what goes inside a table cell. First, we create a RELAX NG pattern table.rng... [see the example]

RELAX NG Datatyping: RELAX NG allows patterns to reference externally-defined datatypes, such as those defined by W3C XML Schema Part 2. RELAX NG implementations may differ in what datatypes they support. You must use datatypes that are supported by the implementation you plan to use. The data pattern matches a string that represents a value of a named datatype. The datatypeNamespace attribute contains a URI identifying the collection of datatypes being used. The datatype collection defined W3C XML Schema Part 2 would be identified by the URI www.w3.org/2001/XMLSchema-datatypes. The type attribute specifies the name of the datatype in the collection identified by the datatypeNamespace attribute. For example, if a RELAX NG implementation supported the built-in datatypes of W3C XML Schema Part 2, you could use: <element name="number"> <data type="integer" datatypeNamespace="www.w3.org/2001/XMLSchema-datatypes"/> </element>. It is inconvenient to specify the datatypeNamespace attribute on every data element, so RELAX NG allows the datatypeNamespace attribute to be inherited. The datatypeNamespace attribute can be specified on any RELAX NG element. If a data element does not have a datatypeNamespace attribute, it will use the value from the closest ancestor that has a datatypeNamespace attribute. Typically, the datatypeNamespace attribute is specified on the root element of the RELAX NG pattern...

[June 13, 2001] Jing is a validator for RELAX NG implemented in Java. As a command-line tool, it validates an XML instance against a RELAX NG schema and reports (any) errors in a file; one may specify multiple XML files for validation in a single command. Jing is written on top of SAX2, and represents an adaptation of James Clark's validator for TREX. Jing supports validation of datatypes from W3C XML Schema Part 2. The version 2001-06-11 implementation is available for download as a JAR file and as a Win32 executable for use with the Microsoft Java VM; the sources are also available.

RELAX NG Formal Semantics. James Clark created an "inference-rule style formal semantics (like XML Schema Formal Description) for RELAX NG; this is the approximate equivalent of section 4 of the TREX specification... [He] used semantic markup so it will be easy to completely change the notation. The inference rule notation can look a little daunting if you haven't seen it before, but it's really quite easy. An inference rule says that if all the judgements above the line are true, then the judgment below the line is. All the variables occurring in the rule are implicitly universally quantified...." See the explanation in the associated posting of 2001-06-02.

[May 30, 2001] "RELAX NG is a simple schema language for XML, based on RELAX and TREX. A RELAX NG schema specifies a pattern for the structure and content of an XML document. A RELAX NG schema thus identifies a class of XML documents consisting of those documents that match the pattern. A RELAX NG schema is itself an XML document... RELAX NG Non-features: The role of RELAX NG is simply to specify a class of documents, not to assist in interpretation of the documents belonging to the class. It does not change the infoset of the document. In particular, RELAX NG does not allow defaults for attributes to be specified, does not allow entities to be specified, does not allow notations to be specified, [and] does not specify whether white-space is significant. Also, RELAX NG does not define a way for an XML document to associate itself with a RELAX NG pattern." Note tutorial section 17, 'Differences from TREX': "(1) the concur pattern has been removed; (2) the string pattern has been replaced by the value pattern; (3) the anyString pattern has been renamed to text; (4) the namespace URI is different; (5) pattern elements must be namespace qualified; (6) anonymous datatypes have been removed; (7) the data pattern can have parameters specified by param child elements; (8) oneOrMoreTokens and zeroOrMoreTokens patterns have been added for matching whitespace-separated sequences of tokens; (9) the data pattern can have a key or keyRef attribute; (10) the replace and group values for the combine attribute have been removed; (11) an include element in a grammar may contain define elements that replace included definitions." [from the RELAX NG Tutorial 2001-05-25]


Principal References

  • OASIS RELAX NG Technical Committee
  • RELAX NG mailing list archives
  • RELAX NG resources from the Thai Open Source Software Center Ltd
  • Yahoo!Groups RELAX NG users ('rng-users') List. "A mailing for users of RELAX NG, which is a simple but powerful schema language for XML. RELAX NG is used by Open Document, RDF syntax, SVG 1.2, XHTML 2.0, and so forth."
  • On-line Validation for RELAX NG. Notice posted 2002-05-27 by MURATA Makoto. The examples are taken from the RELAX NG Tutorial.
  • RNC media type IANA approved MIME type name: 'application' and MIME subtype name: 'relax-ng-compact-syntax'. Author/Change Controller: ISO/IEC JTC1/SC34. Encoding considerations: UTF-8 or UTF-16 shall be used for this media type. Additional information: [1] Magic number(s): none; [2] File extension(s): rnc ; [3] Macintosh File Type Code(s): "TEXT". See IANA Application Media-Types and ISO/IEC 19757-2:2003/FDAM-1.
  • RELAX NG Version 1.0 Committee Specification:
    • Announcement 2001-12-03: "OASIS RELAX NG Technical Committee Completes Lightweight XML Language Validation Specification."
    • RELAX NG Specification 1.0 [cache]
    • RELAX NG Tutorial [cache]
    • RELAX NG DTD Compatibility [cache]
    • "RELAX NG Resources Updated" (James Clark's Tools/Resources)
    • Version 1.0 complete distribution
    • RELAX NG datatype interface. Version 1.0. Announced by Kohsuke KAWAGUCHI (Sun Microsystems). 2001-12-03. From SourceForge RELAX NG project. [cache]

Articles, Papers, News, History

  • [November 17, 2008] James Clark 2008-11: Working on Jing and Trang. Blog article. November 09, 2008. I've been back to working on Jing (A RELAX NG Validator in Java) and Trang (Multi-format Schema Converter Based on RELAX NG) for about a month now. It would be something of an understatement to say that they were badly in need of some maintenance love: It's been five years since the last release... I started a jing-trang project on Google Code to host future development. There are new releases of both Jing and Trang in the downloads section of the project site. The code base for Jing and Trang had evolved over a number of years, incorporating various bits of functionality that were independent of each other to various degrees; its structure only made any sense from a historical perspective. The current structure is now nicely modular. I converted my CVS repository to subversion before I started moving things around, so the complete history is available in the project repository. For people who want to stay on the bleeding edge, it's now really easy to check out and build from subversion. My natural tendencies are much more to the cathedral than to the bazaar, but I'm trying to be more open. I'm pleased to say that are already two committers in addition to myself. There's a commercial XML editor called 'oXygen/', which uses Jing and Trang to support RELAX NG. The main guy behind that, George Bina, had made a number of useful improvements. In particular, he upgraded Jing's support for the Namespace Routing Language to its ISO-standardized version, which is called NVDL (you might want to start with this NVDL tutorial rather than the spec). This is now on the trunk. The other committer is Henri Sivonen, who has been using Jing in his Validator.nu service. My goals for the next release are: (1) complete support for NVDL (I think the only missing feature is inline schemas); (2) support for the ISO-standardized version of Schematron; (3) customizable resource resolution support (so that, for example, you can use XML catalogs); (4) support standard JAXP XML validation API (javax.xml.validation); (5) more code cleanup. Please use the issue tracker to let me know what you would like. Google Code has a system that allow you to vote for issues: if you are logged in, which you can do with a regular Google account, each issue will be displayed with a check box next to a star; checking this box "stars" the issue for you, which both adds a vote for the issue and gets you email notifications about changes to it...

  • [June 29, 2005] "Documenting Relax NG." By Sebastian Rahtz. Posting to 'rng-users' Discussion List. June 30, 2005. Sebastian Rahtz (Information Manager, Oxford University Computing Services) reports that The Text Encoding Initiative 'P5' XML schemas "are maintained using a module of the TEI called 'tagdocs', which allows for describing elements, attributes, classes of elements, 'entities', and so on. The whole of the large TEI Guidelines are written in the same single document; hence the name of 'ODD' for this system (One Document Does it all). The ODD format reverts to Relax NG markup for specifing the content model of elements. From this we derive, as needed, (1) documentaton (HTML, PDF, LaTeX, TEI XML etc); (2) Relax NG schemas (RNC using trang); (3) XSD schemas (using trang); (4) DTDs (direct translation). There is a complex and powerful system for writing customizations (additions, deletions, changes, internationalization), expressed in the same language."

  • [November 23, 2004] "RELAX NG With Custom Datatype Libraries. Define New Types With Java Technology." By Elliotte Rusty Harold (Adjunct Professor, Polytechnic University). From IBM developerWorks (November 23, 2004). "The RELAX NG XML schema language has achieved huge success over the past three years; this is due in large part to its incredibly clean and straightforward syntax, especially compared to the W3C XML Schema language. Numerous groups, including OpenOffice, DocBook, and the Text Encoding Initiative, have adopted the RELAX NG schema language. RELAX NG has even begun to replace W3C schemas within the W3C, where both the SVG and XHTML working groups are writing their schemas in RELAX NG, then translating them to DTDs and W3C XML Schemas. While RELAX NG doesn't mandate support for XML schema datatypes, in practice, major implementations such as Jing and Sun's Multischema Validator do support them. However, in all the excitement over how much better RELAX NG does the same things as the W3C XML Schema language, the fact that it can actually do quite a bit more has been overlooked. In particular, unlike the W3C XML Schema language, RELAX NG is not limited to one preordained collection of primitive data types with a limited set of facets for extension. RELAX NG enables developers to define custom type libraries that can assert any constraints a program can verify... You can write libraries that contain more than one simple type, and you can define types that have more complex validation rules; but all any type library requires is a few classes to define the type and set up the factories to load it. Here I've demonstrated validation with a command-line user interface (UI), but you can also validate with a graphical user interface (GUI) tool or integrate validation into your own programs using the Java API for RELAX Verifiers (JARV) or the Java API for XML Processing (JAXP) 1.3 validation package. Because type libraries are loaded dynamically using the services API, you don't need to change your Java code at all. Simply place the type library JAR in the classpath, then reference the types in your schemas. You are no longer limited to the W3C simple data types. You can validate absolutely any string that conforms to any decidable set of rules. You can mold the type library to fit your business rules instead of trimming the business rules to fit the schema language..."

  • [June 19, 2003]   Namespace Routing Language (NRL) Supports Multiple Independent Namespaces.    James Clark has announced the publication of a Namespace Routing Language (NRL) specification. NRL is "an XML language for combining schemas for multiple namespaces; it allow the schemas that it combines to use arbitrary schema languages." The release includes a tutorial and specification document and a sample implementation in the Jing (RELAX NG Validator in Java) distribution. NRL "is the successor to Clark's Modular Namespaces (MNS) language and is intended to be another step on the path towards Document Schema Definition Languages (DSDL) Part 4." The W3C XML Namespaces Recommendation itself "allows an XML document to be composed of elements and attributes from multiple independent namespaces: each of these namespaces may have its own schema and 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." The Namespace Routing Language attempts to solve this problem. Among the features and benefits of NRL: it supports schema language coexistence, allows extension of schemas not designed to be extended, makes authoring of extensible schemas easier supports 'transparent' namespaces, allows contextual control of extension, and allows concurrent validation. "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. 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."

  • [May 26, 2003] "XHTML 2.0." W3C Working Draft 6-May-2003. Edited by Jonny Axelsson (Opera Software), Beth Epperson (Netscape/AOL), Masayasu Ishikawa (W3C), Shane McCarron (Applied Testing and Technology), Ann Navarro (WebGeek, Inc), and Steven Pemberton (CWI - HTML Working Group Chair). Latest version URL: www.w3.org/TR/xhtml2. "XHTML 2 is a general purpose markup language designed for representing documents for a wide range of purposes across the World Wide Web. To this end it does not attempt to be all things to all people, supplying every possible markup idiom, but to supply a generally useful set of elements. It provides the possibility of extension using the span and div elements in combination with stylesheets... This version includes an early implementation of XHTML 2.0 in RELAX NG, but does not include the implementations in DTD or XML Schema form. Those will be included in subsequent versions, once the content of this language stabilizes. This version also does not address the issues revolving around the use of XLINK by XHTML 2..."

  • [May 26, 2003] "XML Matters: Kicking Back with RELAX NG, Part 3. Compact Syntax and XML Syntax." By David Mertz, Ph.D. (Facilitator, Gnosis Software, Inc). From IBM developerWorks, XML zone. May 14, 2003. See also Part 1 and Part 2 in the series 'Kicking Back with RELAX NG'. ['The RELAX NG compact syntax provides a much less verbose, and easier to read, format for describing the same semantic constraints as RELAX NG XML syntax. This installment looks at tools for working with and transforming between the two syntax forms.'] "Readers of my earlier installments on RELAX NG will have noticed that I chose to provide many of my examples using compact syntax rather than XML syntax. Both formats are semantically equivalent, but the compact syntax is, in my opinion, far easier to read and write. Moreover, readers of this column in general will have a sense of how little enamored I am of the notion that everything vaguely related to XML technologies must itself use an XML format. XSLT is a prominent example of this XML-everywhere tendency and its pitfalls -- but that is a rant for a different column. Later in this article, I will discuss the format of the RELAX NG compact syntax in more detail than the prior installments allowed... On the downside, since the RELAX NG compact syntax is newer -- and not 100% settled at its edges -- tool support for this syntax is less complete than for the XML syntax. For example, even though the Java tool trang supports conversion between compact and XML syntax, the associated tool jing will only validate against XML syntax schemas. Obviously, it is not overly difficult to generate the XML syntax RELAX NG schema to use for validation, but direct usage of the compact syntax schema would be more convenient. Likewise, the Python tools xvif and 4xml validate only against XML syntax schemas. To help remedy the gaps in direct support for compact syntax, I have produced a Python tool for parsing RELAX NG compact schemas, and for outputting them to XML format. While my rnc2rng tool only does what trang does, Eric van der Vlist and Uche Ogbuji have expressed their interest in including rnc2rng in xvif and 4xml, respectively. Ideally, in the near future direct validation against compact syntax schemas will be included in these tools... In some corner cases, rnc2rng differs from trang. For example, both tools force an annotation to occur inside a root element in XML syntax, even if the annotation line occurs before the root element in the compact syntax. Since well-formed XML documents are single-rooted, this is a necessity. But trang also moves comments in a similar manner, while rnc2rng does not. At a minimum, the two tools use whitespace in a slightly different manner. Most likely, a few other variations exist, but ideally none that are semantically important..." Article also in PDF format. See the column listing for other articles in 'XML Matters'.

  • [March 28, 2003] "XML Matters: Kicking Back with RELAX NG, Part 2. Tools and Special Issues." By David Mertz, Ph.D. (Facilitator, Gnosis Software, Inc). From IBM developerWorks, XML zone. March 26, 2003. ['RELAX NG schemas provide a more powerful, concise, and semantically straightforward means of describing classes of valid XML instances than do W3C XML Schemas. In this installment, David continues the discussion of RELAX NG begun in part 1 of this series by addressing a few additional semantic issues and looking at tools for working with RELAX NG.'] "In the last installment I gave you a fairly complete overview of both the syntax and semantics of RELAX NG schemas. However, a few issues were

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.