Skip to main content

Revealing the X/O Impedance Mismatch

(Changing Lead into Gold)

  • Conference paper
Datatype-Generic Programming (SSDGP 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4719))

Included in the following conference series:

Abstract

We take the term X/O impedance mismatch to describe the difficulty of the OO paradigm to accommodate XML processing by means of recasting it to typed OO programming. In particular, given XML types (say, XML schemas), it is notoriously difficult to map them automatically to object types (say, object models) that (i) reasonably compare to native object types typically devised by OO developers; (ii) fully preserve the intent of the original XML types; (iii) fully support round-tripping of arbitrary, valid XML data; and (iv) provide a general and convenient programming model for XML data hosted by objects.

We reveal the X/O impedance mismatch in particular detail. That is, we survey the relevant differences between XML and objects in terms of their data models and their type systems. In this process, we systematically record and assess X-to-O mapping options. Our illustrations employ XSD (1.0) as the XML-schema language of choice and C# (1.0–3.0) as the bound of OO language expressiveness.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Amer-Yahia, S., Du, F., Freire, J.: A comprehensive solution to the XML-to-relational mapping problem. In: Laender, A.H.F., Lee, D., Ronthaler, M. (eds.) Proceedings of 6th ACM CIKM International Workshop on Web Information and Data Management (WIDM 2004), pp. 31–38. ACM Press, New York (2004)

    Google Scholar 

  2. Atanassow, F., Clarke, D., Jeuring, J.: UUXML: A Type-Preserving XML Schema-Haskell Data Binding. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 71–85. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  3. Baars, A.I., Löh, A., Swierstra, S.D.: Parsing permutation phrases. Journal of Functional Programming 14(6), 635–646 (2004)

    Article  MATH  Google Scholar 

  4. Bancilhon, F., Spyratos, N.: Update semantics of relational views. ACM Transactions on Database Systems 6(4), 557–575 (1981)

    Article  MATH  Google Scholar 

  5. Bau, D.: The Design of XMLBeans (2003), Parts 1–3: http://davidbau.com/archives/2003/11/14/the_design_of_xmlbeans_part_1.html ; http://davidbau.com/archives/2003/11/19/the_design_of_xmlbeans_part_2.html ; http://davidbau.com/archives/2003/12/18/the_design_of_xmlbeans_part_3.html .

  6. Bierman, G., Meijer, E., Schulte, W.: The Essence of Data Access in Cω. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 287–311. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  7. Bohannon, P., Freire, J., Haritsa, J.R., Ramanath, M., Roy, P., Siméon, J.: Bridging the XML Relational Divide with LegoDB. In: Dayal, U., Ramamritham, K., Vijayaraman, T.M. (eds.) 19th International Conference on Data Engineering (ICDE 2003), Proceedings, pp. 759–760. IEEE Computer Society Press, Los Alamitos (2003)

    Google Scholar 

  8. Bohannon, P., Freire, J., Roy, P., Simeon, J.: From XML Schema to Relations: A Cost-Based Approach to XML Storage. In: Proceedings of 18th International Conference on Data Engineering (ICDE 2002), p. 64. IEEE Computer Society Press, Los Alamitos (2002)

    Chapter  Google Scholar 

  9. Bordawekar, R., Burke, M.G., Peshansky, I., Raghavachari, M.: XJ: Integration of XML Processing into Java. In: Castagna, Raghavachari

    Google Scholar 

  10. Bourret, R.: Mapping W3C Schemas to Object Schemas (March 2001), http://www.rpbourret.com/xml/SchemaMap.htm

  11. Bourret, R.: XML Data Binding Resources (2007), http://www.rpbourret.com/xml/XMLDataBinding.htm

  12. Burton, F., Cameron, R.: Pattern Matching with Abstract Data Types. Journal of Functional Programming 3(2), 171–190 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  13. Cameron, R.D.: Extending context-free grammars with permutation phrases. ACM Letters on Programming Language Systems 2(1-4), 85–94 (1993)

    Article  Google Scholar 

  14. Castagna, G., Raghavachari, M. (eds.) PLAN-X 2006 Informal Proceedings, Charleston, South Carolina, January 14, 2006. BRICS, Department of Computer Science, University of Aarhus (2006)

    Google Scholar 

  15. Crocker, R., Stele Jr., G.L.: Proceedings of the 2003 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2003. ACM Press, New York (2003)

    Google Scholar 

  16. Dijkstra, E.W.: EWD 498: How do we tell truths that might hurt? In: Selected Writings on Computing: A Personal Perspective, pp. 129–131. Springer, Heidelberg (1992)

    Google Scholar 

  17. Downey, P.: W3C XML Schema Patterns for Databinding. In: Conference Proceedings XML 2006 (2006)

    Google Scholar 

  18. Fähndrich, M., Leino, K.R.M.: Declaring and checking non-null types in an object-oriented language. In: Crocker and Jr. [15], pp. 302–312

    Google Scholar 

  19. Fowler, M.: When to Make a Type. IEEE Software, 12–13 (2003)

    Google Scholar 

  20. Gapeyev, V., Garillot, F., Pierce, B.C.: Statically Typed Document Transformation: An Xtatic Experience. In: Castagna and Raghavachari [14], pp. 2–13

    Google Scholar 

  21. Gapeyev, V., Levin, M.Y., Pierce, B.C., Schmitt, A.: XML Goes Native: Run-Time Representations for Xtatic. In: Bodik, R. (ed.) CC 2005. LNCS, vol. 3443, pp. 43–58. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  22. Gapeyev, V., Pierce, B.C.: Regular Object Types. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 151–175. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  23. Garcia, R., Jarvi, J., Lumsdaine, A., Siek, J.G., Willcock, J.: A comparative study of language support for generic programming. In: Crocker and Jr. [15], pp. 115–134

    Google Scholar 

  24. Gottlob, G., Paolini, P., Zicari, R.: Properties and update semantics of consistent views. ACM Transactions on Database Systems 13(4), 486–524 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  25. Harren, M., Raghavachari, M., Shmueli, O., Burke, M.G., Bordawekar, R., Pechtchanski, I., Sarkar, V.: XJ: facilitating XML processing in Java. In: Ellis, A., Hagino, T. (eds.) WWW 2005, 14th International Conference on World Wide Web, Proceedings, pp. 278–287. ACM Press, New York (2005)

    Google Scholar 

  26. Harren, M., Raghavachari, M., Shmueli, O., Burke, M.G., Sarkar, V., Bordawekar, R.: XJ: integration of XML processing into java. In: Feldman, S.I., Uretsky, M., Najork, M., Wills, C.E. (eds.) WWW 2004, 13th International Conference on World Wide Web, Proceedings, pp. 340–341. ACM Press, New York (2004)

    Google Scholar 

  27. Hosoya, H., Pierce, B.C.: XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology (TOIT) 3(2), 117–148 (2003)

    Article  Google Scholar 

  28. IBM Research. XJ (2005), http://www.research.ibm.com/xj/

  29. json JSON.org. Introducing JSON, 2006. Web site, http://www.json.org/ .

  30. Kirkegaard, C., Møller, A.: Type Checking with XML Schema in XACT. In: Castagna and Raghavachari [14], pp. 14–23

    Google Scholar 

  31. Kostoulas, M.G., Matsa, M., Mendelsohn, N., Perkins, E., Heifets, A., Mercaldi, M.: XML screamer: an integrated approach to high performance XML parsing, validation and deserialization. In: WWW 2006, 15th International Conference on World Wide Web, Proceedings, pp. 93–102. ACM Press, New York (2006)

    Google Scholar 

  32. Lämmel, R., Kitsis, S., Remy, D.: Analysis of XML schema usage. In: Conference Proceedings XML 2005 (2005)

    Google Scholar 

  33. Lämmel, R., Remy, D.: Functional OO Programming with Triangular Circles. In: Conference Proceedings XML 2006 (2006)

    Google Scholar 

  34. Lämmel, R., Visser, E., Visser, J.: Strategic Programming Meets Adaptive Programming. In: AOSD 2003, 2nd International Conference on Aspect-Oriented Software Development, Proceedings, pp. 168–177. ACM Press, New York (2003)

    Google Scholar 

  35. Lieberherr, K.: Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, Boston (1996)

    Google Scholar 

  36. Liskov, B.: Keynote address - data abstraction and hierarchy. In: OOPSLA 1987, Addendum to the Proceedings on Object-Oriented Programming Systems, Languages and Applications, pp. 17–34. ACM Press, New York (1987)

    Google Scholar 

  37. Loughran, S., Smith, E.: Rethinking the Java SOAP Stack. Technical Report HPL-2005-83, 20050517, External, HP Labs (2005)

    Google Scholar 

  38. McLaughlin, B.: Java and XML data binding. Nutshell handbook. O’Reilly & Associates, Inc., (2002)

    Google Scholar 

  39. Meijer, E., Beckman, B.: XLINQ: XML Programming Refactored (The Return Of The Monoids). In: Conference Proceedings XML’05, See [46] for the LINQ portal. XLinq is now called LINQ to XML (November 2005)

    Google Scholar 

  40. Meijer, E., Beckman, B.: XML Support in Visual Basic 9. In: Castagna and Raghavachari [14], p. 86

    Google Scholar 

  41. Meijer, E., Schulte, W., Bierman, G.: Programming with Circles, Triangles and Rectangles. In: Conference Proceedings XML 2003 (2003)

    Google Scholar 

  42. Meijer, E., Schulte, W., Bierman, G.: Unifying Tables, Objects and Documents. In: Proceedings of Declarative Programming in the Context of OO Languages (DP-COOL) (2003)

    Google Scholar 

  43. Meyer, B.: Object-Oriented Software Construction, 2nd edn. The Object-Oriented Series. Prentice-Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  44. Microsoft Corp. LINQ to XML Overview, See [46], for the LINQ portal. LINQ to XML was formerly called XLinq (2005–2007)

    Google Scholar 

  45. Microsoft Corp. C# Version 3.0 Specification, See [46] for the LINQ portal (2006-2007)

    Google Scholar 

  46. Microsoft Corp. The LINQ Project, (2006-2007), http://msdn.microsoft.com/netframework/future/linq/

  47. Microsoft Corp. Windows Communication Foundation (2006-2007), http://windowscommunication.net/

  48. Novak Jr, G.S.: Creation of views for reuse of software with different data representations. IEEE Transactions on Software Engineering 21(12), 993–1005 (1995)

    Article  Google Scholar 

  49. OASIS. RELAX NG Specification (December 2001), http://www.oasis-open.org /committees/relax-ng/spec-20011203.html

  50. Onizuka, M., Chan, F.Y., Michigami, R., Honishi, T.: Incremental maintenance for materialized XPath/XSLT views. In: WWW 2005: Proceedings of the 14th International Conference on World Wide Web, pp. 671–681. ACM Press, New York (2005)

    Google Scholar 

  51. Perkins, E., Matsa, M., Kostoulas, M.G., Heifets, A., Mendelsohn, N.: Generation of efficient parsers through direct compilation of XML Schema grammars. IBM Systems Journal 45(2), 225–244 (2006)

    Article  Google Scholar 

  52. Pradhan, M.: Default mapping for annotated XML schema. IBM developerWorks (April 2006), http://www-128.ibm.com /developerworks/db2/library/techarticle/dm-0604pr%adhan2/

  53. Shields, M., Meijer, E.: Type-indexed rows. In: POPL 2001: 28th ACM SIGPLAN-SIGACT Symposium on Principles Of Programming Languages, Proceedings, pp. 261–275. ACM Press, New York (2001)

    Google Scholar 

  54. Sun Microsystems. The Java architecture for XML binding (JAXB) (2006), http://java.sun.com/webservices/jaxb/ .

  55. The Apache XML Project. XMLBeans (2006), http://xmlbeans.apache.org/

  56. Thiemann, P.: Modeling HTML in haskell. In: Pontelli, E., Costa, V.S (eds.) PADL 2000. LNCS, vol. 1753, pp. 263–277. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  57. Thiemann, P.: A typed representation for HTML and XML documents in Haskell. Journal of Functional Programming 12(4&5), 435–468 (2002)

    MathSciNet  MATH  Google Scholar 

  58. Thomas, D.: The Impedance Imperative: Tuples + Objects + Infosets = Too Much Stuff! Journal of Object Technology 2(5), 7–12 (2003)

    Article  Google Scholar 

  59. van der Vlist, E.: RELAX NG. O’Reilly (December 2004)

    Google Scholar 

  60. van der Vlist, E.: RELAX NG and W3C XML Schema compared (continued) (July 2006), http://eric.van-der-vlist.com /blog/2814_RELAX_NG_and_W3C_XML_Schema_compared_(continued).item

  61. van Engelen, R., Govindaraju, M., Zhang, W.: Exploring Remote Object Coherence in XML Web Services. In: ICWS 2006, International Conference on WebServices, Proceedings, pp. 249–256. IEEE Computer Society, Los Alamitos (2006)

    Google Scholar 

  62. Vinoski, S.: RPC Under Fire. IEEE Internet Computing 9(5), 93–95 (2005)

    Article  Google Scholar 

  63. Visser, J.: Visitor combination and traversal control. ACM SIGPLAN Notices 36(11), 270–282 (2001) (OPSLA 2001 Conference Proceedings)

    Article  Google Scholar 

  64. W3C. Document Object Model (DOM) (1997-2003), http://www.w3.org/DOM/

  65. W3C. XML Path Language (XPath), Version 1.0, W3C Recommendation (November 16, 1999), http://www.w3.org /TR/xpath

  66. W3C. XML Information Set, 2nd edn., (1999–2004), http://www.w3.org /TR/xml-infoset/

  67. W3C. XML Schema, (2000–2003), http://www.w3.org /XML/Schema

  68. W3C. Extensible Markup Language (XML) 1.0, 3rd edn., W3C Recommendation, (February 2004), http://www.w3.org /TR/2004/REC-xml-20040204/

  69. W3C. XQuery 1.0 and XPath 2.0 Formal Semantics, W3C Candidate Recommendation, (June 8, 2006), http://www.w3.org /TR/xquery-semantics/

  70. Wadler, P.: Views: a way for pattern matching to cohabit with data abstraction. In: POPL 1987, 14th ACM SIGACT-SIGPLAN Symposium on Principles Of Programming Languages, Proceedings, pp. 307–313. ACM Press, New York (1987)

    Google Scholar 

  71. Wallace, M., Runciman, C.: Haskell and XML: Generic combinators or type-based translation? ACM SIGPLAN Notices 34(9), 148–159 (1999) (Conference Proceedings of International Conference on Functional Programming (ICFP’99))

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Roland Backhouse Jeremy Gibbons Ralf Hinze Johan Jeuring

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lämmel, R., Meijer, E. (2007). Revealing the X/O Impedance Mismatch. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds) Datatype-Generic Programming. SSDGP 2006. Lecture Notes in Computer Science, vol 4719. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-76786-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-76786-2_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-76785-5

  • Online ISBN: 978-3-540-76786-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics