Escolar Documentos
Profissional Documentos
Cultura Documentos
com
Table of Contents
From HTML to XML: A language lesson on the future of the Web .......................................... 2
Prepare for the new Web formats: Be XML savvy ................................................................... 5
Use XML to make your application integration go smoothly.................................................... 8
How XML will resolve the COM versus CORBA debate and end world hunger.................... 10
1
Tim Landgrave’s XML series www.techrepublic.com
But supporting a markup language like SGML (whose standards document was now over 600 pages
long) meant developing more advanced browsers and forcing Web developers to use expensive SGML
tools. The standard that those early pioneers developed is what we now know as HTML or the HyperText
Markup Language. HTML is an application of SGML, or a specific set of tags and processing instructions
designed to define and create a specific document type—a Web page. HTML was designed to allow
content and formatting in a single document to be passed from a server where it resided to the client
browser who requested it.
2
Tim Landgrave’s XML series www.techrepublic.com
Here it was rendered based on the client’s ability to interpret the tags. If a browser didn’t support a
particular tag, then the information simply wasn’t displayed. This allowed the same document to be
rendered on different machines, while gracefully degrading if features weren’t supported. It also led to
less stringent requirements on the validation of the document’s format. All of this validation took place at
display time, based on the capabilities of the client’s renderer.
This legacy has continued even as newer versions of HTML have been submitted and approved by the
Internet Engineering Task Force (IETF). Even though features like programmability (JavaScript), object
models (Dynamic HTML), and Style Sheets (CSS) have been added to the core markup language, HTML
has a clientcentric focus that no amount of language tweaking can overcome. The real value of HTML
going forward is to focus on its strengths, formatting, and display of data, and using XML to bolster its
weakness, document processing.
!
" ### "
$%&
'!
" ! ### "
3
Tim Landgrave’s XML series www.techrepublic.com
()
*
From this set of data, I can use an application or a style sheet to display all my holdings and their
purchased value, just one stock of interest or just the total value. More importantly, I can write an
application that can take the input from this XML document, locate the <Ticker> element, use an external
process to look up the current value, and then use a style sheet or custom program to display the current
value of my portfolio. As an XML document, any particular element is directly accessible.
4
Tim Landgrave’s XML series www.techrepublic.com
!
" ### "
5
Tim Landgrave’s XML series www.techrepublic.com
$%&
'!
()
*
When you’re at home or in the office where you have a powerful PC and an intelligent browser like
Internet Explorer 5.0, you’ll want the information displayed in a rich, graphical format. This would include
portfolio valuations, links to company Web sites automatically displayed, and the latest stock prices
automatically downloaded.
To accomplish this, the site would send the XML document down to your browser as well as an XSL
style sheet that describes how the page should be rendered. Since IE5 supports XML and XSL, the
browser will create and display the page using the processing power of the PC. Moreover, if you decide
you want to see the data displayed in a different format, then you can download additional XSL style
sheets without having to download the data again.
The ability to process and render XML and XSL documents locally allows the Web developer to create
rich, interactive user interfaces to be consumed by any system that understands these IETF standards.
But what about your cellular phone, PDA, or “Web watch?”
Well, it’s unlikely that any of these devices (at least in their first generation) will support XML and XSL
natively. So how do you take advantage of the technology? Simple: Allow the server to do the work! Web
servers designed to support XML can make site development for these new devices much easier.
Suppose you want to display information from the same stock portfolio on your cell phone. First, create
an XSL style sheet that can process the same XML file. But instead of producing the HTML that would
normally be displayed by a desktop browser, it instead produces files conforming to WAP (Wireless
Access Protocol, supported by most cell phone manufacturers). Now the cell phone can display the same
portfolio information even though it has a much more limited display. Creating an XSL style sheet that
supports PDA display standards, “Web watch” or “Web refrigerator,” allows the data to be displayed on
these respective devices as well.
6
Tim Landgrave’s XML series www.techrepublic.com
7
Tim Landgrave’s XML series www.techrepublic.com
8
Tim Landgrave’s XML series www.techrepublic.com
Implementing EDI also requires the purchase and maintenance of expensive software and systems as
well as a contract with one of 20 or so value added network providers (or VANs). None of these
requirements makes EDI conducive to use in an EAI environment.
XML, on the other hand, provides a dynamic, self-describing or externally described data format. The
flexibility of defining unique data structures for each vertical industry and document type versus the
rigidity of conforming to the X12 or EDIFACT standard makes XML an ideal tool for enabling business-to-
business transactions. With XML’s ascension to the throne as the next “on the wire” data format for Web
applications, it’s natural that software developers and their customers are looking for ways to leverage
XML as a data transport between applications.
9
Tim Landgrave’s XML series www.techrepublic.com
10
Tim Landgrave’s XML series www.techrepublic.com
,
) )-.
( /
. 0 1
-/ 2 -/
. 0 1
( /
$ /
) % ,
-/ ) ( -/
) % ,
) )-.
)
( /
// 3&
-/ // 3& -/
// 3&
) -
-/ .,, -/
) -
( /
$ /
& 1
-/ & 1 -/
& 1
$ /
,
-/
) % ,
11
Tim Landgrave’s XML series www.techrepublic.com
So how does this work? The calling program first issues a GET request to:
http://www.piranha.com/piranha.xml
If the appropriate security challenge (certificate, Kerberos password, etc.) is met, then this XML schema
is returned. Next, using the local XML parser, the program determines what methods can be called on the
Piranha site and what parameters need to be passed. To place the order, the calling system first issues
the ListBooksByAuthor command, passing the appropriate parameters. Let’s suppose you want to see all
books by Tom Peters. The command line would look like this:
http://www.piranha.com?method=ListBooksByAuthor,AuthorName=Peters
Now the back-end Piranha systems can call their ListBooksByAuthor method, pass in the name
“Peters,” create a text stream that represents all of the books by authors with “Peters” in their name, and
format the text stream into an XML structure that matches that of the BooksReturned type defined in the
Piranha.xml file. The calling program can retrieve the XML structure from the command line (or some
other method like cookies, streams, etc.) and then use the XML parser to decompose the text stream into
the elements defined by the BooksReturned type.
Now the list of books can be presented locally based on the calling programmer’s taste or the
information can be used to programmatically search the BooksReturned structure and select books to
order. Finally, the calling system creates a ShoppingCart structure and passes an XML stream back to
the Piranha Web site that conforms to the ShoppingCart and eMailAddress syntax rules and the Piranha
Web site returns a PurchaseConfirmation structure that can be consumed by the calling system.
So what just happened? A programmer for a company who needed access to the Piranha internal
functions was able to query the Web site for its exposed interfaces and then use the methods defined by
the interfaces to effect a transaction between the two systems. It didn’t matter whether the systems on
either side were based on COM, CORBA, or even AS/400s. The glue between the systems was HTTP
and XML.
This document is provided for informational purposes only and TechRepublic makes no warranties, either expressed or
implied, in this document. Information in this document is subject to change without notice. The entire risk of the use or
the results of the use of this document remains with the user. The example companies, organizations, products, people
and events depicted herein are fictitious. No association with any real company, organization, product, person or event is
intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without
limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval
system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for
any purpose, without the express written permission of TechRepublic.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
12