Skip to main content

XML Typechecking

  • Reference work entry
  • First Online:
  • 18 Accesses

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 via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   4,499.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   6,499.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Recommended Reading

  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.

    Article  MathSciNet  MATH  Google Scholar 

  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.

    Article  MATH  Google Scholar 

  3. Brabrand C, Møller A, Schwartzbach MI. The <bigwig>project. ACM Trans Internet Tech. 2002;2(2):79–114.

    Article  Google Scholar 

  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. 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. 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. Engelfriet J. Top-down tree transducers with regular look-ahead. Math Syst Theory. 1977;10(1):289–303.

    Article  MathSciNet  MATH  Google Scholar 

  8. Engelfriet J, Vogler H. Macro tree transducers. J Comput Syst Sci. 1985;31(1):710–146.

    Article  MathSciNet  MATH  Google Scholar 

  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. 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. Frisch A. OCaml+CDuce. In: Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming; 2006. p. 192–200.

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  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. 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. 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. Hosoya H. Regular expression filters for XML. J Funct Program. 2006;16(6):711–50.

    Article  MathSciNet  MATH  Google Scholar 

  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. Hosoya H, Murata M. Boolean operations and inclusion test for attribute-element constraints. Theory Comput Sci. 2006;360(1–3):327–51.

    Article  MathSciNet  MATH  Google Scholar 

  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. Hosoya H, Pierce BC. XDuce: a typed XML processing language. ACM Trans Internet Tech. 2003;3(2):117–48.

    Article  Google Scholar 

  22. Hosoya H, Vouillon J, Pierce BC. Regular expression types for XML. ACM Trans Program Lang Syst. 2004;27(1):46–90.

    Article  MATH  Google Scholar 

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

    Chapter  Google Scholar 

  25. Lu KZM, Sulzmann M. XHaskell: regular expression types for Haskell. Manuscript. 2004.

    Google Scholar 

  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. 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. Martens W, Neven F. Frontiers of tractability for typechecking simple xml transformations. J Comput Syst Sci. 2007;73(3):362–90.

    Article  MathSciNet  MATH  Google Scholar 

  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. Milo T, Suciu D, Vianu V. Typechecking for XML transformers. J Comput Syst Sci. 2003;66(1): 66–97.

    Article  MathSciNet  MATH  Google Scholar 

  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. 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. 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. Perst T, Seidl H. Macro forest transducers. Inf Process Lett. 2004;89(3):141–9.

    Article  MathSciNet  MATH  Google Scholar 

  35. Pierce BC. Types and programming languages. MIT. 2002.

    Google Scholar 

  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. Suciu D. The XML typechecking problem. ACM SIGMOD Rec. 2002;31(1):89–96.

    Article  MathSciNet  Google Scholar 

  38. Sulzmann M, Lu KZM. A type-safe embedding of XDuce into ML. Electr Notes Theory Comput Sci. 2006;148(2):239–64.

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  41. Vansummeren S. On deciding well-definedness for query languages on trees. J. ACM. 2007;54(4):19.

    Article  MathSciNet  MATH  Google Scholar 

  42. Vouillon J. Polymorphism and XDuce-style patterns. In: Proceedings of the Programming Languages Technologies for XML; 2006. p. 49–60.

    Google Scholar 

  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 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Véronique Benzaken .

Editor information

Editors and Affiliations

Section Editor information

Rights and permissions

Reprints and permissions

Copyright information

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

About this entry

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics