Encyclopedia of Database Systems

2018 Edition
| Editors: Ling Liu, M. Tamer Özsu

XML Typechecking

  • Véronique Benzaken
  • Giuseppe Castagna
  • Haruo Hosoya
  • Benjamin C. Pierce
  • Stijn Vansummeren
Reference work entry
DOI: https://doi.org/10.1007/978-1-4614-8265-9_788

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...

This is a preview of subscription content, log in to check access.

Recommended Reading

  1. 1.
    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.MathSciNetzbMATHCrossRefGoogle Scholar
  2. 2.
    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.zbMATHCrossRefGoogle Scholar
  3. 3.
    Brabrand C, Møller A, Schwartzbach MI. The <bigwig>project. ACM Trans Internet Tech. 2002;2(2):79–114.CrossRefGoogle Scholar
  4. 4.
    Castagna G. Patterns and types for querying XML. In: Proceedings of the 10th International Symposium on Database Programming Languages; 2005. p. 1–26.Google Scholar
  5. 5.
    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.Google Scholar
  6. 6.
    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/.
  7. 7.
    Engelfriet J. Top-down tree transducers with regular look-ahead. Math Syst Theory. 1977;10(1):289–303.MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Engelfriet J, Vogler H. Macro tree transducers. J Comput Syst Sci. 1985;31(1):710–146.MathSciNetzbMATHCrossRefGoogle Scholar
  9. 9.
    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.Google Scholar
  10. 10.
    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.Google Scholar
  11. 11.
    Frisch A. OCaml+CDuce. In: Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming; 2006. p. 192–200.Google Scholar
  12. 12.
    Frisch A, Castagna GBenzaken V. Semantic subtyping. In: Proceedings of the 17th IEEE Conference on Logic in Computer Science; 2002. p. 137–46.Google Scholar
  13. 13.
    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.MathSciNetzbMATHCrossRefGoogle Scholar
  14. 14.
    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.Google Scholar
  15. 15.
    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.Google Scholar
  16. 16.
    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.Google Scholar
  17. 17.
    Hosoya H. Regular expression filters for XML. J Funct Program. 2006;16(6):711–50.MathSciNetzbMATHCrossRefGoogle Scholar
  18. 18.
    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.Google Scholar
  19. 19.
    Hosoya H, Murata M. Boolean operations and inclusion test for attribute-element constraints. Theory Comput Sci. 2006;360(1–3):327–51.MathSciNetzbMATHCrossRefGoogle Scholar
  20. 20.
    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.Google Scholar
  21. 21.
    Hosoya H, Pierce BC. XDuce: a typed XML processing language. ACM Trans Internet Tech. 2003;3(2):117–48.CrossRefGoogle Scholar
  22. 22.
    Hosoya H, Vouillon J, Pierce BC. Regular expression types for XML. ACM Trans Program Lang Syst. 2004;27(1):46–90.zbMATHCrossRefGoogle Scholar
  23. 23.
    Kirkegaard C, Møller A. Xact – XML transformations in Java. In: Proceedings of Programming Language Technologies for XML; 2006. p. 87.Google Scholar
  24. 24.
    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.CrossRefGoogle Scholar
  25. 25.
    Lu KZM, Sulzmann M. XHaskell: regular expression types for Haskell. Manuscript. 2004.Google Scholar
  26. 26.
    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.Google Scholar
  27. 27.
    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.Google Scholar
  28. 28.
    Martens W, Neven F. Frontiers of tractability for typechecking simple xml transformations. J Comput Syst Sci. 2007;73(3):362–90.MathSciNetzbMATHCrossRefGoogle Scholar
  29. 29.
    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.Google Scholar
  30. 30.
    Milo T, Suciu D, Vianu V. Typechecking for XML transformers. J Comput Syst Sci. 2003;66(1): 66–97.MathSciNetzbMATHCrossRefGoogle Scholar
  31. 31.
    Møller A, Olesen MO, Schwartzbach MI. Static validation of XSL transformations. ACM Trans Program Lang Syst. 2007;29(4): Article 21.Google Scholar
  32. 32.
    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.Google Scholar
  33. 33.
    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.Google Scholar
  34. 34.
    Perst T, Seidl H. Macro forest transducers. Inf Process Lett. 2004;89(3):141–9.MathSciNetzbMATHCrossRefGoogle Scholar
  35. 35.
    Pierce BC. Types and programming languages. MIT. 2002.Google Scholar
  36. 36.
    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.Google Scholar
  37. 37.
    Suciu D. The XML typechecking problem. ACM SIGMOD Rec. 2002;31(1):89–96.MathSciNetCrossRefGoogle Scholar
  38. 38.
    Sulzmann M, Lu KZM. A type-safe embedding of XDuce into ML. Electr Notes Theory Comput Sci. 2006;148(2):239–64.CrossRefGoogle Scholar
  39. 39.
    Tozawa A. Towards static type checking for XSLT. In: Proceedings of the 1st ACM Symposium on Document Engineering; 2001. p. 18–27.Google Scholar
  40. 40.
    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.CrossRefGoogle Scholar
  41. 41.
    Vansummeren S. On deciding well-definedness for query languages on trees. J. ACM. 2007;54(4):19.MathSciNetzbMATHCrossRefGoogle Scholar
  42. 42.
    Vouillon J. Polymorphism and XDuce-style patterns. In: Proceedings of the Programming Languages Technologies for XML; 2006. p. 49–60.Google Scholar
  43. 43.
    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.Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  • Véronique Benzaken
    • 1
  • Giuseppe Castagna
    • 2
  • Haruo Hosoya
    • 3
  • Benjamin C. Pierce
    • 4
  • Stijn Vansummeren
    • 5
  1. 1.University Paris 11Orsay CedexFrance
  2. 2.C.N.R.S. and University Paris 7ParisFrance
  3. 3.The University of TokyoTokyoJapan
  4. 4.University of PennsylvaniaPhiladelphiaUSA
  5. 5.Hasselt University and Transnational University of LimburgDiepenbeekBelgium

Section editors and affiliations

  • Sihem Amer-Yahia
    • 1
  1. 1.Laboratoire d'Informatique de GrenobleCNRS and LIGGrenobleFrance