From: Stavan Parikh (stavan@cs.washington.edu)
Date: Tue Apr 13 2004 - 21:52:20 PDT
Simeon and Wadler formalized a subset of XML schema elements to provide a better
understanding of the XML standard. They start of noting that XML is neither
self-describing nor round-tripping and then provide a description of
typing in XML. This is followed by type checking rules and how schema validation
is carried out. Here I try to tackle some of the discussion questions.
One difference between extension and inheritance is that extension only adds
elements while inheritance allows you to replace elements. As mentioned in the
paper there is a difference between compiling and validating extended elements
and inherited classes. One can compile a class without knowledge of its
subclasses, while for elements we need to know all extended elements. Reduction
is a lot closer to subtyping just as an idea as they both restrict a larger
type. However other then maybe Pascal ranges most modern language implement
subtyping as inheritance as well so an inherited classes is actually a subtype
of the base class.
Validation is a major part of XML schema. We need to validate XML documents as in reality XML is typed. These types are structural and have to be inferred from the data. Validation allows you to infer the types and see if the data is appropriate. If XML was untyped then it would by definition be self-describing. This works as erasure of an untyped schema would be equivalent to the original. From this round-tripping also holds as well formed XML would always validate correctly.
This archive was generated by hypermail 2.1.6 : Tue Apr 13 2004 - 21:52:22 PDT