📄 0071-0073.html
字号:
<!DOCTYPE HTML PUBLIC "html.dtd"><HTML><HEAD><TITLE>Presenting XML:The XML Approach: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=05 //--><!-- PAGES=0067-0084 //--><!-- UNASSIGNED1 //--><!-- UNASSIGNED2 //--><P><CENTER><A HREF="0067-0070.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0074-0076.html">Next</A></CENTER></P><A NAME="PAGENUM-71"><P>Page 71</P></A><P>where SGML currently fails, because the structure is too sophisticated tobe straightforwardly processed by client-side software. (I foresee a massivegrowth in new client-side XML software when developers realize the wide rangeof interesting things they can do with well-structured information packetsdelivered over the Internet. Much of this software will beapplication-specific—working with financial transactions, annotated chess games, museumcatalog records, and so on.)</P><P>I want to stress that this design goal does notlimit XML to Internet-based applications. Apart from its obvious application within intranets (wherethe logic for using XML is identical to, or even more compelling than, theInternet case), this design goal might find favor as an information structuringmechanism within stand-alone systems. (For example, I would much prefer myword processing software to be based on XML!)</P><H4><A NAME="ch05_ 8">2: XML Shall Support a Wide Variety of Applications</A></H4><P>This design goal requires XML to offer the same level of generality asSGML. This means that the range of applications supported by XML is limitedonly by users' imaginations.</P><P>In practical terms, the rate of adoption of XML will probably depend onthe availability of free-standing XML software and XML-aware plugs-ins forexisting packages. This is primarily a software issue, not an XML languageissue. User-friendly packages for designing XML DTDs and style sheets willalso remove a major obstacle to the development of new XMLapplications.</P><H4><A NAME="ch05_ 9">3: XML Shall Be Compatible with SGML</A></H4><P>This is crucial. As you have already seen, making XML documentscompatible with SGML yields real benefits to users with XMLapplications.</P><P>In terms of developing the XML specification, this design goal meansstarting with the full SGML standard and deciding what to leave out. XML can'tallow in anything that isn't also valid SGML, so the general approachadopted has been to simplify SGML by removing options and features that arenot essential to XML's proper functioning.</P><A NAME="PAGENUM-72"><P>Page 72</P></A><P>You might think that designing XML as "simple SGML" would result insomething very similar to HTML. Interestingly, this is not the case: XMLand HTML come out looking quite different. As you will see in Chapter12, "Morphing Existing HTML into XML," HTML actually makes use ofsome of the sophisticated features of SGML that are outlawed in XML. HTMLmight look simple, but it isn't!</P><H4><A NAME="ch05_ 10">4: It Shall Be Easy to Write Programs that Process XML Documents</A></H4><P>The main barrier to writing software that can claim to be truly SGML-<BR>compatible is the sheer size of the SGML standard. The standard referenceto SGML (The SGML Handbook, by Charles Goldfarb, Oxford, ISBN0-19-853737-9) is 500 pages long, with another 100 pages of annexes. Theequivalent in XML—the language specification—currently totals 26 pages. Thatjust has to be an easier ride. Also, SGML includes programming concepts (suchas multiple parsing modes, and inclusion exceptions in content models) thatare notoriously difficult to implement.</P><P>The developers of XML wanted the language to be simple enough to beimplemented as a graduate-student project. (Originally, they talked about a"two-week project," but I haven't heard that phrase used recently on the XML <BR>developers' list.)</P><H4><A NAME="ch05_ 11">5: The Number of Optional Features in XML <BR>Is to Be Kept to the Absolute Minimum, <BR>Ideally Zero</A></H4><P>This is another lesson learned the hard way from SGML. The SGMLstandard includes many optional features, several of which are rarely used.Support for these features (just in case they are needed) is additional baggagethat bulks up SGML software and adds to its cost.</P><P>Making XML options-free doesn't rule out "beyond XML" softwareofferings. All three aspects of the XML specification are based on more complete(and more complex) standards: the language is based on SGML; linking is basedon HyTime and TEI's Extended Pointer mechanism; and styles are basedon</P><A NAME="PAGENUM-73"><P>Page 73</P></A><P>DSSSL. These standards offer a well-defined route for people who want toadd extra value to their XML-compliant software products. Meanwhile,producing software that is completely XML-compatible will remain relativelyeasy.</P><H4><A NAME="ch05_ 12">6: XML Documents Should Be Human-Legible and Reasonably Clear</A></H4><P>This is a difficult goal to argue with. I think that this requirement comesin part from a realization that it is very easy to use clever shortcuts that save abit of typing here and there but lead to markup whose existence can beinferred by machines, but that is not actually present in the document and so isnot apparent to a human observer.</P><P>Omitting start tags and end tags is a good example of the dangers ofshortcuts. In HTML, for instance, you can omit the tags that mark the start and endof the <HTML>, <HEAD>, and<BODY> elements, even though these are a requiredpart of every HTML document. But an SGML system can deduce where thesetags should be, and in the system's estimation, the tags will be part of thedocument's markup, but they will be totally invisible to a humanreader!</P><H4><A NAME="ch05_ 13">7: The XML Design Should Be Prepared Quickly</A></H4><P>It's a bit of a cliché that speed is of the essence in the world of the Web.The Internet Engineering Task Force's philosophy of "rough consensus andrunning code" leads to much more rapid development than other methods,such as those adopted by committees working on International Standards.However, in the case of XML, a particular need for urgency was evident. Thefeeling was that if the SGML community had not offered a way to extendHTML, Web tool vendors would have developed another method, and one thatwas not compatible with SGML, in the near future.</P><P>In order to achieve this speed, the SGML community and W3C formed anad hoc committee to work on XML. However, guidelines are now beingformalized more along standard W3C lines. On July 1, 1997, the groupcurrently known as the W3C SGML Editorial ReviewBoard became known as the W3C XML Working Group, and it began working under the process rulescurrently governing the activities of W3C workinggroups.</P><P><CENTER><A HREF="0067-0070.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0074-0076.html">Next</A></CENTER></P></TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -