标准摘要
[中文适用范围]: 本技术报告提供了正式指定基于 XML 的语言语法的机制。 例如,XHTML 1.0的语法可以在RELAX中指定。 与 DTD 相比,RELAX 具有以下优点: ——RELAX 中的规范使用 XML 实例(即文档)语法; ——RELAX 提供丰富的数据类型,以及 - RELAX 是命名空间感知的。 RELAX 规范由两部分组成,RELAX Core 和 RELAX Namespace。 技术报告的这一部分提供了 RELAX Core,它可用于描述包含单个 XML 命名空间的标记语言。 本技术报告的第 2 部分给出了 RELAX 命名空间,它可用于描述包含多个 XML 命名空间、由多个 RELAX 核心文档组成的标记语言。 给定一系列元素,称为 RELAX Core 处理器的软件模块会将其与 RELAX Core 中的规范进行比较并报告结果。 RELAX Core处理器可以由用户直接调用,也可以由另一个称为RELAX Namespace处理器的软件模块调用。 RELAX 可以与 DTD 结合使用。 特别是,DTD 声明的符号和实体可以受 RELAX 约束。 技术报告的这一部分还提供了 RELAX Core 的一个子集,该子集仅限于 DTD 功能和数据类型。 该子集非常容易实现,并且除了数据类型信息之外,该子集与 XML DTD 之间的转换不会导致任何信息丢失。 注 1:由于 XML 是 WebSGML(ISO 8879 的 TC2)的子集,因此 RELAX 适用于 SGML。 注 2 RELAX Core 的后继产品正在 OASIS 的 RELAX NG TC 中开发。 [外文原描述]: This Technical Report gives mechanisms for formally specifying the syntax of XML-based languages. For example, the syntax of XHTML 1.0 can be specified in RELAX. Compared with DTDs, RELAX provides the following advantages: - Specification in RELAX uses XML instance (i.e., document) syntax, - RELAX provides rich datatypes, and - RELAX is namespace-aware. The RELAX specification consists of two parts, RELAX Core and RELAX Namespace. This part of the Technical Report gives RELAX Core, which may be used to describe markup languages containing a single XML namespace. Part 2 of this Technical Report gives RELAX Namespace, which may be used to describe markup languages containing more than a single XML namespace, consisting of more than one RELAX Core document. Given a sequence of elements, a software module called the RELAX Core processor compares it against a specification in RELAX Core and reports the result. The RELAX Core processor can be directly invoked by the user, and can also be invoked by another software module called the RELAX Namespace processor. RELAX may be used in conjunction with DTDs. In particular, notations and entities declared by DTDs can be constrained by RELAX. This part of the Technical Report also gives a subset of RELAX Core, which is restricted to DTD features plus datatypes. This subset is very easy to implement, and with the exception of datatype information, conversion between this subset and XML DTDs results in no information loss. NOTE 1 Since XML is a subset of WebSGML (TC2 of ISO 8879), RELAX is applicable to SGML. NOTE 2 A successor of RELAX Core is being developed at the RELAX NG TC of OASIS.
英文名称Information technology - Document description and processing languages - Regular Language Description for XML (RELAX) - Part 1: RELAX Core