|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
Syntactically speaking, this code contains several errors:
Despite these errors, look at Figure 11.1; this figure shows the document through Netscape Navigator. It looks pretty good, doesnt it? Why should authors adhere to proper HTML syntax when most popular browsers, in the absence of good syntax, can usually figure out what the user wants? The fact that browsers are so forgiving has led to very sloppy HTML authoring habits. This is a problem because, if the trend toward automated processing of Web documents continues, it will be imperative for all documents to adhere to proper syntax. Otherwise, it will be impossible for programs to correctly parse them. By now you are probably losing confidence in HTMLs capability to meet the electronic publishing needs of the future. Rest assured, you would not be alone in feeling that way. Many content providers also raised these concerns and escalated the situation to the point that the W3C began to consider alternatives. One of the easiest alternatives to consider was that of going back to HTMLs parent languageSGML. As the next section illustrates, however, for a set of different reasons, SGML is not the markup language of the future.
Problems with SGMLIf you were to use SGML to mark up Web documents, you would certainly have no trouble with flexibility. After all, SGML is really a meta-language, or a language for defining other languages. It provides a vast set of features for devising description languages for documents as short as a single page or as long as several printed volumes. But therein lies the problem. SGML is so vast that it is overkill for most kinds of Web publications. The SGML standard stretches on for pages and pages, making it more difficult for
SGML has so many optional features that it is just too cumbersome for the needs of Web publishers. Yet it is much more extensible and structuredboth very desirable featuresthan HTML. How then can the Web publishing world harness the best qualities of SGML without all its high maintenance features? XML: The Best of Both WorldsThe answer is XML. XML is a simplified version of SGML that throws out many of the features of SGML that just dont apply to Web publishing activities. The result is a meta-language that provides SGMLs structure and flexibility without all the complexities. Specifically, XML is
XML retains the best features of SGML without the intricacies of SGML, making it a much more accessible language. XML also retains some of the good things about HTML: It is easy for Web document authors to use and easy for programmers to write software to render XML code. The balance of this chapter is dedicated to introducing you to the work that has been done so far in developing an XML standard. After an overview of some basic concepts, you will read about elements and entities, the two major components of XML. You will then learn how to set up different kinds of links in XML documents. Finally, you will read about how style sheets can be used with XML files to specify presentation and how XML is already slated for use in a number of specialty publishing areas.
XML OverviewBefore you dive into the specifics of XML, it is helpful to be grounded in some of the basic ideas. From what you have read so far, you understand the motivation for creating XML. (HTML is too limited; SGML is too broad.) In addition, some fundamental conceptsif mastered nowwill make it easier to read the remaining sections of this chapter. These concepts include
The next three sections examine these ideas.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |