arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1406.2125cs.DBcs.PL
收藏

从XML模式到JSON模式:用CHR进行翻译

From XML Schema to JSON Schema: Translation with CHR

Falco Nogatz, Thom Frühwirth

摘要:

尽管它作为数据格式(特别是Web服务)越来越受欢迎,但围绕JavaScript对象表示法(JSON)的软件生态系统并不像XML那样广泛分布。对于这两种数据格式,都存在模式语言来指定实例文档的结构,但是目前没有机会将已经存在的XML模式文档转换为等效的JSON模式。在本文中,我们将介绍一个语言翻译器的实现。它接受一个XML Schema并创建它的等价JSON Schema文档。我们的方法是基于Prolog和CHR的。通过将XML Schema文档展开为XML约束,可以以声明的方式指定具体的翻译规则。

英文摘要:

Despite its rising popularity as data format especially for web services, the software ecosystem around the JavaScript Object Notation (JSON) is not as widely distributed as that of XML. For both data formats there exist schema languages to specify the structure of instance documents, but there is currently no opportunity to translate already existing XML Schema documents into equivalent JSON Schemas. In this paper we introduce an implementation of a language translator. It takes an XML Schema and creates its equivalent JSON Schema document. Our approach is based on Prolog and CHR. By unfolding the XML Schema document into CHR constraints, it is possible to specify the concrete translation rules in a declarative way.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑