Friday, July 28, 2006

The XML Object Impedance Mismatch 

Ralf L¨ammel, Erik Meijer
Initially, it may seem that one can set up a simple and faithful correspondence between XML types and object types. The first thing to notice is that such a correspondence certainly is not self-evident; there are dozens of X/O mapping technologies that assume quite different mapping rules. Let us try to define one such correspondence. We may start with the following associations between XSD types and C# types:

– Global element declarations --- top-level classes.
– Global (complex) type definitions --- top-level classes.
– Element references --- setter/getter properties.
– Local element declarations --- setter/getter properties.
– Nested anonymous (complex) types --- nested classes.

All such correspondences become debatable, convoluted, unsound or incomplete eventually. For instance, when mapping XML types to object types, the corresponding types typically suffer from ‘sloppiness’ in so far that static types fail to properly express certain validation constraints; the types typically suffer from ‘paradigm schizophrenia’: Who am I? A tree? A graph?. We use the term ‘X/O impedance mismatch’ to refer to all the conceptual and technical challenges that arise in a canonical X/O mapping context.

Topics: XML | Representation

Links to this post:


Comments: Post a Comment

This page is powered by Blogger. Isn't yours?