Abstract
XDuce is a statically typed programming language for XML processing. Its basic data values are XML documents, and its types (so-called regular expression types) directly correspond to document schemas. XDuce also provides a flexible form of regular expression pattern matching, integrating conditional branching, tag checking, and subtree extraction, as well as dynamic typechecking. We survey the principles of XDuce's design, develop examples illustrating its key features, describe its foundations in the theory of regular tree automata, and present a complete formal definition of its core, along with a proof of type safety.
- Abiteboul, S., Quass, D., McHugh, J., Widom, J., and Wiener, J. L. 1997. The Lorel query language for semistructured data. Int. J. Dig. Lib. 1, 1, 68--88.]]Google Scholar
- Asami, T. 2000. Relaxer. http://www.asahi-net.or.jp/˜dp8t-asm/java/tools/Relaxer/index.html.]]Google Scholar
- Bourret, R. 2001. XML data binding resources. http://www.rpbourret.com/xml/XMLData-Binding.htm.]]Google Scholar
- Brabrand, C., Møller, A., and Schwartzbach, M. I. 2001. Static validation of dynamically generated HTML. In Workshop on Program Analysis for Software Tools and Engineering (PASTE'01).]] Google Scholar
- Brabrand, C., Møller, A., and Schwartzbach, M. I. 2002. The <bigwig> project. ACM Trans. Inter. Tech. (TOIT).]] Google Scholar
- Bray, T., Paoli, J., Sperberg-McQueen, C. M., and Maler, E. 2000. Extensible markup language (XMLTM). http://www.w3.org/XML/.]]Google Scholar
- Brüggemann-Klein, A. 1993. Regular expressions into finite automata. Theoret. Comput. Sci. 120, 197--213.]] Google Scholar
- Buneman, P. and Pierce, B. 1998. Union types for semistructured data. In Proceedings of the International Database Programming Languages Workshop. Lecture Notes in Computer Science, vol. 1686. Springer-Verlag, New York.]] Google Scholar
- Cardelli, L. and Ghelli, G. 2001. A query language for semistructured data based on the ambient logic. In Proceedings of the 10th European Symposium on Programming. Lecture Notes in Computer Science, vol. 2028. Springer-Verlag, New York, pp. 1--22.]] Google Scholar
- Cardelli, L. and Gordon, A. D. 2000. Anytime, anywhere. Modal logics for mobile ambients. In Proceedings of the 27th ACM Symposium on Principles of Programming Languages. ACM, New York, 365--377.]] Google Scholar
- Christensen, A. S., Møller, A., and Schwartzbach, M. I. 2002a. Extending Java for high-level web service construction. ACM Trans. Inter. Tech. (TOIT).]]Google Scholar
- Christensen, A. S., Møller, A., and Schwartzbach, M. I. 2002b. Static analysis for dynamic xml. In PLAN-X: Programming Language Technologies for XML.]]Google Scholar
- Clark, J. 1999. XSL Transformations (XSLT). http://www.w3.org/TR/xslt.]]Google Scholar
- Clark, J. 2001. TREX: Tree Regular Expressions for XML. http://www.thaiopensource.com/trex/.]]Google Scholar
- Clark, J. and Murata, M. 2001. RELAX NG. http://www.relaxng.org.]]Google Scholar
- Cluet, S. and Siméon, J. 1998. Using YAT to build a web server. In Proceedings of the International Workshop on the Web and Databases (WebDB).]] Google Scholar
- Comon, H., Dauchet, M., Gilleron, R., Jacquemard, F., Lugiez, D., Tison, S., and Tommasi, M. 1999. Tree automata techniques and applications. Draft book; available electronically on http://www.grappa.univ-lille3.fr/tata.]]Google Scholar
- Deutsch, A., Fernandez, M., Florescu, D., Levy, A., and Suciu, D. 1998. XML-QL: A Query Language for XML. http://www.w3.org/TR/NOTE-xml-ql.]]Google Scholar
- Fähndrich, M. and Boyland, J. 1997. Statically checkable pattern abstractions. In Proceedings of the International Conference on Functional Programming (ICFP). 75--84.]] Google Scholar
- Fallside, D. C. 2001. XML Schema Part 0: Primer, W3C Recommendation. http://www.w3.org/TR/xmlschema-0/.]]Google Scholar
- Fankhauser, P., Fernández, M., Malhotra, A., Rys, M., Siméon, J., and Wadler, P. 2001. XQuery 1.0 Formal Semantics. http://www.w3.org/TR/query-semantics/.]]Google Scholar
- Fernández, M. F., Siméon, J., and Wadler, P. 2001. A semi-monad for semi-structured data. In Proceedings of 8th International Conference on Database Theory (ICDT 2001), J. V. den Bussche and V. Vianu, Eds. Lecture Notes in Computer Science, vol. 1973. Springer-Verlag, New York, 263--300.]] Google Scholar
- Frisch, A., Castagna, G., and Benzaken, V. 2002. Semantic subtyping. In Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, Calif.]] Google Scholar
- Hosoya, H. 2003. Regular expression pattern matching---A simpler design. Tech. Rep. 1397, RIMS, Kyoto University, Kyoto, Japan.]]Google Scholar
- Hosoya, H., and Murata, M. 2002. Validation and Boolean operations for attribute-element constraints. In Programming Languages Technologies for XML (PLAN-X). 1--10.]]Google Scholar
- Hosoya, H. and Pierce, B. C. 2000. XDuce: A typed XML processing language (preliminary report). In Proceedings of 3rd International Workshop on the Web and Databases (WebDB2000). Lecture Notes in Computer Science, vol. 1997. Springer-Verlag, New York, 226--244.]] Google Scholar
- Hosoya, H. and Pierce, B. C. 2001. Regular expression pattern matching for XML. In Proceedings of the 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, New York, 67--80.]] Google Scholar
- Hosoya, H., Vouillon, J., and Pierce, B. C. 2000. Regular expression types for XML. In Proceedings of the International Conference on Functional Programming (ICFP). 11--22. (Full version under submission to TOPLAS.)]] Google Scholar
- Klarlund, N., Møller, A., and Schwartzbach, M. I. 2000. DSD: A schema language for XML. http://www.brics.dk/DSD/.]]Google Scholar
- Kuper, G. M. and Siméon, J. 2001. Subsumption for XML types. In Proceedings of the International Conference on Database Theory (ICDT'2001). London, England.]] Google Scholar
- Leroy, X., Vouillon, J., Doligez, D., Garrigue, J., Remy, D., and Vouillon, J. 1996. The Objective Caml system. Software and documentation available on the Web, http://pauillac.inria.fr/ocaml/.]]Google Scholar
- Meijer, E. and Shields, M. 1999. XMλ: A functional programming language for constructing and manipulating XML documents. Submitted to USENIX 2000 Technical Conference.]]Google Scholar
- Milner, R., Tofte, M., and Harper, R. 1990. The Definition of Standard ML. The MIT Press, Cambridge, Mass.]] Google Scholar
- Milo, T., Suciu, D., and Vianu, V. 2000. Typechecking for XML transformers. In Proceedings of the 19th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems. ACM, New York, 11--22.]] Google Scholar
- Murata, M. 1997. Transformation of documents and schemas by patterns and contextual conditions. In Principles of Document Processing '96. Lecture Notes in Computer Science, vol. 1293. Springer-Verlag, 153--169.]] Google Scholar
- Neumann, A. and Seidl, H. 1998. Locating matches of tree patterns in forests. In Proceedings of the 18th Symposium on Foundations of Software Technology and Theoretical Computer Science. Lecture Notes in Computer Science, vol. 1530. Springer-Verlag, New York, 134--145.]] Google Scholar
- Neven, F. and Schwentick, T. 2000. Expressive and efficient pattern languages for tree-structured data. In Proceedings of the 19th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems. ACM, New York, 145--156.]] Google Scholar
- Papakonstantinou, Y. and Vianu, V. 2000. DTD Inference for Views of XML Data. In Proceedings of the 19th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, (Dallas, Tex). ACM, New York, 35--46.]] Google Scholar
- Peyton Jones, S. L., Hall, C. V., Hammond, K., Partain, W., and Wadler, P. 1993. The Glasgow Haskell compiler: A technical overview. In Proceedings of the UK Joint Framework for Information Technology (JFIT) Technical Conference.]]Google Scholar
- Pierce, B. C. 2002. Types and Programming Languages. MIT Press, Cambridge, Mass.]] Google Scholar
- Queinnec, C. 1990. Compilation of non-linear, second order patterns on s-expressions. In Programming Language Implementation and Logic Programming, 2nd International Workshop (PLILP'90). Lecture Notes in Computer Science. Springer-Verlag, New York, 340--357.]] Google Scholar
- Seidl, H. 1990. Deciding equivalence of finite tree automata. SIAM J. Comput. 19, 3 (June), 424--437.]] Google Scholar
- Shields, M. and Meijer, E. 2001. Type-indexed rows. In Proceedings of the 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (London, England). ACM, New York.]] Google Scholar
- Siméon, J. and Wadler, P. 2003. The essence of XML. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages.]] Google Scholar
- Sippu, S. and Soisalon-Soininen, E. 1988. Parsing theory. In EATCS Monographs on Theoretical Computer Science. Vol. 1. Springer-Verlag, New York.]]Google Scholar
- Sun Microsystems, I. 2001. The Java architecture for XML binding (JAXB). http://java.sun.com/xml/jaxb.]]Google Scholar
- Thiemann, P. 2002. A typed representation for html and xml documents in Haskell. J. Funct. Prog. 12, 425, 393--433.]] Google Scholar
- Tozawa, A. 2001. Towards static type inference for XSLT. In Proceedings of ACM Symposium on Document Engineering. ACM, New York.]] Google Scholar
- Wallace, M. and Runciman, C. 1999. Haskell and XML: Generic combinators or type-based translation? In Proceedings of the 4th ACM SIGPLAN International Conference on Functional Programming (ICFP'99). ACM SIGPLAN Notices, vol. 34-9. ACM, New York, 148--159.]] Google Scholar
Index Terms
- XDuce: A statically typed XML processing language
Recommendations
Regular expression types for XML
We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (|), etc., to ...
Parametric polymorphism for XML
Despite the extensiveness of recent investigations on static typing for XML, parametric polymorphism has rarely been treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving “parametric ...
Parametric polymorphism for XML
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languagesDespite the extensiveness of recent investigations on static typing for XML, parametric polymorphism has rarely been treated. This well-established typing discipline can also be useful in XML processing in particular for programs involving "parametric ...
Comments