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

📄 rec-xml-20001006

📁 如何实现安全的xml机制
💻
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--ArborText, Inc., 1988-2000, v.4002-->
<html lang="EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Extensible Markup Language (XML) 1.0 (Second Edition)</title>
<link href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" type="text/css"
rel="stylesheet"/>
<style type="text/css"> code           { font-family: monospace; }  div.constraint,
div.issue, div.note, div.notice     { margin-left: 2em; }  dt.label      
{ display: run-in; }  li p           { margin-top: 0.3em;                
 margin-bottom: 0.3em; } </style>
</head>
<body>  <div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home"
alt="W3C" height="48" width="72"/></a></p><h1>Extensible Markup Language (XML)
1.0 (Second Edition)</h1>
<h2>W3C Recommendation 6 October 2000</h2><dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/TR/2000/REC-xml-20001006">http://www.w3.org/TR/2000/REC-xml-20001006</a>
(<a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XHTML</a>, <a href="http://www.w3.org/TR/2000/REC-xml-20001006.xml">XML</a>, <a
href="http://www.w3.org/TR/2000/REC-xml-20001006.pdf">PDF</a>, <a href="http://www.w3.org/TR/2000/REC-xml-20001006-review.html">XHTML
review version</a> with color-coded revision indicators)</dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></dd>
<dt>Previous versions:</dt>
<dd><a href="http://www.w3.org/TR/2000/WD-xml-2e-20000814"> http://www.w3.org/TR/2000/WD-xml-2e-20000814</a> </dd>
<dd><a href="http://www.w3.org/TR/1998/REC-xml-19980210"> http://www.w3.org/TR/1998/REC-xml-19980210</a> </dd>
<dt>Editors:</dt>
<dd>Tim Bray, Textuality and Netscape  <a href="mailto:tbray@textuality.com">&lt;tbray@textuality.com></a></dd>
<dd>Jean Paoli, Microsoft  <a href="mailto:jeanpa@microsoft.com">&lt;jeanpa@microsoft.com></a></dd>
<dd>C. M. Sperberg-McQueen, University of Illinois at Chicago and Text Encoding
Initiative <a href="mailto:cmsmcq@uic.edu">&lt;cmsmcq@uic.edu></a> </dd>
<dd>Eve Maler, Sun Microsystems, Inc. <a href="mailto:elm@east.sun.com">&lt;eve.maler@east.sun.com></a>
 - Second Edition</dd>
</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&nbsp;&copy;&nbsp;2000&nbsp;<a
href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup>
(<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a
href="http://www.inria.fr/"><abbr title="Institut National de Recherche en Informatique et Automatique"
lang="fr">INRIA</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All
Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a
href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document
use</a>, and <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software
licensing</a> rules apply.</p></div><hr class="html_compat"/><div><h2><a
name="abstract">Abstract</a></h2> <p>The Extensible Markup Language (XML)
is a subset of SGML that is completely described in this document. Its goal
is to enable generic SGML to be served, received, and processed on the Web
in the way that is now possible with HTML. XML has been designed for ease
of implementation and for interoperability with both SGML and HTML.</p> </div><div>
<h2><a name="status">Status of this Document</a></h2> <p>This
document has been reviewed by W3C Members and other interested parties and
has been endorsed by the Director as a W3C Recommendation. It is a stable
document and may be used as reference material or cited as a normative reference
from another document. W3C's role in making the Recommendation is to draw
attention to the specification and to promote its widespread deployment. This
enhances the functionality and interoperability of the Web.</p> <p>This document
specifies a syntax created by subsetting an existing, widely used international
text processing standard (Standard Generalized Markup Language, ISO 8879:1986(E)
as amended and corrected) for use on the World Wide Web. It is a product of
the W3C XML Activity, details of which can be found at <a href="http://www.w3.org/XML/">http://www.w3.org/XML</a>.
 The English version of this specification is the only normative version.
However, for translations of this document, see <a href="http://www.w3.org/XML/#trans">http://www.w3.org/XML/#trans</a>.
A list of current W3C Recommendations and other technical documents can be
found at <a href="http://www.w3.org/TR/">http://www.w3.org/TR</a>.</p>  <p>This
second edition is <em>not</em> a new version of XML (first published 10 February 1998); it merely incorporates
the changes dictated by the first-edition errata (available at <a href="http://www.w3.org/XML/xml-19980210-errata">http://www.w3.org/XML/xml-19980210-errata</a
>) as a convenience to readers. The errata list for this second edition is
available at <a href="http://www.w3.org/XML/xml-V10-2e-errata">http://www.w3.org/XML/xml-V10-2e-errata</a>.</p> <p>Please
report errors in this document to <a href="mailto:xml-editor@w3.org">xml-editor@w3.org</a>; <a
href="http://lists.w3.org/Archives/Public/xml-editor">archives</a> are available.</p> <div
class="note"><p class="prefix"><b>Note:</b></p> <p>C. M. Sperberg-McQueen's
affiliation has changed since the publication of the first edition. He is
now at the World Wide Web Consortium, and can be contacted at <a href="mailto:cmsmcq@w3.org">cmsmcq@w3.org</a>.</p> </div> </div> <div
class="toc"><h2><a name="contents">Table of Contents</a></h2><p class="toc">1 <a
href="#sec-intro">Introduction</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;1.1 <a
href="#sec-origin-goals">Origin and Goals</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;1.2 <a
href="#sec-terminology">Terminology</a><br class="html_compat"/>2 <a href="#sec-documents">Documents</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.1 <a href="#sec-well-formed">Well-Formed
XML Documents</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.2 <a href="#charsets">Characters</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.3 <a href="#sec-common-syn">Common
Syntactic Constructs</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.4 <a
href="#syntax">Character Data and Markup</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.5 <a
href="#sec-comments">Comments</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.6 <a
href="#sec-pi">Processing Instructions</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.7 <a
href="#sec-cdata-sect">CDATA Sections</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.8 <a
href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.9 <a
href="#sec-rmd">Standalone Document Declaration</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.10 <a
href="#sec-white-space">White Space Handling</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.11 <a
href="#sec-line-ends">End-of-Line Handling</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;2.12 <a
href="#sec-lang-tag">Language Identification</a><br class="html_compat"/>3 <a
href="#sec-logical-struct">Logical Structures</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;3.1 <a
href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;3.2 <a href="#elemdecls">Element
Type Declarations</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.2.1 <a
href="#sec-element-content">Element Content</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.2.2 <a
href="#sec-mixed-content">Mixed Content</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;3.3 <a
href="#attdecls">Attribute-List Declarations</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.1 <a
href="#sec-attribute-types">Attribute Types</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.2 <a
href="#sec-attr-defaults">Attribute Defaults</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3.3 <a
href="#AVNormalize">Attribute-Value Normalization</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;3.4 <a
href="#sec-condition-sect">Conditional Sections</a><br class="html_compat"/>4 <a
href="#sec-physical-struct">Physical Structures</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.1 <a
href="#sec-references">Character and Entity References</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.2 <a
href="#sec-entity-decl">Entity Declarations</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.2.1 <a
href="#sec-internal-ent">Internal Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.2.2 <a
href="#sec-external-ent">External Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.3 <a
href="#TextEntities">Parsed Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.1 <a
href="#sec-TextDecl">The Text Declaration</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.2 <a
href="#wf-entities">Well-Formed Parsed Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.3.3 <a
href="#charencoding">Character Encoding in Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.4 <a
href="#entproc">XML Processor Treatment of Entities and References</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.1 <a
href="#not-recognized">Not Recognized</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.2 <a
href="#included">Included</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.3 <a
href="#include-if-valid">Included If Validating</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.4 <a
href="#forbidden">Forbidden</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.5 <a
href="#inliteral">Included in Literal</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.6 <a
href="#notify">Notify</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.7 <a
href="#bypass">Bypassed</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.4.8 <a
href="#as-PE">Included as PE</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.5 <a
href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.6 <a href="#sec-predefined-ent">Predefined
Entities</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.7 <a href="#Notations">Notation
Declarations</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;4.8 <a href="#sec-doc-entity">Document
Entity</a><br class="html_compat"/>5 <a href="#sec-conformance">Conformance</a><br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;5.1 <a href="#proc-types">Validating
and Non-Validating Processors</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;5.2 <a
href="#safe-behavior">Using XML Processors</a><br class="html_compat"/>6 <a
href="#sec-notation">Notation</a><br class="html_compat"/></p><h3>Appendices</h3><p
class="toc">A <a href="#sec-bibliography">References</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;A.1 <a
href="#sec-existing-stds">Normative References</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;A.2 <a
href="#null">Other References</a><br class="html_compat"/>B <a href="#CharClasses">Character
Classes</a><br class="html_compat"/>C <a href="#sec-xml-and-sgml">XML and
SGML</a> (Non-Normative)<br class="html_compat"/>D <a href="#sec-entexpand">Expansion
of Entity and Character References</a> (Non-Normative)<br class="html_compat"/>E <a
href="#determinism">Deterministic Content Models</a> (Non-Normative)<br class="html_compat"/>F <a
href="#sec-guessing">Autodetection of Character Encodings</a> (Non-Normative)<br
class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;F.1 <a href="#sec-guessing-no-ext-info">Detection
Without External Encoding Information</a><br class="html_compat"/>&nbsp;&nbsp;&nbsp;&nbsp;F.2 <a
href="#sec-guessing-with-ext-info">Priorities in the Presence of External
Encoding Information</a><br class="html_compat"/>G <a href="#sec-xml-wg">W3C
XML Working Group</a> (Non-Normative)<br class="html_compat"/>H <a href="#sec-core-wg">W3C
XML Core Group</a> (Non-Normative)<br class="html_compat"/>I <a href="#b4d250b6c21">Production
Notes</a> (Non-Normative)<br class="html_compat"/></p></div><hr class="html_compat"/><div
class="body"> <div class="div1"> <h2><a name="sec-intro"></a>1 Introduction</h2> <p>Extensible
Markup Language, abbreviated XML, describes a class of data objects called <a
title="XML Document" href="#dt-xml-doc">XML documents</a> and partially describes
the behavior of computer programs which process them. XML is an application
profile or restricted form of SGML, the Standard Generalized Markup Language <a
href="#ISO8879">[ISO 8879]</a>. By construction, XML documents are conforming
SGML documents.</p> <p>XML documents are made up of storage units called <a
title="Entity" href="#dt-entity">entities</a>, which contain either parsed
or unparsed data. Parsed data is made up of <a title="Character" href="#dt-character">characters</a>,
some of which form <a title="Character Data" href="#dt-chardata">character
data</a>, and some of which form <a title="Markup" href="#dt-markup">markup</a>.
Markup encodes a description of the document's storage layout and logical
structure. XML provides a mechanism to impose constraints on the storage layout
and logical structure.</p> <p>[<a title="XML Processor" name="dt-xml-proc">Definition</a>:
A software module called an <b>XML processor</b> is used to read XML documents
and provide access to their content and structure.] [<a title="Application"
name="dt-app">Definition</a>: It is assumed that an XML processor is doing
its work on behalf of another module, called the <b>application</b>.] This
specification describes the required behavior of an XML processor in terms
of how it must read XML data and the information it must provide to the application.</p> <div
class="div2"> <h3><a name="sec-origin-goals"></a>1.1 Origin and Goals</h3> <p>XML
was developed by an XML Working Group (originally known as the SGML Editorial
Review Board) formed under the auspices of the World Wide Web Consortium (W3C)
in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active participation
of an XML Special Interest Group (previously known as the SGML Working Group)
also organized by the W3C. The membership of the XML Working Group is given
in an appendix. Dan Connolly served as the WG's contact with the W3C.</p> <p>The
design goals for XML are:</p> <ol>
<li><p>XML shall be straightforwardly usable over the Internet.</p></li>
<li><p>XML shall support a wide variety of applications.</p></li>
<li><p>XML shall be compatible with SGML.</p></li>
<li><p>It shall be easy to write programs which process XML documents.</p> </li>
<li><p>The number of optional features in XML is to be kept to the absolute
minimum, ideally zero.</p></li>
<li><p>XML documents should be human-legible and reasonably clear.</p></li>
<li><p>The XML design should be prepared quickly.</p></li>
<li><p>The design of XML shall be formal and concise.</p></li>
<li><p>XML documents shall be easy to create.</p></li>
<li><p>Terseness in XML markup is of minimal importance.</p></li>
</ol> <p>This specification, together with associated standards (Unicode and
ISO/IEC 10646 for characters, Internet RFC 1766 for language identification
tags, ISO 639 for language name codes, and ISO 3166 for country name codes),
provides all the information necessary to understand XML Version 1.0 and construct
computer programs to process it.</p> <p>This version of the XML specification
 may be distributed freely, as long as all text and legal notices remain intact.</p> </div> <div
class="div2"> <h3><a name="sec-terminology"></a>1.2 Terminology</h3> <p>The
terminology used to describe XML documents is defined in the body of this
specification. The terms defined in the following list are used in building
those definitions and in describing the actions of an XML processor: </p><dl>
<dt class="label">may</dt>
<dd> <p>[<a title="May" name="dt-may">Definition</a>: Conforming documents
and XML processors are permitted to but need not behave as described.]</p> </dd>
<dt class="label">must</dt>

⌨️ 快捷键说明

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