Definition
In general, typechecking refers to the problem where, given a program P, an input type σ, and an output type τ, one must decide whether P is type-safe, that is, whether it produces only outputs of type τ when run on inputs of type σ. In the XML context, typechecking problems mainly arise in two forms:
XML-to-XML transformations, where P transforms XML documents conforming to a given type into XML documents conforming to another given type.
XML publishing, where P transforms relational databases into XML views of these databases and it is necessary to check that all generated views conform to a specified type.
A type for XML documents is typically a regular tree language, usually expressed as a schema written in a schema language such as DTD, XML Schema, or Relax NG (see XML Types). In the XML publishing case, the input type σ is a relational database schema, possibly with integrity constraints.
Typechecking problems may or may not be decidable, depending on (i) the class of...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
Alon N, Milo T, Neven F, Suciu D, Vianu V. Typechecking xml views of relational databases. ACM Trans Comput Log. 2003;4(3):315–54.
Benzaken V, Castagna G, Frisch A. CDuce: an XML-centric general-purpose language. In: Proceedings of the 8th ACM SIGPLAN International Conference on Functional Programming; 2003. p. 51–63.
Brabrand C, Møller A, Schwartzbach MI. The <bigwig>project. ACM Trans Internet Tech. 2002;2(2):79–114.
Castagna G. Patterns and types for querying XML. In: Proceedings of the 10th International Symposium on Database Programming Languages; 2005. p. 1–26.
Castagna G, Frisch A. A gentle introduction to semantic subtyping. In: Proceedings of the 7th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming; 2005. p. 198–208.
Draper D, Fankhauser P, Ashok Malhotra M.F, Rose K, Rys M, Siméon J, Wadler P. XQuery 1.0 and XPath 2.0 Formal Semantics. 2007. http://www.w3.org/Tr/query-semantics/.
Engelfriet J. Top-down tree transducers with regular look-ahead. Math Syst Theory. 1977;10(1):289–303.
Engelfriet J, Vogler H. Macro tree transducers. J Comput Syst Sci. 1985;31(1):710–146.
FernĂ¡ndez MF, SimĂ©on J, Wadler P. A semi-monad for semi-structured data. In: Proceedings of the 8th International Conference on Database Theory; 2001. p. 263–300.
Frisch A. Regular tree language recognition with static information. In: Proceedings of the 3rd IFIP International Conference on Theoretical Computer Science; 2004. p. 661–74.
Frisch A. OCaml+CDuce. In: Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming; 2006. p. 192–200.
Frisch A, Castagna GBenzaken V. Semantic subtyping. In: Proceedings of the 17th IEEE Conference on Logic in Computer Science; 2002. p. 137–46.
Frisch A, Castagna G, Benzaken V. Semantic subtyping: dealing set-theoretically with function, union, intersection, and negation types. J ACM. 2008;55(4):1–64.
Frisch A, Hosoya H. Towards practical typechecking for macro tree transducers. In: Proceedings of the 11th International Workshop on Database Programming Languages; 2007. p. 246–61.
Gapeyev V, Levin MY, Pierce BC, Schmitt A. The Xtatic experience. In: Proceedings of the Workshop on Programming Language Technologies for XML; 2005. University of Pennsylvania technical report MS-CIS-04-24, 2004.
Harren M, Raghavachari M, Shmueli O, Burke MG, Bordawekar R, Pechtchanski I, Sarkar V. XJ: facilitating XML processing in Java. In: Proceedings of the 14th International World Wide Web Conference; 2005. p. 278–87.
Hosoya H. Regular expression filters for XML. J Funct Program. 2006;16(6):711–50.
Hosoya H, Frisch A, Castagna G. Parametric polymorphism for XML. In: Proceedings of the 32nd ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages; 2005. p. 50–62.
Hosoya H, Murata M. Boolean operations and inclusion test for attribute-element constraints. Theory Comput Sci. 2006;360(1–3):327–51.
Hosoya H, Pierce BC. Regular expression pattern matching for XML. J Funct Program. 2002;13(6):961–1004. Short version appeared in Proceedings of the 25th Annual ACM SIGPLAN-SIGACT symposium on principles of programming languages. 2001. p. 67–80.
Hosoya H, Pierce BC. XDuce: a typed XML processing language. ACM Trans Internet Tech. 2003;3(2):117–48.
Hosoya H, Vouillon J, Pierce BC. Regular expression types for XML. ACM Trans Program Lang Syst. 2004;27(1):46–90.
Kirkegaard C, Møller A. Xact – XML transformations in Java. In: Proceedings of Programming Language Technologies for XML; 2006. p. 87.
Levin MY, Pierce BC. Type-based optimization for regular patterns. In: Proceedings of the 10th International Workshop on Database Programming Languages; 2005. p. 184–98.
Lu KZM, Sulzmann M. XHaskell: regular expression types for Haskell. Manuscript. 2004.
Maneth S, Perst T, Berlea A, Seidl H. XML type checking with macro tree transducers. In: Proceedings of the 24th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 2005. p. 283–94.
Maneth S, Perst T, Seidl H. Exact XML type checking in polynomial time. In: Proceedings of the 11th International Conference on Database Theory; 2007. p. 254–68.
Martens W, Neven F. Frontiers of tractability for typechecking simple xml transformations. J Comput Syst Sci. 2007;73(3):362–90.
Milo T, Suciu D. Type inference for queries on semistructured data. In: Proceedings of the 18th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 1999. p. 215–26.
Milo T, Suciu D, Vianu V. Typechecking for XML transformers. J Comput Syst Sci. 2003;66(1): 66–97.
Møller A, Olesen MO, Schwartzbach MI. Static validation of XSL transformations. ACM Trans Program Lang Syst. 2007;29(4): Article 21.
Murata M. Transformation of documents and schemas by patterns and contextual conditions. In: Proceedings of the 3rd International Workshop on Principles of Document Processing; 1996. p. 153–69.
Papakonstantinou Y, Vianu V. DTD inference for views of XML data. In: Proceedings of the 19th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 2000. p. 35–46.
Perst T, Seidl H. Macro forest transducers. Inf Process Lett. 2004;89(3):141–9.
Pierce BC. Types and programming languages. MIT. 2002.
Suda T, Hosoya H. Non-backtracking top-down algorithm for checking tree automata containment. In: Proceedings of the 10th International Conference on Implementation and Application of Automata; 2005. p. 83–92.
Suciu D. The XML typechecking problem. ACM SIGMOD Rec. 2002;31(1):89–96.
Sulzmann M, Lu KZM. A type-safe embedding of XDuce into ML. Electr Notes Theory Comput Sci. 2006;148(2):239–64.
Tozawa A. Towards static type checking for XSLT. In: Proceedings of the 1st ACM Symposium on Document Engineering; 2001. p. 18–27.
Tozawa A. XML type checking using high-level tree transducer. In: Proceedings of the 8th International Symposium on Functional and Logic Programming; 2006. p. 81–96.
Vansummeren S. On deciding well-definedness for query languages on trees. J. ACM. 2007;54(4):19.
Vouillon J. Polymorphism and XDuce-style patterns. In: Proceedings of the Programming Languages Technologies for XML; 2006. p. 49–60.
Vouillon J. Polymorphic regular tree types and patterns. In: Proceedings of the 33rd ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages; 2006. p. 103–14.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Section Editor information
Rights and permissions
Copyright information
© 2018 Springer Science+Business Media, LLC, part of Springer Nature
About this entry
Cite this entry
Benzaken, V., Castagna, G., Hosoya, H., Pierce, B.C., Vansummeren, S. (2018). XML Typechecking. In: Liu, L., Ă–zsu, M.T. (eds) Encyclopedia of Database Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-8265-9_788
Download citation
DOI: https://doi.org/10.1007/978-1-4614-8265-9_788
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-8266-6
Online ISBN: 978-1-4614-8265-9
eBook Packages: Computer ScienceReference Module Computer Science and Engineering