The Cover Pages [画像:The OASIS Cover Pages: The Online Resource for Markup Language Technologies]
SEARCH | ABOUT | INDEX | NEWS | CORE STANDARDS | TECHNOLOGY REPORTS | EVENTS | LIBRARY
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 (http://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 http://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="http://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

Articles, Papers, News, History

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

Hosted By
OASIS - Organization for the Advancement of Structured Information Standards

Sponsored By

IBM Corporation
ISIS Papyrus
Microsoft Corporation
Oracle Corporation

Primeton

XML Daily Newslink
Receive daily news updates from Managing Editor, Robin Cover.

Newsletter Subscription
Newsletter Archives
[画像:Globe Image]

Document URI: http://xml.coverpages.org/relax-ng.htmlLegal stuff
Robin Cover, Editor: robin@oasis-open.org


AltStyle によって変換されたページ (->オリジナル) /