📄 0019-0022.html
字号:
<!DOCTYPE HTML PUBLIC "html.dtd"><HTML><HEAD><TITLE>Presenting XML:Enter XML:EarthWeb Inc.-</TITLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><SCRIPT><!--function displayWindow(url, width, height) { var Win = window.open(url,"displayWindow",'width=' + width +',height=' + height + ',resizable=1,scrollbars=yes');}//--></SCRIPT></HEAD><BODY BGCOLOR="#FFFFFF" VLINK="#DD0000" TEXT="#000000" LINK="#DD0000" ALINK="#FF0000"><TD WIDTH="540" VALIGN="TOP"><!-- <CENTER><TABLE><TR><TD><FORM METHOD="GET" ACTION="http://search.itknowledge.com/excite/cgi-bin/AT-foldocsearch.cgi"><INPUT NAME="search" SIZE="20" VALUE=""><BR><CENTER><INPUT NAME="searchButton" TYPE="submit" VALUE="Glossary Search"></CENTER><INPUT NAME="source" TYPE="hidden" VALUE="local" CHECKED> <INPUT NAME="bltext" TYPE="hidden" VALUE="Back to Search"><INPUT NAME="sp" TYPE="hidden" VALUE="sp"></FORM></TD><TD><IMG SRC="http://www.itknowledge.com/images/dotclear.gif" WIDTH="15" HEIGHT="1"></TD><TD><FORM METHOD="POST" ACTION="http://search.itknowledge.com/excite/cgi-bin/AT-subscriptionsearch.cgi"><INPUT NAME="search" SIZE="20" VALUE=""><BR><CENTER><INPUT NAME="searchButton" TYPE="submit" VALUE=" Book Search "></CENTER><INPUT NAME="source" TYPE="hidden" VALUE="local" CHECKED> <INPUT NAME="backlink" TYPE="hidden" VALUE="http://search.itknowledge.com:80/excite/AT-subscriptionquery.html"><INPUT NAME="bltext" TYPE="hidden" VALUE="Back to Search"><INPUT NAME="sp" TYPE="hidden" VALUE="sp"></FORM></TD></TR></TABLE></CENTER> --><!-- ISBN=1575213346 //--><!-- TITLE=Presenting XML//--><!-- AUTHOR=Richard Light//--><!-- PUBLISHER=Macmillan Computer Publishing//--><!-- IMPRINT=Sams//--><!-- CHAPTER=02 //--><!-- PAGES=0019-0036 //--><!-- UNASSIGNED1 //--><!-- UNASSIGNED2 //--><P><CENTER><A HREF="../ch01/0018-0018.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0023-0026.html">Next</A></CENTER></P><A NAME="PAGENUM-19"><P>Page 19</P></A><H3><A NAME="ch02_ 1">CHAPTER 2</A></H3><H2>Enter XML</H2><B>by Richard Light</B><P>In Chapter 1, "Markup in Theory and Practice," Iintroduced the concept of generalized markup. You learned how thegeneralized SGML standard has been used as a design basisfor the Web's own markup language—HTML. I went onto demonstrate that, sadly, SGML and HTML haven'tproven to be compatible in practice, and I discussed some of thereasons. Finally, I discussed areas where HTML itself isstruggling to meet Web users' expectations.</P><P>In this chapter I introduce the Big NewIdea—XML, or Extensible Markup Language. I discuss its brief historyand whether XML is a threat to HTML. Finally, I outline thethree major aspects of XML: the language, XML linkingmechanisms, and the XML style sheet facility.</P><A NAME="PAGENUM-20"><P>Page 20</P></A><H3><A NAME="ch02_ 2">The Origin of XML</A></H3><P>Where did XML come from? Up until 1996, the SGML community as awhole hadn't taken much of an active interest in Web issues.Helper applications (such as Panorama‰) that worked with Web browsers had been developed toallow SGML documents to be delivered over the Web and browsed by clients.It looked as though only two choices were going to be available toinformation providers on the Web—use full SGML and accept that you can onlydeliver information to a minority audience that will bother to acquire a specialisthelper application, or adopt the universally acceptable medium of HTML, alongwith its limitations.</P><H4><A NAME="ch02_ 3">The Grand Alliance</A></H4><P>In mid-1996, a group of approximately 80 SGML experts joined forceswith the World Wide Web Consortium (W3C) to form an SGML WorkingGroup under the chairmanship of Jon Bosak of Sun Microsystems. Their goal wasto develop a markup language that had the power and generality of SGMLand at the same time was easy to implement on the Web. This markuplanguage had to do the following:</P><UL><LI> Support generalized markup on the Web.<LI> Produce documents that ideally will be valid according toSGML's rule book.<LI> Provide hyperlinking support that ideally will beupward-compatible with the URL approach.<LI> Provide a generic, powerful style sheetmechanism.</UL><P>Their first achievement was to develop an initial language specificationfor XML, which was announced in November 1996 at the SGML 96Conference in Boston. A second draft was issued in March 1997.</P><TABLE BGCOLOR="#FFFF99"><TR><TD>Warning:</TD></TR><TR><TD><BLOCKQUOTE>The description of the XML language in this book is based onthe March 1997 draft, which was the latest one available when I was writingin June 1997. See<A HREF="http://www.textuality.com/sgml-erb/wd-xml-lang.html">http://www.textuality.com/sgml-erb/WD-xml-lang.html</A> for the latest version. For a more general view of progress,check out <A HREF="http://www.w3c.org/activity/xml">http://www.w3c.org/Activity/XML</A> for the current status of allaspects of the XML specification.</BLOCKQUOTE></TD></TR></TABLE><A NAME="PAGENUM-21"><P>Page 21</P></A><P>Shortly afterward, in April 1997, the first draft of the XML hyperlinkingspecification was issued.</P><P>On July 1, 1997, these ad hoc working arrangements were formalizedalong W3C's standard lines. The W3C SGML Editorial Review Board (ERB)took on the mantle of W3C XML Working Group (WG) and now followsW3C working group guidelines. This W3C XML WG is taking on theformalization of the XML standard. On the same date, the current SGMLWorking Group transferred its work to the XML WG, which renamed itselfthe W3C XML Special Interest Group. These changes regularize the position ofXML as a W3C-approved activity.</P><H4><A NAME="ch02_ 4">What Has the SGML WG Come Up With?</A></H4><P>Of course, the SGML Working Group has come up with XML, but whatis that exactly? XML is both less than SGML and more than SGML.</P><P>Formally, the XML language specification is aprofile of SGML. Less formally, it's a subset. The SGML Working Group has selected only those featuresof SGML that it feels are absolutely necessary for the Web. It has thrown therest of the SGML standard away.</P><P>So XML is a lot less than SGML. It is less complex and less loaded withall those clever features (many of them optional) that have proventroublesome for programmers aiming to develop SGML-compliant software. (Believeme, I've experienced these troubles firsthand.)</P><P>On the other hand, XML retains the key benefits that SGML offers. WithXML you have generalized markup, so now you can invent your own tagsets.You can make your documents self-describing, and you can validate them.(These concepts are described in "Self-Describing Documents" and "Valid andWell-Formed Documents," later in this chapter.) You can break up largedocuments into manageable chunks, you can deliver complete or partial documentson the Web, and so on. I think of XML as an "80/20 solution": 80% of thebenefits of SGML for 20% of its complexity.</P><P>Why is XML more than SGML? The answer is found in the other twoaspects of the XML specification. In order to be useful on the Web, XML needsto have linking and style capabilities built in. SGML has no stylemechanism, and while it provides the tools with which a hyperlinking scheme can bebuilt, it does not actually define a hyperlinking mechanism itself.</P><A NAME="PAGENUM-22"><P>Page 22</P></A><P>In developing these parts of the XML specification, the SGML WG hastried to use both existing standards and current Web practice. AnInternational Standard for hypertext and multimedia linking is called HyTime (ISO10744). For style sheets, the International Standard is called DSSSL (DocumentStyle and Semantics Specification Language). HyTime and DSSSL are bothbased on SGML. In both cases, as you will see, ideas taken from these standardshave been applied in simplified form and in combination with more pragmaticinitiatives. This has produced results that, like the XML language, aresimple enough to use, yet powerful enough to be worthusing.</P><H3><A NAME="ch02_ 5">XML Versus HTML</A></H3><P>If XML is a great new way of marking up information for the Web, doesthis mean the end of HTML? Will there be a fight to the death between twoconflicting markup schemes? Will you have to recode all your existing pages?The answer is a resounding no.</P><P>For a start, HTML and XML operate at different levels of generality, sothey will not often be in head-to-head competition. As you learned in Chapter1, HTML is an application of SGML, which means that it provides a specificset of element types, with a particular purpose: online display of Web pages,with hyperlinking. On the other hand, as you just discovered, XML is anSGML profile, which means that it can support an unlimited range ofapplications. Some of these applications may be HTML-like in their scope, but mostwill have very different objectives and design.</P><P>In a bit more detail, here are the respective roles that XML and HTMLmight play in the future.</P><H4><A NAME="ch02_ 6">The Role of XML</A></H4><P>XML will be most interesting to people and organizations who haveinformation resources that don't fit into the HTML mold and resources that theywant to make available over the Web. These are some examples:</P><UL><LI> Books<LI> Financial transactions (EDI)<LI> Technical manuals</UL><P><CENTER><A HREF="../ch01/0018-0018.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0023-0026.html">Next</A></CENTER></P></TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -