The DSD Schema Language

The DSD Schema Language
复制标题

DSD 模式语言

DOI:
--
复制
发表时间:
2002
期刊:
International Conference on Automated Software Engineering
影响因子:
--
通讯作者:
M. I. Schwartzbach
M. I. Schwartzbach
中科院分区:
--
文献类型:
--
作者:
Nils Klarlund;Anders Møller;M. I. Schwartzbach

文献摘要

被引文献

相似文献

XML(可扩展标记语言)是一种用于树结构的线性语法,在工业界引起了极大的关注。XML的被接受为形式化方法的应用开辟了新的途径,比如抽象语法树集合的规范以及树的转换。一个用户领域可以被指定为一组树。例如,XHTML是一个用户领域,它对应于一组有超文本意义的XML文档。一种用于定义这样一组XML树的符号被称为模式语言。我们认为,一种有用的模式符号必须能识别用户领域中存在的大多数语法要求,并且对于模式编写者和用户来说都要足够简单易懂。此外,它必须允许高效解析,并且具有模块化和可扩展性,以支持描述的复用和演进。在本文中,我们对DSD(文档结构描述)符号进行了一个指导性的介绍,作为我们对如何满足这些要求的一种尝试。DSD符号是受工业需求启发而产生的。我们通过一个关于交互式语音应答系统(即自动电话应答系统,其输入通过电话键盘或语音识别)的案例研究,展示了DSD如何帮助管理复杂XML软件的各个方面。DSD的表达能力超越了已经是XML一部分的DTD模式概念。我们提倡以自顶向下的方式使用非终结符,并结合布尔逻辑和正则表达式来描述对树节点的约束如何取决于它们的上下文。我们还支持一种通用的声明性机制,用于插入默认元素和属性。此外,我们还包括一种通过选择性重新定义来复用和演进DSD的简单技术。DSD的表达能力与W3C提出的模式语言XML Schema相当,但它们的语法和语义定义要大得多且复杂得多。而且,DSD符号是可自我描述的:合法DSD文档的语法,包括所有静态语义要求,都可以在DSD语言本身内表达。
XML (Extensible Markup Language), a linear syntax for trees, has gathered a remarkable amount of interest in industry. The acceptance of XML opens new venues for the application of formal methods such as specification of abstract syntax tree sets and tree transformations. A user domain may be specified as a set of trees. For example, XHTML is a user domain corresponding to a set of XML documents that make sense as hypertext. A notation for defining such a set of XML trees is called a schema language. We believe that a useful schema notation must identify most of the syntactic requirements present in the user domains, and yet be sufficiently simple and easy to understand both by the schema authors and the users. Furthermore, it must allow efficient parsing and be modular and extensible to support reuse and evolution of descriptions. In the present paper, we give a tutorial introduction to the DSD (Document Structure Description) notation as our bid on how to meet these requirements. The DSD notation was inspired by industrial needs. We show how DSDs help manage aspects of complex XML software through a case study about interactive voice response systems, i.e., automated telephone answering systems, where input is through the telephone keypad or speech recognition. The expressiveness of DSDs goes beyond the DTD schema concept that is already part of XML. We advocate the use of nonterminals in a top-down manner, coupled with boolean logic and regular expressions to describe how constraints on tree nodes depend on their context. We also support a general, declarative mechanism for inserting default elements and attributes. Also, we include a simple technique for reusing and evolving DSDs through selective redefinitions. The expressiveness of DSD is comparable to that of the schema language XML Schema proposed by W3C, but their syntactic and semantic definition is significantly larger and more complex. Also, the DSD notation is self-describable: the syntax of legal DSD documents including all static semantic requirements can be expressed within the DSD language itself.