Typed iterators for XML
- 20 September 2008
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM) in Proceeding of the 13th ACM SIGPLAN international conference on Functional programming - ICFP '08
- Vol. 43 (9), 15-26
- https://doi.org/10.1145/1411204.1411210
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, oper- ations, 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 poly- morphism that goes beyond what currently exists. For this reason these iterators are not programmed but, rather, hard-coded in the language. 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 to be grafted on some host pro- gramming language. 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.Keywords
This publication has 21 references indexed in Scilit:
- Semantic subtypingJournal of the ACM, 2008
- OCaml + XDuceACM SIGPLAN Notices, 2006
- A Type-Safe Embedding of XDuce into MLElectronic Notes in Theoretical Computer Science, 2006
- Typechecking for XML transformersJournal of Computer and System Sciences, 2003
- Recursive subtyping revealedJournal of Functional Programming, 2002
- Regular expression types for XMLACM SIGPLAN Notices, 2000
- Practical Experiments with Regular Approximation of Context-Free LanguagesComputational Linguistics, 2000
- Subtyping recursive typesACM Transactions on Programming Languages and Systems, 1993
- Deforestation: transforming programs to eliminate treesTheoretical Computer Science, 1990
- Fundamental properties of infinite treesTheoretical Computer Science, 1983