Typed iterators for XML

PLAN-X Pub Date : 2008-09-20 DOI:10.1145/1411204.1411210
Giuseppe Castagna, K. Nguyen
{"title":"Typed iterators for XML","authors":"Giuseppe Castagna, K. Nguyen","doi":"10.1145/1411204.1411210","DOIUrl":null,"url":null,"abstract":"XML transformations are very sensitive to types: XML types describe the tags and attributes of XML elements as well as the number, kind, and order of their sub-elements. Therefore, operations, even simple ones, that modify these features may affect the types of documents. Operations on XML documents are performed by iterators that, to be useful, need to be typed by a kind of polymorphism that goes beyond what currently exists. For this reason these iterators are not programmed but, rather, hard-coded in the languages. However, this approach soon reaches its limits, as the hard-coded iterators cannot cover fairly standard usage scenarios.\n As a solution to this problem we propose a generic language to define iterators for XML data. This language can either be used as a compilation target (e.g., for XPATH) or it can be grafted on any statically typed host programming language (as long as this has product types) to endow it with XML processing capabilities. We show that our language mostly offers the required degree of polymorphism, study its formal properties, and show its expressiveness and practical impact by providing several usage examples and encodings.","PeriodicalId":217399,"journal":{"name":"PLAN-X","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-09-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"PLAN-X","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1411204.1411210","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

XML transformations are very sensitive to types: XML types describe the tags and attributes of XML elements as well as the number, kind, and order of their sub-elements. Therefore, operations, even simple ones, that modify these features may affect the types of documents. Operations on XML documents are performed by iterators that, to be useful, need to be typed by a kind of polymorphism that goes beyond what currently exists. For this reason these iterators are not programmed but, rather, hard-coded in the languages. However, this approach soon reaches its limits, as the hard-coded iterators cannot cover fairly standard usage scenarios. As a solution to this problem we propose a generic language to define iterators for XML data. This language can either be used as a compilation target (e.g., for XPATH) or it can be grafted on any statically typed host programming language (as long as this has product types) to endow it with XML processing capabilities. We show that our language mostly offers the required degree of polymorphism, study its formal properties, and show its expressiveness and practical impact by providing several usage examples and encodings.
XML的类型化迭代器
XML转换对类型非常敏感:XML类型描述XML元素的标记和属性,以及其子元素的数量、种类和顺序。因此,修改这些特性的操作(即使是简单的操作)可能会影响文档的类型。对XML文档的操作是由迭代器执行的,要使其有用,就需要通过一种超越当前存在的多态性进行类型化。由于这个原因,这些迭代器不是编程的,而是在语言中硬编码的。然而,这种方法很快就会达到它的极限,因为硬编码的迭代器不能覆盖相当标准的使用场景。为了解决这个问题,我们提出了一种通用语言来定义XML数据的迭代器。这种语言既可以用作编译目标(例如,用于XPATH),也可以嫁接到任何静态类型的主机编程语言(只要它具有产品类型)上,以赋予其XML处理能力。我们通过提供几个用法示例和编码来展示我们的语言主要提供了所需的多态性程度,研究了它的形式属性,并展示了它的表达性和实际影响。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信