XML is not extensible
Rick Jelliffe wrote: >>> And similarly, don't confuse XML with its infoset, let alone the PSVI. It is the infoset or PSVI or canonical XML that are (paradoxically) closest to S-exprs (if we accept properties as part of S-exprs). >>> Let's not stop there. These things cannot be XML because XML is not extensible. XML isn't extensible is because it desn't have any rules of expression evaluation, the way Lisp has for general purpose programming or WXS has for type inference. XML can only be lexed. For many people, that XML cannot be evaulated is seen to be a valuable characteristic; it makes XML a general purpose syntactic form. Since XML is in used in many domains, we can expect attempts to have it optimized for those domains. Optimization always results in specialization. The problem with tuning XML to enable type derivation, query expression, namespace punctuation and so forth is that it takes the most general purpose syntactic form in widespread use and attempts to specialize it for a particular problem domain by baking in a semantics (rules of evaluation). Take types, which seems to be the optimization of most concern. Over time, the worry is that XML ceases to be a purely syntactic form, but one that also has evaulation rules for type inference. Type inference mechanisms will be baked into XML processing, resulting in XML systems with low cohesion and high coupling, the sky will fall in, and so on. >>> I think Simeon and Wadler's basic introductory spin is still wrong: * The property of self-describing as they seem to use it (which I think is good), seems depends on there being enough lexical forms for each datatype. But by the time you add dates and derived types, you would need to extend basic S-expr syntax. >>> The title of Simeon and Wadler's paper is as Dare said elsewhere, misleading. You have to wonder why they fail to make a distinction between typing the incriptions and typing the language inscribed. Let's be clear about what XML extensibility is. When we say XML is extensible, we are saying encoding a domain specific language in XML allows that language to be extensible - inscribing a domain language with markup is more flexible than inscribing it with varchars for example. Thus we can say MathML /is/ extensible. But MathML is not an extension /of/ XML, it's a /use/ of XML, to encode another language. The structural flexibility afforded by XML encoding results in simplifying both syntactic and semantic extensions to MathML. In the same way we can claim WXS is extensible (we can add new types), and that using XML as an encoding for WXS affords extensibility. But WXS is not an extension /of/ XML. Nor is it properly applied /to/ XML - in fact it can't be, which is why we apply WXS types over Infosets. Saying then that WXS is a type system for XML is nonsensical. WXS (or RNG) is used as a type system for domain language that happens to be encoded in XML. The key characteristic of extensibility is that the evaluator program for a language doesn't change with respect to domain specific extensions of that language (little languages if you will). Evaluators that can evaluate their own rules are called meta-circular. The most elegant realization of that idea continues to be Lisp. The most elegant realization of the idea that we shall not have any kind of evaluation whatsoever is XML. The ideas themselves are polar opposites. Bill de hÓra
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format