| XML: The Universal Publishing Format | Table of contents | Indexes | Hypertext Linking with HTML, SGML and XML - technologies and techniques | |||
Microsoft's vision for XML |
|
Adam Bosworth |
| General Manager, Weblications Team |
| Microsoft One Microsoft Way Redmond Washington USA 98052-6399 Phone: 001 206 936 5920 Fax: 001 206 936 7329 |
Biographical notice: |
Adam Bosworth |
ABSTRACT: |
The Vision: |
|
All applications on the web are easy to make open. Goods and services are easy to find. Any customer can: |
In short, make it easy to discover and interact with structured data and applications on the web. |
Arguments: |
|
So, what have we learned from the Web? |
|
What have we learned from servers? |
|
To summarize, we can learn the following lessons: |
Microsoft's opinion: |
|
What is left to do to enable this interaction? |
|
Enhance XML to support extensible and rich typing and meta-data: |
|
Describe the grammars: |
|
First, of course, a grammar for the books themselves and most likely a grammar for a site to describe its physical ability to deliver goods and take payments. XML can do this today. |
Third, let's assume that the search engine has a way to now discover which URL's return book schema. Now the search engine may do one of two things: |
In either case, as we hope this example shows, standard XML grammars for describing sites, for asking for filtered subsets and for sending changes are likely to be extraordinarily useful. |
However, this model may sometimes be too simplistic. Let's imagine that the site isn't willing to support a general query language no matter how limited. What it is willing to do is expose certain URLs which when sent the appropriate parameters of Title or Author return a list of books for those Titles or Authors or both. Notice that this is basically RPC. Now, even in this case, the search engine would want to send the parameters to the book-purveying site in a simple, easy to engineer manner. If the "Site description" grammar assumed above describes the desired shape of the parameters of the "method" and there is a standard grammar for marshalling parameters for RPC or the "Site description" grammar describes the grammar of the search request, then the search engine knows what XML to send. Ideally, this grammar for RPC will also describe how synchronously the results may be returned and by what mechanism to allow for delayed return. |
It is interesting to note that the "Site description" grammar could be built as an extension of the current XML-DATA proposal. |
There is another standard grammar that shows great promise. This is XSL or Extensible Stylesheet Language. The search engine now has lists of books and this is good. But there is another challenge that faces the search engine: how does it handle the case where different sites support different book schemas? Suppose that there are several competing schemas. It would like to know them all and be able to convert between them into whichever common one it prefers. What would be ideal is an XML grammar that described the logic required to quickly and efficiently convert from one schema to another. XSL has the potential to provide a standard mechanism for such conversions. |
Similarly, the client receiving this book list information has a challenge. How does it dynamically generate the HTML that would be required to display the book list that vendors might want to include as links back to their sites, little blurbs about their site, and so on? The client could of course take direct advantage of DHTML and JavaScript or Java or any COM language to solve this problem writing either script or a component to custom generate the appropriate DHTML from the data. The client could also use the data binding features of DHTML. But it would be handy to have a standard way to describe how to build the HTML from the XML and a standard component (converter) that knew how to execute such instructions. Again, XSL can provide such a conversion. |
Lastly, the site vending books has a problem. How does it map its book database, undoubtedly stored typically in a large relational database, into the appropriate XML logical view? Interestingly, the XML-Schema for the view could itself contain suitable meta-data to help one compute the answer to this question, but then a standard for such meta-data decoration of XML-Schemas would be required. Even so, undoubtedly a "plan" would be computed for actually building the appropriate XML logical view and this plan would require an XML grammar, call it the "Database conversion". Also required would be a general converter that given such a grammar, would actually talk to the database, submit the requisite SQL, and build the appropriate XML. This model would be extremely useful on any server mapping relational data to HTML clients, even sometimes building the HTML directly. |
So, to summarize, the following XML grammars would be necessary: |
|
The following grammars would be useful: |
|
Ensure that the programming models for XML stay simple and appropriate: |
|
Any model for moving information around the net will involve the requirement that two types of programmers can access this information, programmers using serious structured languages such as Java or C++ and programmers using scripting languages such as JavaScript. It is important to note that the requirements are not identical. The scripting programmer tends to not have either pointers or types and to want to treat XML as a single big tree of nodes which can be navigated through a collection syntax, something like root[foos[3][bars[2][sams[1]]] where this completely fictitious syntax would mean that the script writer wanted the first node with tagname "sams" within the second node with tagname "bars" within the third node with tagname "foos" within the root. And do to the magic of overloading of scripting languages, such a model can be surfaced without requiring each and every XML provider to constantly provide and maintain such indexed collections. What this code would really translate to is code that goes and finds such a node using simple enumerators. Conversely, the C++ or Java programmer will probably happily deal with a lightweight enumeration model and build their own object models on top of it rather than depend upon the implementation vagaries of layers provided by the provider. Indeed, in many cases, the C++ or Java programmer may simply want the nodes pushed into them as they will be building their own data structures. It is important that we not overburden each implementation with some top-heavy API which is neither fish nor fowl, but rather build the right low level API on top of which all can build. |
What will be required in addition to simple enumeration are ways to get data based upon the types described in the schema, to make changes to the data or tree, and ways to validate that the changes conform to the schema of the XML document. Lastly, as XML grammars described above emerge, services to automatically execute them will start to be expected as a service layer on top of the base API, but with a model that allows the implementers to support them directly and natively. In other words, while a service layer might be necessary to find some node using simple predicates, a provider might natively implement support for this in a more efficient manner using internal indexes or hash tables or what have you. |
Stores: |
|
Many have asked about XML "stores". It is unlikely that there will be one XML store. Different stores will have different purposes. |
The cheapest store, of course, is the file system. Many standard components are springing up to provide DOM (Document Object Model) API access to XML stored in streams or files including, of course, our own component which we will make available ubiquitously on all Windows platforms, on Unix, and in Java. |
Relational stores are superb at exposing multiple different logical views on the same data and by now have very good scaling and transactional characteristics. Typically most mission critical data will live in them. But this doesn't mean that there cannot be "converters" between the relational stores and XML logical views. We expect to see this as a rapidly exploding part of the XML industry. Ultimately, we would expect that the database stores themselves would be able to make these conversions happen, but that in the near term these converters would be part of middle-ware living on middle tier servers. This is too complicated a subject to describe in depth in this memo. |
Object oriented stores. Many object oriented stores have discovered new and additional purposes acting as "staging" stores for XML data as it is cached on the middle tier or the client. Some will undoubtedly turn out to do an excellent job of providing XML caching. What will be critical here is that we avoid a profusion of APIs for talking to these caches if we want to see interoperability. The DOM helps here by describing how to talk to a particular XML document/object, but doesn't handle the larger issues that caches are likely to worry about such as versioning, transactions, searching, and so on. We hope that WebDAV will play a major role in driving convergence in this arena. We also expect the object-oriented companies and innovative companies like Frontier to play key roles in this arena. |
Converters architecture... |
|
Clearly, most data will not be stored in XML. Indeed, the main thrust of the theme of this paper is that XML acts as a convenient mechanism for interacting at the logical view level, not the physical level. Some data will come from relational databases. Some from Teletype feeds. Some from mainframe databases through CICS. Some from SGML. Some from object-oriented databases. Some from mail stores. Much will be synthesized dynamically by objects written by programmers. |
But if we want a model for interacting, we will need a standard component model for transforming between any data and XML. We call such components converters. |
A normal middle tier server will have mechanisms for wiring such converters up to queues of XML messages. For example, clients may be sending requests for available classes to a university and expecting a specific logical view (XML schema). The server at the university would pop such requests off of a queue, pass the XML request to the appropriate converter, probably hooked up to the class schedule database on the back end, take the resulting XML, and route it back to the requestor. The requestor would then display the information, review it, and then, perhaps, want to enroll. The requestor would send a message with another schema (enroll) to the middle tier. The middle tier would pop this message off of some queue and quite possibly hand it off to a completely different converter component talking to a backend student database. |
We expect to help produce three sorts of converters: |
|
Furthermore, we also don't believe that everyone will always agree about schema. It is possible, for example, that 3 or 4 or 5 schemas will be used by sites providing information about their book inventory rather than one. However, any sensible program accessing or viewing such data will want to pick one. This will require a mechanism for converting from one XML schema to another. Sometimes, if sufficient semantic information were available, it might be possible to do this automatically. |
But frequently such information will not be available and a customer will have to describe how to convert. Again, however, we don't want to limit this to programmers. We believe it should be easy to produce XML from XML. |
We want a standard extensible grammar, therefore, for converting from XML trees into either other XML trees or into DHTML trees. Thus to Microsoft, the part of XSL that is interesting is the part that helps define how a given XML tree should be translated into a quite different tree. We see the emergence of standard converters which use XSL messages to decide how to translate from one XML grammar into another or into DHTML. |
Implications of all of this for the web: |
|
XML is the building block. XML-DATA is the required next step. Then, as we have seen, we do need agreement upon some specific XML grammars and we must remember to keep these grammars simple, open, and easy. If we do all this, the power we unleash to the normal developer is incalculable. It becomes possible to build systems for any line of business application, for collaboration, and systems for intelligent information retrieval including for goods and services. |
This revolution will do for applications what SQL partially did for databases. It will open up the floodgates because the number of people who can interact with them will increase enormously. Many hard issues remain to be worked out including the details of these grammars, the security issues, transactions, and so on. But in the spirit of the web, we have submitted our proposals for most of these pieces to allow us to start and learn rather than trying to get it perfect and never shipping. |
This will cause a site revolution. Well behaved sites will support not just data for specific schema on request, but filtered sets of data, updates to data (notifications), and requests to update their data (data entry) and, in all these cases, they will support these services using standard XML grammars. It will open up an entire new business, namely converters with a myriad of specialized XML grammars that make sense for particular types of transformations. |
Predictions: |
|
The requisite grammars will be defined and implemented. The DOM will converge and streamline. Many database storage systems will start to support both the grammars and the DOM. XML will become a widespread solution to interoperable RPC on the net. Microsoft will actively support all of the above. |
Tools will emerge to: |
Server components will emerge to: |
The programming model for building applications will change to: |
One in which XML is the standard message format used for transmitting data and for RPC. There will be standard ways to manage these messages through queues and to register events for handling these messages. Components on the server will routinely save their state into XML data-stores virtually transparently. |
Summary: |
|
We're only at the very beginning of the Net revolution. The most exciting part is still to come. Soon it will become as easy to interact with programs and data all over the net as it currently is to view shared presentation and content. |
| XML: The Universal Publishing Format | Table of contents | Indexes | Hypertext Linking with HTML, SGML and XML - technologies and techniques | |||