⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0316-0318.html

📁 Presenting XML.rar,详细介绍有关XML的知识
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "html.dtd"><HTML><HEAD><TITLE>Presenting XML:Resolution of the XML Specification: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=17 //--><!--  PAGES=0309-0330 //--><!--  UNASSIGNED1 //--><!--  UNASSIGNED2 //--><P><CENTER><A HREF="0313-0315.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0319-0321.html">Next</A></CENTER></P><A NAME="PAGENUM-316"><P>Page 316</P></A><P>Turning its back on graph-based based methods (that is, MCF) as beingincomplete, XML-Data defends the tree structure as the best way ofmodeling data and metadata and proposes the concept of aschema to contain the meta-information. Essentially, the schema is just XML data, but with a slighttwist. To make an XML schema more compact, the XML-Data proposalsuggests an extension on the normal element definition mechanism that exploitsthe fact that whole groups of elements are often very similar. To handle this,XML-Data introduces a generic mechanism whereby after the first element hasbeen defined, all the other elements following it can use the same definitionand extend it (in much the same sense that a Java class is extended) to add ormodify attributes locally. Suppose you have a book and an article (both are typesof publications); the schema for this could be as follows:</P><!--  CODE //--><PRE>&lt;xml:schema ID=&quot;PubsSchema&quot;&gt;   &lt;elementType id=&quot;book&quot;&gt;      &lt;relation href=&quot;#TITLE&quot;/&gt;   &lt;/elementType&gt;     &lt;elementType id=&quot;article&quot;  extends=&quot;#book&quot;&gt;        &lt;relation href=&quot;MAGAZINE&quot;/&gt;   &lt;/elementType&gt;&lt;/xml:schema&gt;</PRE><!--  END CODE //--><P>XML-Data has a few advantages over the other methods: It is compatiblewith CDF (as covered in Chapter 18, &quot;Potential Applications of XML&quot;) and <BR>PICS-NG, and it is consistent with the XML linking specification. It alsohas a very strong argument in its favor because, through the use of lexical datatypes, it even attempts to lay down a constraint mechanism for ensuring that thedata contained inside elements is expressed in a well-defined format. (This kindof &quot;data typing&quot; is quite difficult to do in SGML and is next to impossiblein HTML without recourse to external aids such as JavaScript. See thesection &quot;XML Typing,&quot; later in this chapter.)</P><P>With the considerable weight of Microsoft behind it and the impetus thatCDF could give it, XML-Data will most certainly be an initiative to follow closely.</P><H4><A NAME="ch17_ 10">XML Processor API</A></H4><P>Jon Bosak, the chair of the W3C Editorial Review Board (ERB), which isultimately responsible for the XML specification, has been quotedinnumerable times saying that &quot;XML gives Java something to do.&quot; Well, this will betrue when the programmers have worked out how.</P><A NAME="PAGENUM-317"><P>Page 317</P></A><P>Seriously though, one of the strengths of XML (and also one of the manyreasons that HTML is proving inadequate) is that behind both SGML andXML lies a profound wish to live out the dream of &quot;write once, publish manytimes.&quot; Tailoring the delivery of information to an Internet-based audiencerequires adaptability as well as extensibility, and to achieve that it requires a firmand powerful base. XML is ideally suited for this purpose and is ideally suitedfor computer processing to achieve it. Indeed, a lot of the restrictions thatXML imposes on established &quot;normal&quot; SGML use are aimed at taking awaythe ambiguities in the language that make the software needed to process itso complex and, therefore, so expensive.</P><P>In order for XML to be machine processable, a standard must be set, or atleast an application programming interface (API) must be agreed upon so thatprogrammers can write common, interchangeable software and ensure thattheir software will work correctly with that of others.</P><P>At the moment, two quite contrasting initiatives are aimed at defining anAPI for XML: one a commercial effort, and the other a public domain effortdriven by the authors of some of the leading free XML-related software.</P><P>I don't intend to go into any of the fine details of either development;rather, I will merely skate over their surfaces, highlighting the interesting points.Rest assured, though, that neither programming language experience norunderstanding will be required.</P><H4><A NAME="ch17_ 11">DOM</A></H4><P>The Document Object Model (DOM) started its life as an HTML-basedidea under the aegis of the W3C. Somehow, however, it never publiclyprogressed any further than a very sketchy set of requirements. Then, in March andApril of 1997, Microsoft started to show signs of cranking up its publicitymachine for the pending release of version 4.0 of the Internet Explorer (IE)package. This package started life as a simple Web browser, but has since explodedinto a multipurpose Internet client package (like Netscape Communicator,which is a Web browser, an e-mail package, and a Usenet reader). With version4.0, Internet Explorer has completely cast off its humble beginnings and isthreatening to become almost a complete user interface on the scale ofMicrosoft Windows itself.</P><A NAME="PAGENUM-318"><P>Page 318</P></A><P>Part of the IE 4.0 press package currently in circulation speaks very loudlyof Microsoft's Dynamic HTML but says that this is the DOM proposal thathas been submitted to the W3C and is based on XML. The charter for theW3C DOM working group, in which both Microsoft and Netscape are activelyinvolved, includes support for HTML, SGML, and CSS. It can thereforesafely be said that the DOM will support XML. So far, however, there has beenno mention of XML in the material published online by Microsoft for IE 4.0(other than the adoption of the Channel Definition Format, which is based onXML), and the descriptions of the syntax for object manipulation use methodsthat do not significantly differ from those already in use based on JavaScript.This is not to say that the results are not novel. Quite to the contrary,Dynamic HTML allows, among other things, the content of HTML pages (textand graphics) to be altered on the fly as well as the style attached to theHTML code to change (even interactively). It also allows HTML elements to bevery precisely positioned (and moved, which enables animation) using localprocessing, without returning to the server for additional information or processing.</P><P>The closest that Microsoft seems to have come to a commitment in thedirection of combining the existing W3C Document Object Model with XML isa &quot;white paper&quot; on XML that it published on its XML standards Web pageson June 23, 1997. Here's a direct quote:</P><BLOCKQUOTE>"In addition to providing a file format for representing data,XML needs a standard API for programmatic manipulation ofdata. Microsoft is working with the W3C to define a standard set ofproperties, methods, and events for programmers and script authors touse. This object model provides a simple means of reading and writingdata to and from an XML tree structure. These methods enableprogrammers everywhere to treat XML as a universal data type forencapsulating and transferring data. Because the object model for XMLmatches the Document Object Model for HTML...."</BLOCKQUOTE><P>Given how active Microsoft is in other XML matters, and given howactive Microsoft is on the Internet standardization front, it's likely that soona Microsoft-originated API for XML documents will appear. In particular,although Microsoft has said that IE 4.0 will only partially (through CDF,as discussed in Chapter 18) support XML, "future versions" willfully support XML. (IE 5.0 is predicted for a 1998/1999 release.)</P><P><CENTER><A HREF="0313-0315.html">Previous</A> | <A HREF="../ewtoc.html">Table of Contents</A> | <A HREF="0319-0321.html">Next</A></CENTER></P></TD></TR></TABLE></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -