diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-11-01 14:20:57 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-11-01 14:20:57 +0000 |
commit | 186f05ec2451f6c447549a00cb1ebc6b322464b0 (patch) | |
tree | bdbb65cfebbdf7d64867b2230dd2392f10560b83 /tests/xmlspec | |
parent | 9852da20256ff46c50bf5d42018f4585170b9b75 (diff) | |
download | libxslt-186f05ec2451f6c447549a00cb1ebc6b322464b0.tar.gz libxslt-186f05ec2451f6c447549a00cb1ebc6b322464b0.tar.bz2 libxslt-186f05ec2451f6c447549a00cb1ebc6b322464b0.zip |
handle indent=no when using an HTML output this modified the output of
* libxslt/xsltutils.c: handle indent=no when using an HTML
output
* tests/docbook/result/* tests/xmlspec/REC-xml-*.html: this
modified the output of those test suites
Daniel
Diffstat (limited to 'tests/xmlspec')
-rw-r--r-- | tests/xmlspec/REC-xml-20001006-review.html | 2315 | ||||
-rw-r--r-- | tests/xmlspec/REC-xml-20001006.html | 2097 |
2 files changed, 767 insertions, 3645 deletions
diff --git a/tests/xmlspec/REC-xml-20001006-review.html b/tests/xmlspec/REC-xml-20001006-review.html index 7af8d96b..5abf91ab 100644 --- a/tests/xmlspec/REC-xml-20001006-review.html +++ b/tests/xmlspec/REC-xml-20001006-review.html @@ -1,10 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html lang="EN"> -<head> -<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<title>Extensible Markup Language (XML) 1.0 (Second Edition) -- Review Version</title> -<style type="text/css"> +<html lang="EN"><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Extensible Markup Language (XML) 1.0 (Second Edition) -- Review Version</title><style type="text/css"> code { font-family: monospace; } div.constraint, @@ -31,50 +26,28 @@ td.diff-add { background-color: yellow } td.diff-del { text-decoration: line-through } td.diff-chg { background-color: lime } td.diff-off { } -</style> -<link rel="stylesheet" type="text/css" href="W3C-REC.css"> -</head> -<body> +</style><link rel="stylesheet" type="text/css" href="W3C-REC.css"></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> +<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> +<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> -<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"><tbray@textuality.com></a> -</dd> -<dd>Jean Paoli, Microsoft <a href="mailto:jeanpa@microsoft.com"><jeanpa@microsoft.com></a> -</dd> +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> +<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"><tbray@textuality.com></a></dd> +<dd>Jean Paoli, Microsoft <a href="mailto:jeanpa@microsoft.com"><jeanpa@microsoft.com></a></dd> <dd><span class="diff-chg">C. M. Sperberg-McQueen, University of Illinois at Chicago and Text Encoding Initiative <a href="mailto:cmsmcq@uic.edu"><cmsmcq@uic.edu></a></span></dd> <dd><span class="diff-add">Eve Maler, Sun Microsystems, Inc. <a href="mailto:elm@east.sun.com"><eve.maler@east.sun.com></a> - Second Edition</span></dd> -</dl> -<p class="copyright"> -<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2000 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">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> -<div id="abstract"> +</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2000 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">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><div id="abstract"> <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 id="status"> +</div><div id="status"> <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 @@ -90,8 +63,7 @@ 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>. </span>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> -<div class="diff-del"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>This +<div class="diff-del"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>This specification uses the term URI, which is defined by <a href="#Berners-Lee">[Berners-Lee et al.]</a>, a work in progress expected to update <a href="#RFC1738">[IETF RFC1738]</a> and <a href="#RFC1808">[IETF RFC1808]</a>.</p></div> <div class="diff-add"><p>This second edition is <em>not</em> a new version of XML (first published 10 February 1998); @@ -100,29 +72,20 @@ at <a href="http://www.w3.org/XML/xml-19980210-errata">http://www.w3.org/XML/xml 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></div> <p>Please report errors in this document to <a href="mailto:xml-editor@w3.org">xml-editor@w3.org</a><span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E101">[E101]</a>; <a href="http://lists.w3.org/Archives/Public/xml-editor">archives</a> are available</span>.</p> -<div class="diff-add"><div class="note"> -<p class="prefix"><b>Note:</b></p> +<div class="diff-add"><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> <div class="toc"> -<h2><a name="contents">Table of Contents</a></h2> -<p class="toc">1 <a href="#sec-intro">Introduction</a><br> 1.1 <a href="#sec-origin-goals">Origin and Goals</a><br> 1.2 <a href="#sec-terminology">Terminology</a><br>2 <a href="#sec-documents">Documents</a><br> 2.1 <a href="#sec-well-formed">Well-Formed XML Documents</a><br> 2.2 <a href="#charsets">Characters</a><br> 2.3 <a href="#sec-common-syn">Common Syntactic Constructs</a><br> 2.4 <a href="#syntax">Character Data and Markup</a><br> 2.5 <a href="#sec-comments">Comments</a><br> 2.6 <a href="#sec-pi">Processing Instructions</a><br> 2.7 <a href="#sec-cdata-sect">CDATA Sections</a><br> 2.8 <a href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br> 2.9 <a href="#sec-rmd">Standalone Document Declaration</a><br> 2.10 <a href="#sec-white-space">White Space Handling</a><br> 2.11 <a href="#sec-line-ends">End-of-Line Handling</a><br> 2.12 <a href="#sec-lang-tag">Language Identification</a><br>3 <a href="#sec-logical-struct">Logical Structures</a><br> 3.1 <a href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br> 3.2 <a href="#elemdecls">Element Type Declarations</a><br> 3.2.1 <a href="#sec-element-content">Element Content</a><br> 3.2.2 <a href="#sec-mixed-content">Mixed Content</a><br> 3.3 <a href="#attdecls">Attribute-List Declarations</a><br> 3.3.1 <a href="#sec-attribute-types">Attribute Types</a><br> 3.3.2 <a href="#sec-attr-defaults">Attribute Defaults</a><br> 3.3.3 <a href="#AVNormalize">Attribute-Value -Normalization</a><br> 3.4 <a href="#sec-condition-sect">Conditional Sections</a><br>4 <a href="#sec-physical-struct">Physical Structures</a><br> 4.1 <a href="#sec-references">Character and Entity References</a><br> 4.2 <a href="#sec-entity-decl">Entity Declarations</a><br> 4.2.1 <a href="#sec-internal-ent">Internal Entities</a><br> 4.2.2 <a href="#sec-external-ent">External Entities</a><br> 4.3 <a href="#TextEntities">Parsed Entities</a><br> 4.3.1 <a href="#sec-TextDecl">The Text Declaration</a><br> 4.3.2 <a href="#wf-entities">Well-Formed Parsed Entities</a><br> 4.3.3 <a href="#charencoding">Character Encoding in Entities</a><br> 4.4 <a href="#entproc">XML Processor Treatment of Entities and References</a><br> 4.4.1 <a href="#not-recognized">Not Recognized</a><br> 4.4.2 <a href="#included">Included</a><br> 4.4.3 <a href="#include-if-valid">Included If Validating</a><br> 4.4.4 <a href="#forbidden">Forbidden</a><br> 4.4.5 <a href="#inliteral">Included in Literal</a><br> 4.4.6 <a href="#notify">Notify</a><br> 4.4.7 <a href="#bypass">Bypassed</a><br> 4.4.8 <a href="#as-PE">Included as PE</a><br> 4.5 <a href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br> 4.6 <a href="#sec-predefined-ent">Predefined Entities</a><br> 4.7 <a href="#Notations">Notation Declarations</a><br> 4.8 <a href="#sec-doc-entity">Document Entity</a><br>5 <a href="#sec-conformance">Conformance</a><br> 5.1 <a href="#proc-types">Validating and Non-Validating Processors</a><br> 5.2 <a href="#safe-behavior">Using XML Processors</a><br>6 <a href="#sec-notation">Notation</a><br> -</p> -<h3>Appendices</h3> -<p class="toc">A <a href="#sec-bibliography">References</a><br> A.1 <a href="#sec-existing-stds">Normative References</a><br> A.2 <a href="#null">Other References</a><br>B <a href="#CharClasses">Character Classes</a><br>C <a href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br>D <a href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br>E <a href="#determinism">Deterministic Content Models</a> (Non-Normative)<br>F <a href="#sec-guessing">Autodetection -of Character Encodings</a> (Non-Normative)<br> F.1 <a href="#sec-guessing-no-ext-info">Detection Without External Encoding Information</a><br> F.2 <a href="#sec-guessing-with-ext-info">Priorities in the Presence of External Encoding Information</a><br>G <a href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br>H <a href="#sec-core-wg">W3C XML Core Group</a> (Non-Normative)<br>I <a href="#id2675459">Production Notes</a> (Non-Normative)<br> -</p> -</div> -<hr> -<div class="body"> +<h2><a name="contents">Table of Contents</a></h2><p class="toc">1 <a href="#sec-intro">Introduction</a><br> 1.1 <a href="#sec-origin-goals">Origin and Goals</a><br> 1.2 <a href="#sec-terminology">Terminology</a><br>2 <a href="#sec-documents">Documents</a><br> 2.1 <a href="#sec-well-formed">Well-Formed XML Documents</a><br> 2.2 <a href="#charsets">Characters</a><br> 2.3 <a href="#sec-common-syn">Common Syntactic Constructs</a><br> 2.4 <a href="#syntax">Character Data and Markup</a><br> 2.5 <a href="#sec-comments">Comments</a><br> 2.6 <a href="#sec-pi">Processing Instructions</a><br> 2.7 <a href="#sec-cdata-sect">CDATA Sections</a><br> 2.8 <a href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br> 2.9 <a href="#sec-rmd">Standalone Document Declaration</a><br> 2.10 <a href="#sec-white-space">White Space Handling</a><br> 2.11 <a href="#sec-line-ends">End-of-Line Handling</a><br> 2.12 <a href="#sec-lang-tag">Language Identification</a><br>3 <a href="#sec-logical-struct">Logical Structures</a><br> 3.1 <a href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br> 3.2 <a href="#elemdecls">Element Type Declarations</a><br> 3.2.1 <a href="#sec-element-content">Element Content</a><br> 3.2.2 <a href="#sec-mixed-content">Mixed Content</a><br> 3.3 <a href="#attdecls">Attribute-List Declarations</a><br> 3.3.1 <a href="#sec-attribute-types">Attribute Types</a><br> 3.3.2 <a href="#sec-attr-defaults">Attribute Defaults</a><br> 3.3.3 <a href="#AVNormalize">Attribute-Value +Normalization</a><br> 3.4 <a href="#sec-condition-sect">Conditional Sections</a><br>4 <a href="#sec-physical-struct">Physical Structures</a><br> 4.1 <a href="#sec-references">Character and Entity References</a><br> 4.2 <a href="#sec-entity-decl">Entity Declarations</a><br> 4.2.1 <a href="#sec-internal-ent">Internal Entities</a><br> 4.2.2 <a href="#sec-external-ent">External Entities</a><br> 4.3 <a href="#TextEntities">Parsed Entities</a><br> 4.3.1 <a href="#sec-TextDecl">The Text Declaration</a><br> 4.3.2 <a href="#wf-entities">Well-Formed Parsed Entities</a><br> 4.3.3 <a href="#charencoding">Character Encoding in Entities</a><br> 4.4 <a href="#entproc">XML Processor Treatment of Entities and References</a><br> 4.4.1 <a href="#not-recognized">Not Recognized</a><br> 4.4.2 <a href="#included">Included</a><br> 4.4.3 <a href="#include-if-valid">Included If Validating</a><br> 4.4.4 <a href="#forbidden">Forbidden</a><br> 4.4.5 <a href="#inliteral">Included in Literal</a><br> 4.4.6 <a href="#notify">Notify</a><br> 4.4.7 <a href="#bypass">Bypassed</a><br> 4.4.8 <a href="#as-PE">Included as PE</a><br> 4.5 <a href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br> 4.6 <a href="#sec-predefined-ent">Predefined Entities</a><br> 4.7 <a href="#Notations">Notation Declarations</a><br> 4.8 <a href="#sec-doc-entity">Document Entity</a><br>5 <a href="#sec-conformance">Conformance</a><br> 5.1 <a href="#proc-types">Validating and Non-Validating Processors</a><br> 5.2 <a href="#safe-behavior">Using XML Processors</a><br>6 <a href="#sec-notation">Notation</a><br></p> +<h3>Appendices</h3><p class="toc">A <a href="#sec-bibliography">References</a><br> A.1 <a href="#sec-existing-stds">Normative References</a><br> A.2 <a href="#null">Other References</a><br>B <a href="#CharClasses">Character Classes</a><br>C <a href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br>D <a href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br>E <a href="#determinism">Deterministic Content Models</a> (Non-Normative)<br>F <a href="#sec-guessing">Autodetection +of Character Encodings</a> (Non-Normative)<br> F.1 <a href="#sec-guessing-no-ext-info">Detection Without External Encoding Information</a><br> F.2 <a href="#sec-guessing-with-ext-info">Priorities in the Presence of External Encoding Information</a><br>G <a href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br>H <a href="#sec-core-wg">W3C XML Core Group</a> (Non-Normative)<br>I <a href="#id2674567">Production Notes</a> (Non-Normative)<br></p></div><hr><div class="body"> <div class="div1"> -<h2> -<a name="sec-intro"></a>1 Introduction</h2> +<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 @@ -144,8 +107,7 @@ 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> +<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 @@ -158,8 +120,7 @@ the W3C.</p> <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><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> @@ -179,8 +140,7 @@ all text and legal notices remain intact.</p> </div> <div class="div2"> -<h3> -<a name="sec-terminology"></a>1.2 Terminology</h3> +<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> @@ -263,8 +223,7 @@ base of SGML processors which predate the WebSGML Adaptations Annex to ISO 8879. <div class="div1"> -<h2> -<a name="sec-documents"></a>2 Documents</h2> +<h2><a name="sec-documents"></a>2 Documents</h2> <p>[<a name="dt-xml-doc" title="XML Document">Definition</a>: A data object is an <b>XML document</b> if it is <a title="Well-Formed" href="#dt-wellformed">well-formed</a>, as defined in this specification. A well-formed XML document may in addition @@ -280,34 +239,22 @@ markup. The logical and physical structures must nest properly, as described in <a href="#wf-entities"><b>4.3.2 Well-Formed Parsed Entities</b></a>.</p> <div class="div2"> -<h3> -<a name="sec-well-formed"></a>2.1 Well-Formed XML Documents</h3> +<h3><a name="sec-well-formed"></a>2.1 Well-Formed XML Documents</h3> <p>[<a name="dt-wellformed" title="Well-Formed">Definition</a>: A textual object is a <b>well-formed</b> XML document if:]</p> <ol> -<li> -<p>Taken as a whole, it matches the production labeled <a href="#NT-document">document</a>.</p> +<li><p>Taken as a whole, it matches the production labeled <a href="#NT-document">document</a>.</p> </li> -<li> -<p>It meets all the well-formedness constraints given in this specification.</p> +<li><p>It meets all the well-formedness constraints given in this specification.</p> </li> <li><p>Each of the <a title="Text Entity" href="#dt-parsedent">parsed entities</a> which is referenced directly or indirectly within the document is <a title="Well-Formed" href="#dt-wellformed">well-formed</a>.</p></li> </ol> -<h5>Document</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-document"></a>[1] </td> -<td><code>document</code></td> -<td> ::= </td> -<td><code><a href="#NT-prolog">prolog</a> <a href="#NT-element">element</a> <a href="#NT-Misc">Misc</a>*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Document</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-document"></a>[1] </td><td><code>document</code></td><td> ::= </td><td><code><a href="#NT-prolog">prolog</a> <a href="#NT-element">element</a> <a href="#NT-Misc">Misc</a>*</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Matching the <a href="#NT-document">document</a> production implies that:</p> <ol> -<li> -<p>It contains one or more <a title="Element" href="#dt-element">elements</a>.</p> +<li><p>It contains one or more <a title="Element" href="#dt-element">elements</a>.</p> </li> <li><p>[<a name="dt-root" title="Root Element">Definition</a>: There is exactly one element, @@ -327,8 +274,7 @@ a <b>child</b> of <code>P</code>.]</p> </div> <div class="div2"> -<h3> -<a name="charsets"></a>2.2 Characters</h3> +<h3><a name="charsets"></a>2.2 Characters</h3> <p>[<a name="dt-text" title="Text">Definition</a>: A parsed entity contains <b>text</b>, a sequence of <a title="Character" href="#dt-character">characters</a>, which may represent markup or character data.] [<a name="dt-character" title="Character">Definition</a>: A <b>character</b> @@ -344,16 +290,8 @@ The use of "compatibility characters", as defined in section 6.8 of <a href="#Unicode">[Unicode]</a> <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a>(see also D21 in section 3.6 of <a href="#Unicode3">[Unicode3]</a>)</span>, is discouraged.]</p> -<h5>Character Range</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Char"></a>[2] </td> -<td><code>Char</code></td> -<td> ::= </td> -<td><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</code></td> -<xsltdebug></xsltdebug><td><i>/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */</i></td> -</tr> +<h5>Character Range</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Char"></a>[2] </td><td><code>Char</code></td><td> ::= </td><td><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</code></td><xsltdebug></xsltdebug><td><i>/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */</i></td></tr> </tbody></table> <p>The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors must accept the UTF-8 and UTF-16 @@ -363,23 +301,13 @@ or for bringing other encodings into play, are discussed later, in <a href="#cha </div> <div class="div2"> -<h3> -<a name="sec-common-syn"></a>2.3 Common Syntactic Constructs</h3> +<h3><a name="sec-common-syn"></a>2.3 Common Syntactic Constructs</h3> <p>This section defines some symbols used widely in the grammar.</p> -<p> -<a href="#NT-S">S</a> (white space) consists of one or more space (#x20) +<p><a href="#NT-S">S</a> (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.</p> -<h5>White Space</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-S"></a>[3] </td> -<td><code>S</code></td> -<td> ::= </td> -<td><code>(#x20 | #x9 | #xD | #xA)+</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>White Space</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-S"></a>[3] </td><td><code>S</code></td><td> ::= </td><td><code>(#x20 | #x9 | #xD | #xA)+</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>Characters are classified for convenience as letters, digits, or other characters. <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E30">[E30]</a>A @@ -392,10 +320,8 @@ letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string "<code>xml</code>", or any string which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are reserved for standardization in this or future versions of this specification.</p> -<div class="note"> -<p class="prefix"><b>Note:</b></p> -<div class="diff-chg"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E98">[E98]</a>The +<div class="note"><p class="prefix"><b>Note:</b></p> +<div class="diff-chg"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E98">[E98]</a>The Namespaces in XML Recommendation <a href="#xml-names">[XML Names]</a> assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must @@ -404,50 +330,8 @@ accept the colon as a name character.</p></div> <p>An <a href="#NT-Nmtoken">Nmtoken</a> (name token) is any mixture of name characters.</p> -<h5>Names and Tokens</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NameChar"></a>[4] </td> -<td><code>NameChar</code></td> -<td> ::= </td> -<td><code><a href="#NT-Letter">Letter</a> | <a href="#NT-Digit">Digit</a> -| '.' | '-' | '_' | ':' | <a href="#NT-CombiningChar">CombiningChar</a> | <a href="#NT-Extender">Extender</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Name"></a>[5] </td> -<td><code>Name</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Letter">Letter</a> | '_' | ':') (<a href="#NT-NameChar">NameChar</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Names"></a>[6] </td> -<td><code>Names</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Name">Name</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Nmtoken"></a>[7] </td> -<td><code>Nmtoken</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-NameChar">NameChar</a>)+</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Nmtokens"></a>[8] </td> -<td><code>Nmtokens</code></td> -<td> ::= </td> -<td><code><a href="#NT-Nmtoken">Nmtoken</a> (<a href="#NT-S">S</a> <a href="#NT-Nmtoken">Nmtoken</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Names and Tokens</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-NameChar"></a>[4] </td><td><code>NameChar</code></td><td> ::= </td><td><code><a href="#NT-Letter">Letter</a> | <a href="#NT-Digit">Digit</a> +| '.' | '-' | '_' | ':' | <a href="#NT-CombiningChar">CombiningChar</a> | <a href="#NT-Extender">Extender</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Name"></a>[5] </td><td><code>Name</code></td><td> ::= </td><td><code>(<a href="#NT-Letter">Letter</a> | '_' | ':') (<a href="#NT-NameChar">NameChar</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Names"></a>[6] </td><td><code>Names</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Name">Name</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Nmtoken"></a>[7] </td><td><code>Nmtoken</code></td><td> ::= </td><td><code>(<a href="#NT-NameChar">NameChar</a>)+</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Nmtokens"></a>[8] </td><td><code>Nmtokens</code></td><td> ::= </td><td><code><a href="#NT-Nmtoken">Nmtoken</a> (<a href="#NT-S">S</a> <a href="#NT-Nmtoken">Nmtoken</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. Literals are used for specifying the content of internal entities (<a href="#NT-EntityValue">EntityValue</a>), the values @@ -455,73 +339,13 @@ of attributes (<a href="#NT-AttValue">AttValue</a>), and external identifiers (<a href="#NT-SystemLiteral">SystemLiteral</a>). Note that a <a href="#NT-SystemLiteral">SystemLiteral</a> can be parsed without scanning for markup.</p> -<h5>Literals</h5> -<table class="scrap" summary="Scrap"> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityValue"></a>[9] </td> -<td><code>EntityValue</code></td> -<td> ::= </td> -<td><code>'"' ([^%&"] | <a href="#NT-PEReference">PEReference</a> -| <a href="#NT-Reference">Reference</a>)* '"' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| "'" ([^%&'] | <a href="#NT-PEReference">PEReference</a> | <a href="#NT-Reference">Reference</a>)* "'"</code></td> -</tr> -</tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-AttValue"></a>[10] </td> -<td><code>AttValue</code></td> -<td> ::= </td> -<td><code>'"' ([^<&"] | <a href="#NT-Reference">Reference</a>)* -'"' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| "'" ([^<&'] | <a href="#NT-Reference">Reference</a>)* -"'"</code></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-SystemLiteral"></a>[11] </td> -<td><code>SystemLiteral</code></td> -<td> ::= </td> -<td><code>('"' [^"]* '"') | ("'" [^']* "'") </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PubidLiteral"></a>[12] </td> -<td><code>PubidLiteral</code></td> -<td> ::= </td> -<td><code>'"' <a href="#NT-PubidChar">PubidChar</a>* '"' -| "'" (<a href="#NT-PubidChar">PubidChar</a> - "'")* "'"</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PubidChar"></a>[13] </td> -<td><code>PubidChar</code></td> -<td> ::= </td> -<td><code>#x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> -<div class="diff-add"><div class="note"> -<p class="prefix"><b>Note:</b></p> -<p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E72">[E72]</a>Although +<h5>Literals</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EntityValue"></a>[9] </td><td><code>EntityValue</code></td><td> ::= </td><td><code>'"' ([^%&"] | <a href="#NT-PEReference">PEReference</a> +| <a href="#NT-Reference">Reference</a>)* '"' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^%&'] | <a href="#NT-PEReference">PEReference</a> | <a href="#NT-Reference">Reference</a>)* "'"</code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-AttValue"></a>[10] </td><td><code>AttValue</code></td><td> ::= </td><td><code>'"' ([^<&"] | <a href="#NT-Reference">Reference</a>)* +'"' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^<&'] | <a href="#NT-Reference">Reference</a>)* +"'"</code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-SystemLiteral"></a>[11] </td><td><code>SystemLiteral</code></td><td> ::= </td><td><code>('"' [^"]* '"') | ("'" [^']* "'") </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PubidLiteral"></a>[12] </td><td><code>PubidLiteral</code></td><td> ::= </td><td><code>'"' <a href="#NT-PubidChar">PubidChar</a>* '"' +| "'" (<a href="#NT-PubidChar">PubidChar</a> - "'")* "'"</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PubidChar"></a>[13] </td><td><code>PubidChar</code></td><td> ::= </td><td><code>#x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code></td><xsltdebug></xsltdebug></tr></tbody></table> +<div class="diff-add"><div class="note"><p class="prefix"><b>Note:</b></p> +<p><a href="http://www.w3.org/XML/xml-19980210-errata#E72">[E72]</a>Although the <a href="#NT-EntityValue">EntityValue</a> production allows the definition of an entity consisting of a single explicit <code><</code> in the literal (e.g., <code><!ENTITY mylt "<"></code>), it is strongly advised to avoid @@ -531,10 +355,8 @@ error.</p> </div> <div class="div2"> -<h3> -<a name="syntax"></a>2.4 Character Data and Markup</h3> -<p> -<a title="Text" href="#dt-text">Text</a> consists of intermingled <a title="Character Data" href="#dt-chardata">character data</a> and markup. [<a name="dt-markup" title="Markup">Definition</a>: <b>Markup</b> takes the form of <a title="Start-Tag" href="#dt-stag">start-tags</a>, <a title="End Tag" href="#dt-etag">end-tags</a>, <a title="Empty" href="#dt-empty">empty-element tags</a>, <a title="Entity Reference" href="#dt-entref">entity references</a>, <a title="Character Reference" href="#dt-charref">character +<h3><a name="syntax"></a>2.4 Character Data and Markup</h3> +<p><a title="Text" href="#dt-text">Text</a> consists of intermingled <a title="Character Data" href="#dt-chardata">character data</a> and markup. [<a name="dt-markup" title="Markup">Definition</a>: <b>Markup</b> takes the form of <a title="Start-Tag" href="#dt-stag">start-tags</a>, <a title="End Tag" href="#dt-etag">end-tags</a>, <a title="Empty" href="#dt-empty">empty-element tags</a>, <a title="Entity Reference" href="#dt-entref">entity references</a>, <a title="Character Reference" href="#dt-charref">character references</a>, <a title="Comment" href="#dt-comment">comments</a>, <a title="CDATA Section" href="#dt-cdsection">CDATA section</a> delimiters, <a title="Document Type Declaration" href="#dt-doctype">document type declarations</a>, <a title="Processing instruction" href="#dt-pi">processing instructions</a>, <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E89">[E89]</a><a href="#NT-XMLDecl">XML declarations</a>, <a href="#NT-TextDecl">text declarations</a>, and any white space that is at the top level of the document entity (that @@ -564,20 +386,11 @@ delimiter, "<code>]]></code>".</p> apostrophe or single-quote character (') may be represented as "<code>&apos;</code>", and the double-quote character (") as "<code>&quot;</code>".</p> -<h5>Character Data</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-CharData"></a>[14] </td> -<td><code>CharData</code></td> -<td> ::= </td> -<td><code>[^<&]* - ([^<&]* ']]>' [^<&]*)</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Character Data</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CharData"></a>[14] </td><td><code>CharData</code></td><td> ::= </td><td><code>[^<&]* - ([^<&]* ']]>' [^<&]*)</code></td><xsltdebug></xsltdebug></tr></tbody></table> </div> <div class="div2"> -<h3> -<a name="sec-comments"></a>2.5 Comments</h3> +<h3><a name="sec-comments"></a>2.5 Comments</h3> <p>[<a name="dt-comment" title="Comment">Definition</a>: <b>Comments</b> may appear anywhere in a document outside other <a title="Markup" href="#dt-markup">markup</a>; in addition, they may appear within the document type declaration at places @@ -586,55 +399,26 @@ data</a>; an XML processor may, but need not, make it possible for an application to retrieve the text of comments. <a title="For Compatibility" href="#dt-compat">For compatibility</a>, the string "<code>--</code>" (double-hyphen) must not occur within comments.] <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E63">[E63]</a>Parameter -entity references are not recognized within comments.</span> -</p> - -<h5>Comments</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-Comment"></a>[15] </td> -<td><code>Comment</code></td> -<td> ::= </td> -<td><code>'<!--' ((<a href="#NT-Char">Char</a> - '-') | ('-' -(<a href="#NT-Char">Char</a> - '-')))* '-->'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +entity references are not recognized within comments.</span></p> + +<h5>Comments</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-Comment"></a>[15] </td><td><code>Comment</code></td><td> ::= </td><td><code>'<!--' ((<a href="#NT-Char">Char</a> - '-') | ('-' +(<a href="#NT-Char">Char</a> - '-')))* '-->'</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>An example of a comment:</p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre><!-- declarations for <head> & <body> --></pre></td></tr></table> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E27">[E27]</a>Note +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E27">[E27]</a>Note that the grammar does not allow a comment ending in <code>---></code>. The following example is <em>not</em> well-formed.</p></div> <div class="diff-add"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td class="diff-add"><pre><!-- B+, B, or B---></pre></td></tr></table></div> </div> <div class="div2"> -<h3> -<a name="sec-pi"></a>2.6 Processing Instructions</h3> +<h3><a name="sec-pi"></a>2.6 Processing Instructions</h3> <p>[<a name="dt-pi" title="Processing instruction">Definition</a>: <b>Processing instructions</b> (PIs) allow documents to contain instructions for applications.]</p> -<h5>Processing Instructions</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PI"></a>[16] </td> -<td><code>PI</code></td> -<td> ::= </td> -<td><code>'<?' <a href="#NT-PITarget">PITarget</a> (<a href="#NT-S">S</a> -(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* '?>' <a href="#NT-Char">Char</a>*)))? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PITarget"></a>[17] </td> -<td><code>PITarget</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> - (('X' | 'x') ('M' | -'m') ('L' | 'l'))</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Processing Instructions</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-PI"></a>[16] </td><td><code>PI</code></td><td> ::= </td><td><code>'<?' <a href="#NT-PITarget">PITarget</a> (<a href="#NT-S">S</a> +(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* '?>' <a href="#NT-Char">Char</a>*)))? '?>'</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PITarget"></a>[17] </td><td><code>PITarget</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> - (('X' | 'x') ('M' | +'m') ('L' | 'l'))</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>PIs are not part of the document's <a title="Character Data" href="#dt-chardata">character data</a>, but must be passed through to the application. The PI begins with a target (<a href="#NT-PITarget">PITarget</a>) used to identify the application @@ -642,55 +426,19 @@ to which the instruction is directed. The target names "<code>XML</code>&qu and so on are reserved for standardization in this or future versions of this specification. The XML <a title="Notation" href="#dt-notation">Notation</a> mechanism may be used for formal declaration of PI targets. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E63">[E63]</a>Parameter -entity references are not recognized within processing instructions.</span> -</p> +entity references are not recognized within processing instructions.</span></p> </div> <div class="div2"> -<h3> -<a name="sec-cdata-sect"></a>2.7 CDATA Sections</h3> +<h3><a name="sec-cdata-sect"></a>2.7 CDATA Sections</h3> <p>[<a name="dt-cdsection" title="CDATA Section">Definition</a>: <b>CDATA sections</b> may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "<code><![CDATA[</code>" and end with the string "<code>]]></code>":]</p> -<h5>CDATA Sections</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDSect"></a>[18] </td> -<td><code>CDSect</code></td> -<td> ::= </td> -<td><code><a href="#NT-CDStart">CDStart</a> <a href="#NT-CData">CData</a> <a href="#NT-CDEnd">CDEnd</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDStart"></a>[19] </td> -<td><code>CDStart</code></td> -<td> ::= </td> -<td><code>'<![CDATA['</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CData"></a>[20] </td> -<td><code>CData</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* -']]>' <a href="#NT-Char">Char</a>*)) </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDEnd"></a>[21] </td> -<td><code>CDEnd</code></td> -<td> ::= </td> -<td><code>']]>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>CDATA Sections</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CDSect"></a>[18] </td><td><code>CDSect</code></td><td> ::= </td><td><code><a href="#NT-CDStart">CDStart</a> <a href="#NT-CData">CData</a> <a href="#NT-CDEnd">CDEnd</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CDStart"></a>[19] </td><td><code>CDStart</code></td><td> ::= </td><td><code>'<![CDATA['</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CData"></a>[20] </td><td><code>CData</code></td><td> ::= </td><td><code>(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* +']]>' <a href="#NT-Char">Char</a>*)) </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CDEnd"></a>[21] </td><td><code>CDEnd</code></td><td> ::= </td><td><code>']]>'</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Within a CDATA section, only the <a href="#NT-CDEnd">CDEnd</a> string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "<code>&lt;</code>" @@ -701,8 +449,7 @@ and "<code></greeting></code>" are recognized as <a title="Chara </div> <div class="div2"> -<h3> -<a name="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration</h3> +<h3><a name="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration</h3> <p>[<a name="dt-xmldecl" title="XML Declaration">Definition</a>: XML documents <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E107">[E107]</a>should</span> begin with an <b>XML declaration</b> which specifies the version of XML being used.] For example, the following is a complete XML document, <a title="Well-Formed" href="#dt-wellformed">well-formed</a> but not <a title="Validity" href="#dt-valid">valid</a>:</p> @@ -730,60 +477,17 @@ expressed in it.]</p> <p>The document type declaration must appear before the first <a title="Element" href="#dt-element">element</a> in the document.</p> -<h5>Prolog</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-prolog"></a>[22] </td> -<td><code>prolog</code></td> -<td> ::= </td> -<td><code><a href="#NT-XMLDecl">XMLDecl</a>? <a href="#NT-Misc">Misc</a>* -(<a href="#NT-doctypedecl">doctypedecl</a> <a href="#NT-Misc">Misc</a>*)?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-XMLDecl"></a>[23] </td> -<td><code>XMLDecl</code></td> -<td> ::= </td> -<td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a> <a href="#NT-EncodingDecl">EncodingDecl</a>? <a href="#NT-SDDecl">SDDecl</a>? <a href="#NT-S">S</a>? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-VersionInfo"></a>[24] </td> -<td class="diff-chg"><code>VersionInfo</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code><a href="#NT-S">S</a> 'version' <a href="#NT-Eq">Eq</a> +<h5>Prolog</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-prolog"></a>[22] </td><td><code>prolog</code></td><td> ::= </td><td><code><a href="#NT-XMLDecl">XMLDecl</a>? <a href="#NT-Misc">Misc</a>* +(<a href="#NT-doctypedecl">doctypedecl</a> <a href="#NT-Misc">Misc</a>*)?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-XMLDecl"></a>[23] </td><td><code>XMLDecl</code></td><td> ::= </td><td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a> <a href="#NT-EncodingDecl">EncodingDecl</a>? <a href="#NT-SDDecl">SDDecl</a>? <a href="#NT-S">S</a>? '?>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td class="diff-chg"><a name="NT-VersionInfo"></a>[24] </td><td class="diff-chg"><code>VersionInfo</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code><a href="#NT-S">S</a> 'version' <a href="#NT-Eq">Eq</a> ("'" <a href="#NT-VersionNum">VersionNum</a> "'" | '"' <a href="#NT-VersionNum">VersionNum</a> -'"')<i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E15">[E15]</a> */</i></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Eq"></a>[25] </td> -<td><code>Eq</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a>? '=' <a href="#NT-S">S</a>?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-VersionNum"></a>[26] </td> -<td><code>VersionNum</code></td> -<td> ::= </td> -<td><code>([a-zA-Z0-9_.:] | '-')+</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Misc"></a>[27] </td> -<td><code>Misc</code></td> -<td> ::= </td> -<td><code><a href="#NT-Comment">Comment</a> | <a href="#NT-PI">PI</a> -| <a href="#NT-S">S</a></code></td> -<xsltdebug></xsltdebug> -</tr> +'"')<i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E15">[E15]</a> */</i></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Eq"></a>[25] </td><td><code>Eq</code></td><td> ::= </td><td><code><a href="#NT-S">S</a>? '=' <a href="#NT-S">S</a>?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-VersionNum"></a>[26] </td><td><code>VersionNum</code></td><td> ::= </td><td><code>([a-zA-Z0-9_.:] | '-')+</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Misc"></a>[27] </td><td><code>Misc</code></td><td> ::= </td><td><code><a href="#NT-Comment">Comment</a> | <a href="#NT-PI">PI</a> +| <a href="#NT-S">S</a></code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>[<a name="dt-doctype" title="Document Type Declaration">Definition</a>: The XML <b>document type declaration</b> contains or points to <a title="markup declaration" href="#dt-markupdecl">markup @@ -800,69 +504,18 @@ entities</a>, as described in the well-formedness and validity constraints below. For <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E14">[E14]</a>further</span> information, see <a href="#sec-physical-struct"><b>4 Physical Structures</b></a>.</p> -<h5>Document Type Definition</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-doctypedecl"></a>[28] </td> -<td class="diff-chg"><code>doctypedecl</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code>'<!DOCTYPE' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> +<h5>Document Type Definition</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td class="diff-chg"><a name="NT-doctypedecl"></a>[28] </td><td class="diff-chg"><code>doctypedecl</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code>'<!DOCTYPE' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-ExternalID">ExternalID</a>)? <a href="#NT-S">S</a>? ('[' (<a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-DeclSep">DeclSep</a>)* -']' <a href="#NT-S">S</a>?)? '>'</code></td> -<xsltdebug></xsltdebug><td><a href="#vc-roottype">[VC: Root Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><a href="#ExtSubset">[WFC: External -Subset]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td class="diff-add"> -<a name="NT-DeclSep"></a>[28a] </td> -<td class="diff-add"><code>DeclSep</code></td> -<td class="diff-add"> ::= </td> -<td class="diff-add"><code><a href="#NT-PEReference">PEReference</a> | <a href="#NT-S">S</a></code></td> -<xsltdebug></xsltdebug><td class="diff-add"><a href="#PE-between-Decls">[WFC: PE -Between Declarations]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-markupdecl"></a>[29] </td> -<td><code>markupdecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-elementdecl">elementdecl</a> | <a href="#NT-AttlistDecl">AttlistDecl</a> | <a href="#NT-EntityDecl">EntityDecl</a> -| <a href="#NT-NotationDecl">NotationDecl</a> | <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a> </code></td> -<xsltdebug></xsltdebug><td><a href="#vc-PEinMarkupDecl">[VC: Proper Declaration/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#wfc-PEinInternalSubset">[WFC: PEs in Internal Subset]</a></td> -</tr> +']' <a href="#NT-S">S</a>?)? '>'</code></td><xsltdebug></xsltdebug><td><a href="#vc-roottype">[VC: Root Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><a href="#ExtSubset">[WFC: External +Subset]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td></tr> +<tr valign="baseline"><td class="diff-add"><a name="NT-DeclSep"></a>[28a] </td><td class="diff-add"><code>DeclSep</code></td><td class="diff-add"> ::= </td><td class="diff-add"><code><a href="#NT-PEReference">PEReference</a> | <a href="#NT-S">S</a></code></td><xsltdebug></xsltdebug><td class="diff-add"><a href="#PE-between-Decls">[WFC: PE +Between Declarations]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td></tr> +<tr valign="baseline"><td><a name="NT-markupdecl"></a>[29] </td><td><code>markupdecl</code></td><td> ::= </td><td><code><a href="#NT-elementdecl">elementdecl</a> | <a href="#NT-AttlistDecl">AttlistDecl</a> | <a href="#NT-EntityDecl">EntityDecl</a> +| <a href="#NT-NotationDecl">NotationDecl</a> | <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a> </code></td><xsltdebug></xsltdebug><td><a href="#vc-PEinMarkupDecl">[VC: Proper Declaration/PE Nesting]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#wfc-PEinInternalSubset">[WFC: PEs in Internal Subset]</a></td></tr> </tbody></table> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E82">[E82]</a>Note +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E82">[E82]</a>Note that it is possible to construct a well-formed document containing a <a href="#NT-doctypedecl">doctypedecl</a> that neither points to an external subset nor contains an internal subset.</p></div> <p>The markup declarations may be made up in whole or in part of the <a title="Replacement Text" href="#dt-repltext">replacement text</a> of <a title="Parameter entity" href="#dt-PE">parameter @@ -870,53 +523,33 @@ entities</a>. The productions later in this specification for individual nonterminals (<a href="#NT-elementdecl">elementdecl</a>, <a href="#NT-AttlistDecl">AttlistDecl</a>, and so on) describe the declarations <em>after</em> all the parameter entities have been <a title="Include" href="#dt-include">included</a>.</p> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E75">[E75]</a>Parameter +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E75">[E75]</a>Parameter entity references are recognized anywhere in the DTD (internal and external subsets and external parameter entities), except in literals, processing instructions, comments, and the contents of ignored conditional sections (see <a href="#sec-condition-sect"><b>3.4 Conditional Sections</b></a>). They are also recognized in entity value literals. The use of parameter entities in the internal subset is restricted as described below.</p></div> -<div class="constraint"> -<p class="prefix"> -<a name="vc-roottype"></a><b>Validity constraint: Root Element Type</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="vc-roottype"></a><b>Validity constraint: Root Element Type</b></p><p>The <a href="#NT-Name">Name</a> in the document type declaration must match the element type of the <a title="Root Element" href="#dt-root">root element</a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="vc-PEinMarkupDecl"></a><b>Validity constraint: Proper Declaration/PE Nesting</b> -</p> +<div class="constraint"><p class="prefix"><a name="vc-PEinMarkupDecl"></a><b>Validity constraint: Proper Declaration/PE Nesting</b></p> <p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (<a href="#NT-markupdecl">markupdecl</a> above) is contained in the replacement text for a <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity reference</a>, both must be contained in the same replacement text.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="wfc-PEinInternalSubset"></a><b>Well-formedness constraint: PEs in Internal Subset</b> -</p> -<p>In +<div class="constraint"><p class="prefix"><a name="wfc-PEinInternalSubset"></a><b>Well-formedness constraint: PEs in Internal Subset</b></p><p>In the internal DTD subset, <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity references</a> can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)</p> </div> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="ExtSubset"></a><b>Well-formedness constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a>External -Subset</b> -</p> -<p>The external subset, if any, must match the production for <a href="#NT-extSubset">extSubset</a>.</p> +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="ExtSubset"></a><b>Well-formedness constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a>External +Subset</b></p><p>The external subset, if any, must match the production for <a href="#NT-extSubset">extSubset</a>.</p> </div></div> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="PE-between-Decls"></a><b>Well-formedness constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a>PE -Between Declarations</b> -</p> -<p>The replacement text of a parameter entity reference +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="PE-between-Decls"></a><b>Well-formedness constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a>PE +Between Declarations</b></p><p>The replacement text of a parameter entity reference in a <a href="#NT-DeclSep">DeclSep</a> must match the production <a href="#NT-extSubsetDecl">extSubsetDecl</a>.</p> </div></div> <p>Like the internal subset, the external subset and any external parameter @@ -927,24 +560,9 @@ the contents of the external subset or of <span class="diff-add"><a href="http:/ external parameter entities may conditionally be ignored by using the <a title="conditional section" href="#dt-cond-section">conditional section</a> construct; this is not allowed in the internal subset.</p> -<h5>External Subset</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-extSubset"></a>[30] </td> -<td><code>extSubset</code></td> -<td> ::= </td> -<td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-extSubsetDecl"></a>[31] </td> -<td class="diff-chg"><code>extSubsetDecl</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code>( <a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-conditionalSect">conditionalSect</a> | <a href="#NT-DeclSep">DeclSep</a>)*</code></td> -<xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td> -</tr> +<h5>External Subset</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-extSubset"></a>[30] </td><td><code>extSubset</code></td><td> ::= </td><td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td class="diff-chg"><a name="NT-extSubsetDecl"></a>[31] </td><td class="diff-chg"><code>extSubsetDecl</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code>( <a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-conditionalSect">conditionalSect</a> | <a href="#NT-DeclSep">DeclSep</a>)*</code></td><xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td></tr> </tbody></table> <p>The external subset and external parameter entities also differ from the internal subset in that in them, <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity @@ -968,8 +586,7 @@ subset take precedence over those in the external subset.</p> </div> <div class="div2"> -<h3> -<a name="sec-rmd"></a>2.9 Standalone Document Declaration</h3> +<h3><a name="sec-rmd"></a>2.9 Standalone Document Declaration</h3> <p>Markup declarations can affect the content of the document, as passed from an <a title="XML Processor" href="#dt-xml-proc">XML processor</a> to an application; examples are attribute defaults and entity declarations. The standalone document declaration, @@ -980,20 +597,11 @@ or in parameter entities. [<a name="dt-extmkpdecl" title="External Markup Declar markup declaration</b> is defined as a markup declaration occurring in the external subset or in a parameter entity (external or internal, the latter being included because non-validating processors are not required to read -them).]</span> -</p> - -<h5>Standalone Document Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-SDDecl"></a>[32] </td> -<td><code>SDDecl</code></td> -<td> ::= </td> -<td><code> <a href="#NT-S">S</a> 'standalone' <a href="#NT-Eq">Eq</a> -(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </code></td> -<xsltdebug></xsltdebug><td><a href="#vc-check-rmd">[VC: Standalone Document Declaration]</a></td> -</tr> +them).]</span></p> + +<h5>Standalone Document Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-SDDecl"></a>[32] </td><td><code>SDDecl</code></td><td> ::= </td><td><code> <a href="#NT-S">S</a> 'standalone' <a href="#NT-Eq">Eq</a> +(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </code></td><xsltdebug></xsltdebug><td><a href="#vc-check-rmd">[VC: Standalone Document Declaration]</a></td></tr> </tbody></table> <p>In a standalone document declaration, the value "yes" indicates that there are no <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E64">[E64]</a><a title="External Markup Declaration" href="#dt-extmkpdecl">external markup declarations</a></span> which @@ -1009,11 +617,7 @@ standalone document declaration, the value "no" is assumed.</p> <p>Any XML document for which <code>standalone="no"</code> holds can be converted algorithmically to a standalone document, which may be desirable for some network delivery applications.</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-check-rmd"></a><b>Validity constraint: Standalone Document Declaration</b> -</p> -<p>The +<div class="constraint"><p class="prefix"><a name="vc-check-rmd"></a><b>Validity constraint: Standalone Document Declaration</b></p><p>The standalone document declaration must have the value "no" if any external markup declarations contain declarations of:</p> <ul> @@ -1038,8 +642,7 @@ if white space occurs directly within any instance of those types.</p></li> </div> <div class="div2"> -<h3> -<a name="sec-white-space"></a>2.10 White Space Handling</h3> +<h3><a name="sec-white-space"></a>2.10 White Space Handling</h3> <p>In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines<span class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E39">[E39]</a>, denoted by the nonterminal <a href="#NT-S">S</a> in this specification</span>) @@ -1077,8 +680,7 @@ default value.</p> </div> <div class="div2"> -<h3> -<a name="sec-line-ends"></a>2.11 End-of-Line Handling</h3> +<h3><a name="sec-line-ends"></a>2.11 End-of-Line Handling</h3> <p>XML <a title="Text Entity" href="#dt-parsedent">parsed entities</a> are often stored in computer files which, for editing convenience, are organized into lines. These lines are typically separated by some combination of the characters @@ -1090,8 +692,7 @@ or a standalone literal #xD, an <a title="XML Processor" href="#dt-xml-proc">XML must pass to the application the single character #xA. (This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)</p></div> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E104">[E104]</a>To +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E104">[E104]</a>To simplify the tasks of <a title="Application" href="#dt-app">applications</a>, the characters passed to an application by the <a title="XML Processor" href="#dt-xml-proc">XML processor</a> must be as if the XML processor normalized all line breaks in external parsed @@ -1101,8 +702,7 @@ both the two-character sequence #xD #xA and any #xD that is not followed by </div> <div class="div2"> -<h3> -<a name="sec-lang-tag"></a>2.12 Language Identification</h3> +<h3><a name="sec-lang-tag"></a>2.12 Language Identification</h3> <p>In document processing, it is often useful to identify the natural or formal language in which the content is written. A special <a title="Attribute" href="#dt-attr">attribute</a> named <code>xml:lang</code> may be inserted in documents to specify the language @@ -1111,81 +711,24 @@ In valid documents, this attribute, like any other, must be <a title="Attribute- if it is used. <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E73">[E73]</a>The values of the attribute are language identifiers as defined by <a href="#RFC1766">[IETF RFC 1766]</a>, <cite>Tags for the Identification of Languages</cite>, or its successor on the IETF -Standards Track.</span> -</p> -<div class="diff-add"><div class="note"> -<p class="prefix"><b>Note:</b></p> -<p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E73">[E73]</a><a href="#RFC1766">[IETF RFC 1766]</a> tags are constructed from two-letter language codes as defined +Standards Track.</span></p> +<div class="diff-add"><div class="note"><p class="prefix"><b>Note:</b></p> +<p><a href="http://www.w3.org/XML/xml-19980210-errata#E73">[E73]</a><a href="#RFC1766">[IETF RFC 1766]</a> tags are constructed from two-letter language codes as defined by <a href="#ISO639">[ISO 639]</a>, from two-letter country codes as defined by <a href="#ISO3166">[ISO 3166]</a>, or from language identifiers registered with the Internet Assigned Numbers Authority <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E58">[E58]</a><span class="diff-chg"><a href="#IANA-LANGCODES">[IANA-LANGCODES]</a></span></span>. It is expected that the successor to <a href="#RFC1766">[IETF RFC 1766]</a> will introduce three-letter language codes for languages not presently covered by <a href="#ISO639">[ISO 639]</a>.</p> </div></div> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E73">[E73]</a>(Productions +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E73">[E73]</a>(Productions 33 through 38 have been removed.)</p></div> <div class="diff-del"> -<h5>Language Identification</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-LanguageID"></a>[33] </td> -<td class="diff-del"><code>LanguageID</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code><a href="#NT-Langcode">Langcode</a> ('-' <a href="#NT-Subcode">Subcode</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-Langcode"></a>[34] </td> -<td class="diff-del"><code>Langcode</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code><a href="#NT-ISO639Code">ISO639Code</a> | <a href="#NT-IanaCode">IanaCode</a> -| <a href="#NT-UserCode">UserCode</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-ISO639Code"></a>[35] </td> -<td class="diff-del"><code>ISO639Code</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code>([a-z] | [A-Z]) ([a-z] | [A-Z])</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-IanaCode"></a>[36] </td> -<td class="diff-del"><code>IanaCode</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code>('i' | 'I') '-' ([a-z] | [A-Z])+</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-UserCode"></a>[37] </td> -<td class="diff-del"><code>UserCode</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code>('x' | 'X') '-' ([a-z] | [A-Z])+</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-Subcode"></a>[38] </td> -<td class="diff-del"><code>Subcode</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code>([a-z] | [A-Z])+</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> -</div> +<h5>Language Identification</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-LanguageID"></a>[33] </td><td class="diff-del"><code>LanguageID</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code><a href="#NT-Langcode">Langcode</a> ('-' <a href="#NT-Subcode">Subcode</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-Langcode"></a>[34] </td><td class="diff-del"><code>Langcode</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code><a href="#NT-ISO639Code">ISO639Code</a> | <a href="#NT-IanaCode">IanaCode</a> +| <a href="#NT-UserCode">UserCode</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-ISO639Code"></a>[35] </td><td class="diff-del"><code>ISO639Code</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code>([a-z] | [A-Z]) ([a-z] | [A-Z])</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-IanaCode"></a>[36] </td><td class="diff-del"><code>IanaCode</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code>('i' | 'I') '-' ([a-z] | [A-Z])+</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-UserCode"></a>[37] </td><td class="diff-del"><code>UserCode</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code>('x' | 'X') '-' ([a-z] | [A-Z])+</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-Subcode"></a>[38] </td><td class="diff-del"><code>Subcode</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code>([a-z] | [A-Z])+</code></td><xsltdebug></xsltdebug></tr></tbody></table></div> <div class="diff-del"><p>The <a href="#NT-Langcode">Langcode</a> may be any of the following:</p></div> <div class="diff-del"><ul> <li><p>a two-letter language code as defined by <a href="#ISO639">[ISO 639]</a>, <cite>Codes -for the representation of names of languages</cite> -</p></li> -<li> -<p>a language identifier registered with the Internet Assigned Numbers +for the representation of names of languages</cite></p></li> +<li><p>a language identifier registered with the Internet Assigned Numbers Authority <span class="diff-chg"><a href="#IANA-LANGCODES">[IANA-LANGCODES]</a></span>; these begin with the prefix "<code>i-</code>" (or "<code>I-</code>")</p> </li> @@ -1232,8 +775,7 @@ attribute might be declared this way:</p> <div class="div1"> -<h2> -<a name="sec-logical-struct"></a>3 Logical Structures</h2> +<h2><a name="sec-logical-struct"></a>3 Logical Structures</h2> <p>[<a name="dt-element" title="Element">Definition</a>: Each <a title="XML Document" href="#dt-xml-doc">XML document</a> contains one or more <b>elements</b>, the boundaries of which are either delimited by <a title="Start-Tag" href="#dt-stag">start-tags</a> @@ -1244,47 +786,15 @@ identifier" (GI), and may have a set of attribute specifications.] Each attribute specification has a <a title="Attribute Name" href="#dt-attrname">name</a> and a <a title="Attribute Value" href="#dt-attrval">value</a>.</p> -<h5>Element</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-element"></a>[39] </td> -<td><code>element</code></td> -<td> ::= </td> -<td><code><a href="#NT-EmptyElemTag">EmptyElemTag</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| <a href="#NT-STag">STag</a> <a href="#NT-content">content</a> <a href="#NT-ETag">ETag</a></code></td> -<td><a href="#GIMatch">[WFC: Element Type Match]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#elementvalid">[VC: Element Valid]</a></td> -</tr> -</tbody></table> +<h5>Element</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-element"></a>[39] </td><td><code>element</code></td><td> ::= </td><td><code><a href="#NT-EmptyElemTag">EmptyElemTag</a></code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| <a href="#NT-STag">STag</a> <a href="#NT-content">content</a> <a href="#NT-ETag">ETag</a></code></td><td><a href="#GIMatch">[WFC: Element Type Match]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#elementvalid">[VC: Element Valid]</a></td></tr></tbody></table> <p>This specification does not constrain the semantics, use, or (beyond syntax) names of the element types and attributes, except that names beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code> are reserved for standardization in this or future versions of this specification.</p> -<div class="constraint"> -<p class="prefix"> -<a name="GIMatch"></a><b>Well-formedness constraint: Element Type Match</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="GIMatch"></a><b>Well-formedness constraint: Element Type Match</b></p><p>The <a href="#NT-Name">Name</a> in an element's end-tag must match the element type in the start-tag.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="elementvalid"></a><b>Validity constraint: Element Valid</b> -</p> -<p>An element is valid +<div class="constraint"><p class="prefix"><a name="elementvalid"></a><b>Validity constraint: Element Valid</b></p><p>An element is valid if there is a declaration matching <a href="#NT-elementdecl">elementdecl</a> where the <a href="#NT-Name">Name</a> matches the element type, and one of the following holds:</p> @@ -1298,8 +808,7 @@ between <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errat start-tag and the first child element, between child elements, or between the last child element and the end-tag. Note that a CDATA section containing only white space does not match the nonterminal <a href="#NT-S">S</a>, and -hence cannot appear in these positions.</span> -</p></li> +hence cannot appear in these positions.</span></p></li> <li><p>The declaration matches <a href="#NT-Mixed">Mixed</a> and the content consists of <a title="Character Data" href="#dt-chardata">character data</a> and <a title="Parent/Child" href="#dt-parentchild">child elements</a> whose types match names in the content model.</p></li> @@ -1308,43 +817,13 @@ content model.</p></li> </div> <div class="div2"> -<h3> -<a name="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags</h3> +<h3><a name="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags</h3> <p>[<a name="dt-stag" title="Start-Tag">Definition</a>: The beginning of every non-empty XML element is marked by a <b>start-tag</b>.]</p> -<h5>Start-tag</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-STag"></a>[40] </td> -<td><code>STag</code></td> -<td> ::= </td> -<td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Attribute"></a>[41] </td> -<td><code>Attribute</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> <a href="#NT-Eq">Eq</a> <a href="#NT-AttValue">AttValue</a></code></td> -<xsltdebug></xsltdebug><td><a href="#ValueType">[VC: Attribute Value Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td> -</tr> +<h5>Start-tag</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-STag"></a>[40] </td><td><code>STag</code></td><td> ::= </td><td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr> +<tr valign="baseline"><td><a name="NT-Attribute"></a>[41] </td><td><code>Attribute</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> <a href="#NT-Eq">Eq</a> <a href="#NT-AttValue">AttValue</a></code></td><xsltdebug></xsltdebug><td><a href="#ValueType">[VC: Attribute Value Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td></tr> </tbody></table> <p>The <a href="#NT-Name">Name</a> in the start- and end-tags gives the element's <b>type</b>. [<a name="dt-attr" title="Attribute">Definition</a>: The <a href="#NT-Name">Name</a>-<a href="#NT-AttValue">AttValue</a> pairs are referred to as the <b>attribute specifications</b> of the @@ -1352,34 +831,18 @@ element], [<a name="dt-attrname" title="Attribute Name">Definition</a>: with the and [<a name="dt-attrval" title="Attribute Value">Definition</a>: the content of the <a href="#NT-AttValue">AttValue</a> (the text between the <code>'</code> or <code>"</code> delimiters) as the <b>attribute value</b>.]<span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E46">[E46]</a>Note that the order of attribute specifications in a start-tag or empty-element -tag is not significant.</span> -</p> -<div class="constraint"> -<p class="prefix"> -<a name="uniqattspec"></a><b>Well-formedness constraint: Unique Att Spec</b> -</p> -<p>No attribute name +tag is not significant.</span></p> +<div class="constraint"><p class="prefix"><a name="uniqattspec"></a><b>Well-formedness constraint: Unique Att Spec</b></p><p>No attribute name may appear more than once in the same start-tag or empty-element tag.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="ValueType"></a><b>Validity constraint: Attribute Value Type</b> -</p> -<p>The attribute must +<div class="constraint"><p class="prefix"><a name="ValueType"></a><b>Validity constraint: Attribute Value Type</b></p><p>The attribute must have been declared; the value must be of the type declared for it. (For attribute types, see <a href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.)</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="NoExternalRefs"></a><b>Well-formedness constraint: No External Entity References</b> -</p> -<p>Attribute +<div class="constraint"><p class="prefix"><a name="NoExternalRefs"></a><b>Well-formedness constraint: No External Entity References</b></p><p>Attribute values cannot contain direct or indirect entity references to external entities.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="CleanAttrVals"></a><b>Well-formedness constraint: No <code><</code> in Attribute Values</b> -</p> +<div class="constraint"><p class="prefix"><a name="CleanAttrVals"></a><b>Well-formedness constraint: No <code><</code> in Attribute Values</b></p> <p>The <a title="Replacement Text" href="#dt-repltext">replacement text</a> of any entity referred to directly or indirectly in an attribute value <span class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E83">[E83]</a>(other than "<code>&lt;</code>") </span>must not contain a <code><</code>.</p> @@ -1390,53 +853,28 @@ than "<code>&lt;</code>") </span>must not contain a <code><</co with a start-tag must be marked by an <b>end-tag</b> containing a name that echoes the element's type as given in the start-tag:]</p> -<h5>End-tag</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-ETag"></a>[42] </td> -<td><code>ETag</code></td> -<td> ::= </td> -<td><code>'</' <a href="#NT-Name">Name</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>End-tag</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-ETag"></a>[42] </td><td><code>ETag</code></td><td> ::= </td><td><code>'</' <a href="#NT-Name">Name</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>An example of an end-tag:</p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre></termdef></pre></td></tr></table> <p>[<a name="dt-content" title="Content">Definition</a>: The <a title="Text" href="#dt-text">text</a> between the start-tag and end-tag is called the element's <b>content</b>:]</p> -<h5>Content of Elements</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-content"></a>[43] </td> -<td class="diff-chg"><code>content</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code><a href="#NT-CharData">CharData</a>? ((<a href="#NT-element">element</a> +<h5>Content of Elements</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td class="diff-chg"><a name="NT-content"></a>[43] </td><td class="diff-chg"><code>content</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code><a href="#NT-CharData">CharData</a>? ((<a href="#NT-element">element</a> | <a href="#NT-Reference">Reference</a> | <a href="#NT-CDSect">CDSect</a> -| <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a>) <a href="#NT-CharData">CharData</a>?)*</code></td> -<xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E71">[E71]</a> */</i></td> -</tr> +| <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a>) <a href="#NT-CharData">CharData</a>?)*</code></td><xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E71">[E71]</a> */</i></td></tr> </tbody></table> -<p> -<span class="diff-chg">[<a name="dt-empty" title="Empty">Definition</a>: <a href="http://www.w3.org/XML/xml-19980210-errata#E97">[E97]</a>An element +<p><span class="diff-chg">[<a name="dt-empty" title="Empty">Definition</a>: <a href="http://www.w3.org/XML/xml-19980210-errata#E97">[E97]</a>An element with no content is said to be <b>empty</b>.] The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag.</span> [<a name="dt-eetag" title="empty-element tag">Definition</a>: An <b>empty-element tag</b> takes a special form:]</p> -<h5>Tags for Empty Elements</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-EmptyElemTag"></a>[44] </td> -<td><code>EmptyElemTag</code></td> -<td> ::= </td> -<td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '/>'</code></td> -<xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td> -</tr> +<h5>Tags for Empty Elements</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-EmptyElemTag"></a>[44] </td><td><code>EmptyElemTag</code></td><td> ::= </td><td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '/>'</code></td><xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr> </tbody></table> <p>Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword <b>EMPTY</b>. <a title="For interoperability" href="#dt-interop">For @@ -1451,8 +889,7 @@ EMPTY.</p> </div> <div class="div2"> -<h3> -<a name="elemdecls"></a>3.2 Element Type Declarations</h3> +<h3><a name="elemdecls"></a>3.2 Element Type Declarations</h3> <p>The <a title="Element" href="#dt-element">element</a> structure of an <a title="XML Document" href="#dt-xml-doc">XML document</a> may, for <a title="Validity" href="#dt-valid">validation</a> purposes, be constrained using element type and attribute-list declarations. An element type declaration constrains the element's <a title="Content" href="#dt-content">content</a>.</p> @@ -1463,33 +900,14 @@ element type for which no declaration is provided, but this is not an error.</p> <p>[<a name="dt-eldecl" title="Element Type declaration">Definition</a>: An <b>element type declaration</b> takes the form:]</p> -<h5>Element Type Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-elementdecl"></a>[45] </td> -<td><code>elementdecl</code></td> -<td> ::= </td> -<td><code>'<!ELEMENT' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-contentspec">contentspec</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug><td><a href="#EDUnique">[VC: Unique Element Type Declaration]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-contentspec"></a>[46] </td> -<td><code>contentspec</code></td> -<td> ::= </td> -<td><code>'EMPTY' | 'ANY' | <a href="#NT-Mixed">Mixed</a> -| <a href="#NT-children">children</a> </code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Element Type Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-elementdecl"></a>[45] </td><td><code>elementdecl</code></td><td> ::= </td><td><code>'<!ELEMENT' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-contentspec">contentspec</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug><td><a href="#EDUnique">[VC: Unique Element Type Declaration]</a></td></tr> +<tr valign="baseline"><td><a name="NT-contentspec"></a>[46] </td><td><code>contentspec</code></td><td> ::= </td><td><code>'EMPTY' | 'ANY' | <a href="#NT-Mixed">Mixed</a> +| <a href="#NT-children">children</a> </code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>where the <a href="#NT-Name">Name</a> gives the element type being declared.</p> -<div class="constraint"> -<p class="prefix"> -<a name="EDUnique"></a><b>Validity constraint: Unique Element Type Declaration</b> -</p> -<p>No element +<div class="constraint"><p class="prefix"><a name="EDUnique"></a><b>Validity constraint: Unique Element Type Declaration</b></p><p>No element type may be declared more than once.</p> </div> <p>Examples of element type declarations:</p> @@ -1499,8 +917,7 @@ type may be declared more than once.</p> <!ELEMENT container ANY></pre></td></tr></table> <div class="div3"> -<h4> -<a name="sec-element-content"></a>3.2.1 Element Content</h4> +<h4><a name="sec-element-content"></a>3.2.1 Element Content</h4> <p>[<a name="dt-elemcontent" title="Element content">Definition</a>: An element <a title="Start-Tag" href="#dt-stag">type</a> has <b>element content</b> when elements of that type must contain only <a title="Parent/Child" href="#dt-parentchild">child</a> elements (no character data), optionally separated by white space (characters @@ -1511,63 +928,13 @@ The grammar is built on content particles (<a href="#NT-cp">cp</a>s), which consist of names, choice lists of content particles, or sequence lists of content particles:</p> -<h5>Element-content Models</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-children"></a>[47] </td> -<td><code>children</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-choice">choice</a> | <a href="#NT-seq">seq</a>) -('?' | '*' | '+')?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-cp"></a>[48] </td> -<td><code>cp</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Name">Name</a> | <a href="#NT-choice">choice</a> -| <a href="#NT-seq">seq</a>) ('?' | '*' | '+')?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-choice"></a>[49] </td> -<td class="diff-chg"><code>choice</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )+ <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E50">[E50]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E52">[E52]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td class="diff-chg"> -<a name="NT-seq"></a>[50] </td> -<td class="diff-chg"><code>seq</code></td> -<td class="diff-chg"> ::= </td> -<td class="diff-chg"><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? ',' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )* <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E52">[E52]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> +<h5>Element-content Models</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-children"></a>[47] </td><td><code>children</code></td><td> ::= </td><td><code>(<a href="#NT-choice">choice</a> | <a href="#NT-seq">seq</a>) +('?' | '*' | '+')?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-cp"></a>[48] </td><td><code>cp</code></td><td> ::= </td><td><code>(<a href="#NT-Name">Name</a> | <a href="#NT-choice">choice</a> +| <a href="#NT-seq">seq</a>) ('?' | '*' | '+')?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td class="diff-chg"><a name="NT-choice"></a>[49] </td><td class="diff-chg"><code>choice</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )+ <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E50">[E50]</a> */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E52">[E52]</a> */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr> +<tr valign="baseline"><td class="diff-chg"><a name="NT-seq"></a>[50] </td><td class="diff-chg"><code>seq</code></td><td class="diff-chg"> ::= </td><td class="diff-chg"><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? ',' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )* <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td class="diff-chg"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E52">[E52]</a> */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr> </tbody></table> <p>where each <a href="#NT-Name">Name</a> is the type of an element which may appear as a <a title="Parent/Child" href="#dt-parentchild">child</a>. Any content @@ -1589,17 +956,12 @@ match more than one occurrence of an element type in the content model. For more information, see <a href="#determinism"><b>E Deterministic Content Models</b></a>.</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-PEinGroup"></a><b>Validity constraint: Proper Group/PE Nesting</b> -</p> -<p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E11">[E11]</a>parenthesized</span> +<div class="constraint"><p class="prefix"><a name="vc-PEinGroup"></a><b>Validity constraint: Proper Group/PE Nesting</b></p><p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E11">[E11]</a>parenthesized</span> groups. That is to say, if either of the opening or closing parentheses in a <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or <a href="#NT-Mixed">Mixed</a> construct is contained in the replacement text for a <a title="Parameter-entity reference" href="#dt-PERef">parameter entity</a>, both must be contained in the same replacement text.</p> -<div class="diff-chg"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E19">[E19]</a><a title="For interoperability" href="#dt-interop">For interoperability</a>, if a parameter-entity reference +<div class="diff-chg"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E19">[E19]</a><a title="For interoperability" href="#dt-interop">For interoperability</a>, if a parameter-entity reference appears in a <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or <a href="#NT-Mixed">Mixed</a> construct, its replacement text should contain at least one non-blank character, and neither the first nor last non-blank character of the replacement text should be a connector (<code>|</code> or <code>,</code>).</p></div> @@ -1611,51 +973,23 @@ of the replacement text should be a connector (<code>|</code> or <code>,</code>) </div> <div class="div3"> -<h4> -<a name="sec-mixed-content"></a>3.2.2 Mixed Content</h4> +<h4><a name="sec-mixed-content"></a>3.2.2 Mixed Content</h4> <p>[<a name="dt-mixed" title="Mixed Content">Definition</a>: An element <a title="Start-Tag" href="#dt-stag">type</a> has <b>mixed content</b> when elements of that type may contain character data, optionally interspersed with <a title="Parent/Child" href="#dt-parentchild">child</a> elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences:</p> -<h5>Mixed-content Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Mixed"></a>[51] </td> -<td><code>Mixed</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? '#PCDATA' (<a href="#NT-S">S</a>? +<h5>Mixed-content Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Mixed"></a>[51] </td><td><code>Mixed</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? '#PCDATA' (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? -')*' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| '(' <a href="#NT-S">S</a>? '#PCDATA' <a href="#NT-S">S</a>? ')' </code></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-MixedChildrenUnique">[VC: No Duplicate Types]</a></td> -</tr> +')*' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| '(' <a href="#NT-S">S</a>? '#PCDATA' <a href="#NT-S">S</a>? ')' </code></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-MixedChildrenUnique">[VC: No Duplicate Types]</a></td></tr> </tbody></table> <p>where the <a href="#NT-Name">Name</a>s give the types of elements that may appear as children. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E10">[E10]</a>The keyword <b>#PCDATA</b> derives historically from the term "parsed -character data."</span> -</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-MixedChildrenUnique"></a><b>Validity constraint: No Duplicate Types</b> -</p> -<p>The +character data."</span></p> +<div class="constraint"><p class="prefix"><a name="vc-MixedChildrenUnique"></a><b>Validity constraint: No Duplicate Types</b></p><p>The same name must not appear more than once in a single mixed-content declaration.</p> </div> <p>Examples of mixed content declarations:</p> @@ -1666,17 +1000,14 @@ same name must not appear more than once in a single mixed-content declaration.< </div> <div class="div2"> -<h3> -<a name="attdecls"></a>3.3 Attribute-List Declarations</h3> -<p> -<a title="Attribute" href="#dt-attr">Attributes</a> are used to associate name-value +<h3><a name="attdecls"></a>3.3 Attribute-List Declarations</h3> +<p><a title="Attribute" href="#dt-attr">Attributes</a> are used to associate name-value pairs with <a title="Element" href="#dt-element">elements</a>. Attribute specifications may appear only within <a title="Start-Tag" href="#dt-stag">start-tags</a> and <a title="empty-element tag" href="#dt-eetag">empty-element tags</a>; thus, the productions used to recognize them appear in <a href="#sec-starttags"><b>3.1 Start-Tags, End-Tags, and Empty-Element Tags</b></a>. Attribute-list declarations may be used:</p> <ul> -<li> -<p>To define the set of attributes pertaining to a given element type.</p> +<li><p>To define the set of attributes pertaining to a given element type.</p> </li> <li><p>To establish type constraints for these attributes.</p></li> <li><p>To provide <a title="Attribute Default" href="#dt-default">default values</a> for @@ -1686,25 +1017,7 @@ attributes.</p></li> declarations</b> specify the name, data type, and default value (if any) of each attribute associated with a given element type:]</p> -<h5>Attribute-list Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-AttlistDecl"></a>[52] </td> -<td><code>AttlistDecl</code></td> -<td> ::= </td> -<td><code>'<!ATTLIST' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-AttDef">AttDef</a>* <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-AttDef"></a>[53] </td> -<td><code>AttDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-AttType">AttType</a> <a href="#NT-S">S</a> <a href="#NT-DefaultDecl">DefaultDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Attribute-list Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-AttlistDecl"></a>[52] </td><td><code>AttlistDecl</code></td><td> ::= </td><td><code>'<!ATTLIST' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-AttDef">AttDef</a>* <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-AttDef"></a>[53] </td><td><code>AttDef</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-AttType">AttType</a> <a href="#NT-S">S</a> <a href="#NT-DefaultDecl">DefaultDecl</a></code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>The <a href="#NT-Name">Name</a> in the <a href="#NT-AttlistDecl">AttlistDecl</a> rule is the type of an element. At user option, an XML processor may issue a warning if attributes are declared for an element type not itself declared, @@ -1723,146 +1036,42 @@ for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error.</p> <div class="div3"> -<h4> -<a name="sec-attribute-types"></a>3.3.1 Attribute Types</h4> +<h4><a name="sec-attribute-types"></a>3.3.1 Attribute Types</h4> <p>XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints<span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E8">[E8]</a>. The validity constraints noted in the grammar are applied after the attribute -value has been normalized as described in <a href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.</span> -</p> - -<h5>Attribute Types</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-AttType"></a>[54] </td> -<td><code>AttType</code></td> -<td> ::= </td> -<td><code><a href="#NT-StringType">StringType</a> | <a href="#NT-TokenizedType">TokenizedType</a> -| <a href="#NT-EnumeratedType">EnumeratedType</a> </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-StringType"></a>[55] </td> -<td><code>StringType</code></td> -<td> ::= </td> -<td><code>'CDATA'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-TokenizedType"></a>[56] </td> -<td><code>TokenizedType</code></td> -<td> ::= </td> -<td><code>'ID'</code></td> -<xsltdebug></xsltdebug><td><a href="#id">[VC: ID]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#one-id-per-el">[VC: One ID per Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#id-default">[VC: ID Attribute Default]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'IDREF'</code></td> -<td><a href="#idref">[VC: IDREF]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'IDREFS'</code></td> -<td><a href="#idref">[VC: IDREF]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'ENTITY'</code></td> -<td><a href="#entname">[VC: Entity Name]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'ENTITIES'</code></td> -<td><a href="#entname">[VC: Entity Name]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'NMTOKEN'</code></td> -<td><a href="#nmtok">[VC: Name Token]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'NMTOKENS'</code></td> -<td><a href="#nmtok">[VC: Name Token]</a></td> -</tr> +value has been normalized as described in <a href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.</span></p> + +<h5>Attribute Types</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-AttType"></a>[54] </td><td><code>AttType</code></td><td> ::= </td><td><code><a href="#NT-StringType">StringType</a> | <a href="#NT-TokenizedType">TokenizedType</a> +| <a href="#NT-EnumeratedType">EnumeratedType</a> </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-StringType"></a>[55] </td><td><code>StringType</code></td><td> ::= </td><td><code>'CDATA'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-TokenizedType"></a>[56] </td><td><code>TokenizedType</code></td><td> ::= </td><td><code>'ID'</code></td><xsltdebug></xsltdebug><td><a href="#id">[VC: ID]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#one-id-per-el">[VC: One ID per Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#id-default">[VC: ID Attribute Default]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREF'</code></td><td><a href="#idref">[VC: IDREF]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREFS'</code></td><td><a href="#idref">[VC: IDREF]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITY'</code></td><td><a href="#entname">[VC: Entity Name]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITIES'</code></td><td><a href="#entname">[VC: Entity Name]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKEN'</code></td><td><a href="#nmtok">[VC: Name Token]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKENS'</code></td><td><a href="#nmtok">[VC: Name Token]</a></td></tr> </tbody></table> -<div class="constraint"> -<p class="prefix"> -<a name="id"></a><b>Validity constraint: ID</b> -</p> -<p>Values of type <b>ID</b> must match the <a href="#NT-Name">Name</a> production. A name must not appear more than once +<div class="constraint"><p class="prefix"><a name="id"></a><b>Validity constraint: ID</b></p><p>Values of type <b>ID</b> must match the <a href="#NT-Name">Name</a> production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="one-id-per-el"></a><b>Validity constraint: One ID per Element Type</b> -</p> -<p>No element +<div class="constraint"><p class="prefix"><a name="one-id-per-el"></a><b>Validity constraint: One ID per Element Type</b></p><p>No element type may have more than one ID attribute specified.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="id-default"></a><b>Validity constraint: ID Attribute Default</b> -</p> -<p>An ID attribute +<div class="constraint"><p class="prefix"><a name="id-default"></a><b>Validity constraint: ID Attribute Default</b></p><p>An ID attribute must have a declared default of <b>#IMPLIED</b> or <b>#REQUIRED</b>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="idref"></a><b>Validity constraint: IDREF</b> -</p> -<p>Values of type <b>IDREF</b> must +<div class="constraint"><p class="prefix"><a name="idref"></a><b>Validity constraint: IDREF</b></p><p>Values of type <b>IDREF</b> must match the <a href="#NT-Name">Name</a> production, and values of type <b>IDREFS</b> must match <a href="#NT-Names">Names</a>; each <a href="#NT-Name">Name</a> must match the value of an ID attribute on some element in the XML document; i.e. <b>IDREF</b> values must match the value of some ID attribute.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="entname"></a><b>Validity constraint: Entity Name</b> -</p> -<p>Values of type <b>ENTITY</b> +<div class="constraint"><p class="prefix"><a name="entname"></a><b>Validity constraint: Entity Name</b></p><p>Values of type <b>ENTITY</b> must match the <a href="#NT-Name">Name</a> production, values of type <b>ENTITIES</b> must match <a href="#NT-Names">Names</a>; each <a href="#NT-Name">Name</a> must match the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a> declared in the <a title="Document Type Declaration" href="#dt-doctype">DTD</a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="nmtok"></a><b>Validity constraint: Name Token</b> -</p> -<p>Values of type <b>NMTOKEN</b> +<div class="constraint"><p class="prefix"><a name="nmtok"></a><b>Validity constraint: Name Token</b></p><p>Values of type <b>NMTOKEN</b> must match the <a href="#NT-Nmtoken">Nmtoken</a> production; values of type <b>NMTOKENS</b> must match <a title="" href="#NT-Nmtokens">Nmtokens</a>.</p> </div> @@ -1870,140 +1079,43 @@ must match <a title="" href="#NT-Nmtokens">Nmtokens</a>.</p> <p>[<a name="dt-enumerated" title="Enumerated Attribute Values">Definition</a>: <b>Enumerated attributes</b> can take one of a list of values provided in the declaration]. There are two kinds of enumerated types:</p> -<h5>Enumerated Attribute Types</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EnumeratedType"></a>[57] </td> -<td><code>EnumeratedType</code></td> -<td> ::= </td> -<td><code><a href="#NT-NotationType">NotationType</a> -| <a href="#NT-Enumeration">Enumeration</a> </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-NotationType"></a>[58] </td> -<td><code>NotationType</code></td> -<td> ::= </td> -<td><code>'NOTATION' <a href="#NT-S">S</a> '(' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? ')' </code></td> -<xsltdebug></xsltdebug><td><a href="#notatn">[VC: Notation Attributes]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><a href="#OneNotationPer">[VC: One -Notation Per Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><a href="#NoNotationEmpty">[VC: No -Notation on Empty Element]</a></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Enumeration"></a>[59] </td> -<td><code>Enumeration</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a> -(<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a>)* <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td><a href="#enum">[VC: Enumeration]</a></td> -</tr></tbody> -</table> +<h5>Enumerated Attribute Types</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EnumeratedType"></a>[57] </td><td><code>EnumeratedType</code></td><td> ::= </td><td><code><a href="#NT-NotationType">NotationType</a> +| <a href="#NT-Enumeration">Enumeration</a> </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-NotationType"></a>[58] </td><td><code>NotationType</code></td><td> ::= </td><td><code>'NOTATION' <a href="#NT-S">S</a> '(' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? ')' </code></td><xsltdebug></xsltdebug><td><a href="#notatn">[VC: Notation Attributes]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><a href="#OneNotationPer">[VC: One +Notation Per Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><a href="#NoNotationEmpty">[VC: No +Notation on Empty Element]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Enumeration"></a>[59] </td><td><code>Enumeration</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a> +(<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a>)* <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td><a href="#enum">[VC: Enumeration]</a></td></tr></tbody></table> <p>A <b>NOTATION</b> attribute identifies a <a title="Notation" href="#dt-notation">notation</a>, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached.</p> -<div class="constraint"> -<p class="prefix"> -<a name="notatn"></a><b>Validity constraint: Notation Attributes</b> -</p> -<p>Values of this type +<div class="constraint"><p class="prefix"><a name="notatn"></a><b>Validity constraint: Notation Attributes</b></p><p>Values of this type must match one of the <a href="#Notations"><cite>notation</cite></a> names included in the declaration; all notation names in the declaration must be declared.</p> </div> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="OneNotationPer"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E7">[E7]</a>One -Notation Per Element Type</b> -</p> -<p>No element type may have more than one <b>NOTATION</b> +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="OneNotationPer"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E7">[E7]</a>One +Notation Per Element Type</b></p><p>No element type may have more than one <b>NOTATION</b> attribute specified.</p> </div></div> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="NoNotationEmpty"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E68">[E68]</a>No -Notation on Empty Element</b> -</p> -<p> -<a title="For Compatibility" href="#dt-compat">For compatibility</a>, +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="NoNotationEmpty"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E68">[E68]</a>No +Notation on Empty Element</b></p><p><a title="For Compatibility" href="#dt-compat">For compatibility</a>, an attribute of type <b>NOTATION</b> must not be declared on an element declared <b>EMPTY</b>.</p> </div></div> -<div class="constraint"> -<p class="prefix"> -<a name="enum"></a><b>Validity constraint: Enumeration</b> -</p> -<p>Values of this type must match +<div class="constraint"><p class="prefix"><a name="enum"></a><b>Validity constraint: Enumeration</b></p><p>Values of this type must match one of the <a href="#NT-Nmtoken">Nmtoken</a> tokens in the declaration.</p> </div> -<p> -<a title="For interoperability" href="#dt-interop">For interoperability,</a> the same <a href="#NT-Nmtoken">Nmtoken</a> should not occur more than once in the enumerated +<p><a title="For interoperability" href="#dt-interop">For interoperability,</a> the same <a href="#NT-Nmtoken">Nmtoken</a> should not occur more than once in the enumerated attribute types of a single element type.</p> </div> <div class="div3"> -<h4> -<a name="sec-attr-defaults"></a>3.3.2 Attribute Defaults</h4> +<h4><a name="sec-attr-defaults"></a>3.3.2 Attribute Defaults</h4> <p>An <a title="Attribute-List Declaration" href="#dt-attdecl">attribute declaration</a> provides information on whether the attribute's presence is required, and if not, how an XML processor should react if a declared attribute is absent in a document.</p> -<h5>Attribute Defaults</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-DefaultDecl"></a>[60] </td> -<td><code>DefaultDecl</code></td> -<td> ::= </td> -<td><code>'#REQUIRED' | '#IMPLIED' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| (('#FIXED' S)? <a href="#NT-AttValue">AttValue</a>)</code></td> -<td><a href="#RequiredAttr">[VC: Required Attribute]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#defattrvalid">[VC: Attribute Default Legal]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#FixedAttr">[VC: Fixed Attribute Default]</a></td> -</tr> +<h5>Attribute Defaults</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-DefaultDecl"></a>[60] </td><td><code>DefaultDecl</code></td><td> ::= </td><td><code>'#REQUIRED' | '#IMPLIED' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| (('#FIXED' S)? <a href="#NT-AttValue">AttValue</a>)</code></td><td><a href="#RequiredAttr">[VC: Required Attribute]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#defattrvalid">[VC: Attribute Default Legal]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#FixedAttr">[VC: Fixed Attribute Default]</a></td></tr> </tbody></table> <p>In an attribute declaration, <b>#REQUIRED</b> means that the attribute must always be provided, <b>#IMPLIED</b> that no default value is provided. [<a name="dt-default" title="Attribute Default">Definition</a>: If @@ -2013,27 +1125,15 @@ value; the <b>#FIXED</b> keyword states that the attribute must always have the default value. If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.]</p> -<div class="constraint"> -<p class="prefix"> -<a name="RequiredAttr"></a><b>Validity constraint: Required Attribute</b> -</p> -<p>If the default +<div class="constraint"><p class="prefix"><a name="RequiredAttr"></a><b>Validity constraint: Required Attribute</b></p><p>If the default declaration is the keyword <b>#REQUIRED</b>, then the attribute must be specified for all elements of the type in the attribute-list declaration.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="defattrvalid"></a><b>Validity constraint: Attribute Default Legal</b> -</p> -<p>The declared +<div class="constraint"><p class="prefix"><a name="defattrvalid"></a><b>Validity constraint: Attribute Default Legal</b></p><p>The declared default value must meet the lexical constraints of the declared attribute type.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="FixedAttr"></a><b>Validity constraint: Fixed Attribute Default</b> -</p> -<p>If an attribute +<div class="constraint"><p class="prefix"><a name="FixedAttr"></a><b>Validity constraint: Fixed Attribute Default</b></p><p>If an attribute has a default value declared with the <b>#FIXED</b> keyword, instances of that attribute must match the default value.</p> </div> @@ -2048,8 +1148,7 @@ that attribute must match the default value.</p> </div> <div class="diff-chg"><div class="div3"> -<h4> -<a name="AVNormalize"></a>3.3.3 <a href="http://www.w3.org/XML/xml-19980210-errata#E70">[E70]</a>Attribute-Value +<h4><a name="AVNormalize"></a>3.3.3 <a href="http://www.w3.org/XML/xml-19980210-errata#E70">[E70]</a>Attribute-Value Normalization</h4> <p>Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize the attribute value by applying @@ -2059,11 +1158,9 @@ to the application is the same as that produced by the algorithm.</p> <li><p>All line breaks must have been normalized on input to #xA as described in <a href="#sec-line-ends"><b>2.11 End-of-Line Handling</b></a>, so the rest of this algorithm operates on text normalized in this way.</p></li> -<li> -<p>Begin with a normalized value consisting of the empty string.</p> +<li><p>Begin with a normalized value consisting of the empty string.</p> </li> -<li> -<p>For each character, entity reference, or character reference in the +<li><p>For each character, entity reference, or character reference in the unnormalized attribute value, beginning with the first and continuing to the last, do the following:</p> <ul> @@ -2073,8 +1170,7 @@ normalized value.</p></li> to the replacement text of the entity.</p></li> <li><p>For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value.</p></li> -<li> -<p>For another character, append the character to the normalized value.</p> +<li><p>For another character, append the character to the normalized value.</p> </li> </ul> </li> @@ -2104,116 +1200,42 @@ declarations:</p> to the character sequences of the middle column if the attribute <code>a</code> is declared <b>NMTOKENS</b> and to those of the right columns if <code>a</code> is declared <b>CDATA</b>.</p> -<table border="1" frame="border"> -<thead><tr> -<th colspan="1" rowspan="1">Attribute specification</th> -<th colspan="1" rowspan="1">a is NMTOKENS</th> -<th colspan="1" rowspan="1">a is CDATA</th> -</tr></thead> -<tbody> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a=" - -xyz"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>x y z</code></td> -<td colspan="1" rowspan="1"><code>#x20 #x20 x y z</code></td> -</tr> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a="&d;&d;A&a;&a;B&da;"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>A -#x20 B</code></td> -<td colspan="1" rowspan="1"><code>#x20 #x20 A #x20 #x20 B #x20 #x20</code></td> -</tr> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a= -"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>#xD -#xD A #xA #xA B #xD #xA</code></td> -<td colspan="1" rowspan="1"><code>#xD #xD A #xA #xA B #xD #xD</code></td> -</tr> -</tbody> -</table> +<table border="1" frame="border"><thead><tr><th colspan="1" rowspan="1">Attribute specification</th> +<th colspan="1" rowspan="1">a is NMTOKENS</th><th colspan="1" rowspan="1">a is CDATA</th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a=" + +xyz"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>x y z</code></td><td colspan="1" rowspan="1"><code>#x20 #x20 x y z</code></td> +</tr><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a="&d;&d;A&a;&a;B&da;"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>A +#x20 B</code></td><td colspan="1" rowspan="1"><code>#x20 #x20 A #x20 #x20 B #x20 #x20</code></td> +</tr><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a= +"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>#xD +#xD A #xA #xA B #xD #xA</code></td><td colspan="1" rowspan="1"><code>#xD #xD A #xA #xA B #xD #xD</code></td> +</tr></tbody></table> <p>Note that the last example is invalid (but well-formed) if <code>a</code> is declared to be of type <b>NMTOKENS</b>.</p> </div></div> </div> <div class="div2"> -<h3> -<a name="sec-condition-sect"></a>3.4 Conditional Sections</h3> +<h3><a name="sec-condition-sect"></a>3.4 Conditional Sections</h3> <p>[<a name="dt-cond-section" title="conditional section">Definition</a>: <b>Conditional sections</b> are portions of the <a title="Document Type Declaration" href="#dt-doctype">document type declaration external subset</a> which are included in, or excluded from, the logical structure of the DTD based on the keyword which governs them.]</p> -<h5>Conditional Section</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-conditionalSect"></a>[61] </td> -<td><code>conditionalSect</code></td> -<td> ::= </td> -<td><code><a href="#NT-includeSect">includeSect</a> | <a href="#NT-ignoreSect">ignoreSect</a> </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-includeSect"></a>[62] </td> -<td><code>includeSect</code></td> -<td> ::= </td> -<td><code>'<![' S? 'INCLUDE' S? '[' <a href="#NT-extSubsetDecl">extSubsetDecl</a> -']]>' </code></td> -<xsltdebug></xsltdebug><td><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><a href="#condsec-nesting">[VC: Proper -Conditional Section/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-ignoreSect"></a>[63] </td> -<td><code>ignoreSect</code></td> -<td> ::= </td> -<td><code>'<![' S? 'IGNORE' S? '[' <a href="#NT-ignoreSectContents">ignoreSectContents</a>* -']]>'</code></td> -<xsltdebug></xsltdebug><td><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a> */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td class="diff-add"><a href="#condsec-nesting">[VC: Proper -Conditional Section/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-ignoreSectContents"></a>[64] </td> -<td><code>ignoreSectContents</code></td> -<td> ::= </td> -<td><code><a href="#NT-Ignore">Ignore</a> ('<![' <a href="#NT-ignoreSectContents">ignoreSectContents</a> ']]>' <a href="#NT-Ignore">Ignore</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Ignore"></a>[65] </td> -<td><code>Ignore</code></td> -<td> ::= </td> -<td><code><a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* -('<![' | ']]>') <a href="#NT-Char">Char</a>*) </code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Conditional Section</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-conditionalSect"></a>[61] </td><td><code>conditionalSect</code></td><td> ::= </td><td><code><a href="#NT-includeSect">includeSect</a> | <a href="#NT-ignoreSect">ignoreSect</a> </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-includeSect"></a>[62] </td><td><code>includeSect</code></td><td> ::= </td><td><code>'<![' S? 'INCLUDE' S? '[' <a href="#NT-extSubsetDecl">extSubsetDecl</a> +']]>' </code></td><xsltdebug></xsltdebug><td><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a> */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><a href="#condsec-nesting">[VC: Proper +Conditional Section/PE Nesting]</a></td></tr> +<tr valign="baseline"><td><a name="NT-ignoreSect"></a>[63] </td><td><code>ignoreSect</code></td><td> ::= </td><td><code>'<![' S? 'IGNORE' S? '[' <a href="#NT-ignoreSectContents">ignoreSectContents</a>* +']]>'</code></td><xsltdebug></xsltdebug><td><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a> */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td class="diff-add"><a href="#condsec-nesting">[VC: Proper +Conditional Section/PE Nesting]</a></td></tr> +<tr valign="baseline"><td><a name="NT-ignoreSectContents"></a>[64] </td><td><code>ignoreSectContents</code></td><td> ::= </td><td><code><a href="#NT-Ignore">Ignore</a> ('<![' <a href="#NT-ignoreSectContents">ignoreSectContents</a> ']]>' <a href="#NT-Ignore">Ignore</a>)*</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Ignore"></a>[65] </td><td><code>Ignore</code></td><td> ::= </td><td><code><a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* +('<![' | ']]>') <a href="#NT-Char">Char</a>*) </code></td><xsltdebug></xsltdebug></tr> </tbody></table> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="condsec-nesting"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a>Proper -Conditional Section/PE Nesting</b> -</p> -<p>If any of the "<code><![</code>", +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="condsec-nesting"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a>Proper +Conditional Section/PE Nesting</b></p><p>If any of the "<code><![</code>", "<code>[</code>", or "<code>]]></code>" of a conditional section is contained in the replacement text for a parameter-entity reference, all of them must be contained in the same replacement text.</p> @@ -2235,8 +1257,7 @@ of an ignored conditional section are parsed by ignoring all characters after the "<code>[</code>" following the keyword, except conditional section starts "<code><![</code>" and ends "<code>]]></code>", until the matching conditional section end is found. Parameter entity references are not recognized in this -process.</span> -</p> +process.</span></p> <p>If the keyword of the conditional section is a parameter-entity reference, the parameter entity must be replaced by its content before the processor decides whether to include or ignore the conditional section.</p> @@ -2256,8 +1277,7 @@ decides whether to include or ignore the conditional section.</p> <div class="div1"> -<h2> -<a name="sec-physical-struct"></a>4 Physical Structures</h2> +<h2><a name="sec-physical-struct"></a>4 Physical Structures</h2> <p>[<a name="dt-entity" title="Entity">Definition</a>: An XML document may consist of one or many storage units. <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E6">[E6]</a>These are called <b>entities</b>; they all have <b>content</b> and are @@ -2290,35 +1310,13 @@ in different contexts. Furthermore, they occupy different namespaces; a paramete entity and a general entity with the same name are two distinct entities.</p> <div class="div2"> -<h3> -<a name="sec-references"></a>4.1 Character and Entity References</h3> +<h3><a name="sec-references"></a>4.1 Character and Entity References</h3> <p>[<a name="dt-charref" title="Character Reference">Definition</a>: A <b>character reference</b> refers to a specific character in the ISO/IEC 10646 character set, for example one not directly accessible from available input devices.]</p> -<h5>Character Reference</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-CharRef"></a>[66] </td> -<td><code>CharRef</code></td> -<td> ::= </td> -<td><code>'&#' [0-9]+ ';' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| '&#x' [0-9a-fA-F]+ ';'</code></td> -<td><a href="#wf-Legalchar">[WFC: Legal Character]</a></td> -</tr> -</tbody></table> -<div class="constraint"> -<p class="prefix"> -<a name="wf-Legalchar"></a><b>Well-formedness constraint: Legal Character</b> -</p> -<p>Characters referred +<h5>Character Reference</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CharRef"></a>[66] </td><td><code>CharRef</code></td><td> ::= </td><td><code>'&#' [0-9]+ ';' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| '&#x' [0-9a-fA-F]+ ';'</code></td><td><a href="#wf-Legalchar">[WFC: Legal Character]</a></td></tr></tbody></table> +<div class="constraint"><p class="prefix"><a name="wf-Legalchar"></a><b>Well-formedness constraint: Legal Character</b></p><p>Characters referred to using character references must match the production for <a title="" href="#NT-Char">Char</a>.</p> </div> <p>If the character reference begins with "<code>&#x</code>", @@ -2331,77 +1329,8 @@ refers to the content of a named entity.] [<a name="dt-GERef" title="General Ent ampersand (<code>&</code>) and semicolon (<code>;</code>) as delimiters.] [<a name="dt-PERef" title="Parameter-entity reference">Definition</a>: <b>Parameter-entity references</b> use percent-sign (<code>%</code>) and semicolon (<code>;</code>) as delimiters.]</p> -<h5>Entity Reference</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Reference"></a>[67] </td> -<td><code>Reference</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityRef">EntityRef</a> | <a href="#NT-CharRef">CharRef</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityRef"></a>[68] </td> -<td><code>EntityRef</code></td> -<td> ::= </td> -<td><code>'&' <a href="#NT-Name">Name</a> ';'</code></td> -<xsltdebug></xsltdebug><td><a href="#wf-entdeclared">[WFC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#textent">[WFC: Parsed Entity]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#norecursion">[WFC: No Recursion]</a></td> -</tr> -</tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-PEReference"></a>[69] </td> -<td><code>PEReference</code></td> -<td> ::= </td> -<td><code>'%' <a href="#NT-Name">Name</a> ';'</code></td> -<xsltdebug></xsltdebug><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#norecursion">[WFC: No Recursion]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#indtd">[WFC: In DTD]</a></td> -</tr> -</tbody> -</table> -<div class="constraint"> -<p class="prefix"> -<a name="wf-entdeclared"></a><b>Well-formedness constraint: Entity Declared</b> -</p> -<p>In a document +<h5>Entity Reference</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-Reference"></a>[67] </td><td><code>Reference</code></td><td> ::= </td><td><code><a href="#NT-EntityRef">EntityRef</a> | <a href="#NT-CharRef">CharRef</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-EntityRef"></a>[68] </td><td><code>EntityRef</code></td><td> ::= </td><td><code>'&' <a href="#NT-Name">Name</a> ';'</code></td><xsltdebug></xsltdebug><td><a href="#wf-entdeclared">[WFC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#textent">[WFC: Parsed Entity]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#norecursion">[WFC: No Recursion]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PEReference"></a>[69] </td><td><code>PEReference</code></td><td> ::= </td><td><code>'%' <a href="#NT-Name">Name</a> ';'</code></td><xsltdebug></xsltdebug><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#norecursion">[WFC: No Recursion]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#indtd">[WFC: In DTD]</a></td></tr></tbody></table> +<div class="constraint"><p class="prefix"><a name="wf-entdeclared"></a><b>Well-formedness constraint: Entity Declared</b></p><p>In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "<code>standalone='yes'</code>", <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E34">[E34]</a>for an entity reference that does not occur within the external subset or a parameter @@ -2422,11 +1351,7 @@ obligated to</cite></a> read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if <a href="#sec-rmd"><cite>standalone='yes'</cite></a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="vc-entdeclared"></a><b>Validity constraint: Entity Declared</b> -</p> -<p>In a document with +<div class="constraint"><p class="prefix"><a name="vc-entdeclared"></a><b>Validity constraint: Entity Declared</b></p><p>In a document with an external subset or external parameter entities with "<code>standalone='no'</code>", the <a href="#NT-Name">Name</a> given in the entity reference must <a title="match" href="#dt-match">match</a> that in an <a href="#sec-entity-decl"><cite>entity declaration</cite></a>. For interoperability, valid documents should declare @@ -2438,31 +1363,18 @@ the entities <code>amp</code>, The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E92">[E92]</a>attribute-list declaration containing a default value with a direct or indirect reference -to that general entity.</span> -</p> +to that general entity.</span></p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="textent"></a><b>Well-formedness constraint: Parsed Entity</b> -</p> -<p>An entity reference must +<div class="constraint"><p class="prefix"><a name="textent"></a><b>Well-formedness constraint: Parsed Entity</b></p><p>An entity reference must not contain the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>. Unparsed entities may be referred to only in <a title="Attribute Value" href="#dt-attrval">attribute values</a> declared to be of type <b>ENTITY</b> or <b>ENTITIES</b>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="norecursion"></a><b>Well-formedness constraint: No Recursion</b> -</p> -<p>A parsed entity must +<div class="constraint"><p class="prefix"><a name="norecursion"></a><b>Well-formedness constraint: No Recursion</b></p><p>A parsed entity must not contain a recursive reference to itself, either directly or indirectly.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="indtd"></a><b>Well-formedness constraint: In DTD</b> -</p> -<p>Parameter-entity references may +<div class="constraint"><p class="prefix"><a name="indtd"></a><b>Well-formedness constraint: In DTD</b></p><p>Parameter-entity references may only appear in the <a title="Document Type Declaration" href="#dt-doctype">DTD</a>.</p> </div> <p>Examples of character and entity references:</p> @@ -2478,55 +1390,18 @@ is classified &security-level;.</pre></td></tr></table> </div> <div class="div2"> -<h3> -<a name="sec-entity-decl"></a>4.2 Entity Declarations</h3> +<h3><a name="sec-entity-decl"></a>4.2 Entity Declarations</h3> <p>[<a name="dt-entdecl" title="entity declaration">Definition</a>: Entities are declared thus:]</p> -<h5>Entity Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityDecl"></a>[70] </td> -<td><code>EntityDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-GEDecl">GEDecl</a> | <a href="#NT-PEDecl">PEDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-GEDecl"></a>[71] </td> -<td><code>GEDecl</code></td> -<td> ::= </td> -<td><code>'<!ENTITY' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-EntityDef">EntityDef</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-PEDecl"></a>[72] </td> -<td><code>PEDecl</code></td> -<td> ::= </td> -<td><code>'<!ENTITY' <a href="#NT-S">S</a> '%' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-PEDef">PEDef</a> <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-EntityDef"></a>[73] </td> -<td><code>EntityDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityValue">EntityValue</a> | (<a href="#NT-ExternalID">ExternalID</a> <a href="#NT-NDataDecl">NDataDecl</a>?)</code></td> -<xsltdebug></xsltdebug> -</tr> - -<tr valign="baseline"> -<td> -<a name="NT-PEDef"></a>[74] </td> -<td><code>PEDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityValue">EntityValue</a> | <a href="#NT-ExternalID">ExternalID</a></code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Entity Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-EntityDecl"></a>[70] </td><td><code>EntityDecl</code></td><td> ::= </td><td><code><a href="#NT-GEDecl">GEDecl</a> | <a href="#NT-PEDecl">PEDecl</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-GEDecl"></a>[71] </td><td><code>GEDecl</code></td><td> ::= </td><td><code>'<!ENTITY' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-EntityDef">EntityDef</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-PEDecl"></a>[72] </td><td><code>PEDecl</code></td><td> ::= </td><td><code>'<!ENTITY' <a href="#NT-S">S</a> '%' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-PEDef">PEDef</a> <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-EntityDef"></a>[73] </td><td><code>EntityDef</code></td><td> ::= </td><td><code><a href="#NT-EntityValue">EntityValue</a> | (<a href="#NT-ExternalID">ExternalID</a> <a href="#NT-NDataDecl">NDataDecl</a>?)</code></td><xsltdebug></xsltdebug></tr> + +<tr valign="baseline"><td><a name="NT-PEDef"></a>[74] </td><td><code>PEDef</code></td><td> ::= </td><td><code><a href="#NT-EntityValue">EntityValue</a> | <a href="#NT-ExternalID">ExternalID</a></code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The <a href="#NT-Name">Name</a> identifies the entity in an <a title="Entity Reference" href="#dt-entref">entity reference</a> or, in the case of an unparsed entity, in the value of @@ -2535,8 +1410,7 @@ more than once, the first declaration encountered is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.</p> <div class="div3"> -<h4> -<a name="sec-internal-ent"></a>4.2.1 Internal Entities</h4> +<h4><a name="sec-internal-ent"></a>4.2.1 Internal Entities</h4> <p>[<a name="dt-internent" title="Internal Entity Replacement Text">Definition</a>: If the entity definition is an <a href="#NT-EntityValue">EntityValue</a>, the defined entity is called an <b>internal entity</b>. There is no separate physical @@ -2550,48 +1424,16 @@ the correct <a title="Replacement Text" href="#dt-repltext">replacement text</a> </div> <div class="div3"> -<h4> -<a name="sec-external-ent"></a>4.2.2 External Entities</h4> +<h4><a name="sec-external-ent"></a>4.2.2 External Entities</h4> <p>[<a name="dt-extent" title="External Entity">Definition</a>: If the entity is not internal, it is an <b>external entity</b>, declared as follows:]</p> -<h5>External Entity Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-ExternalID"></a>[75] </td> -<td><code>ExternalID</code></td> -<td> ::= </td> -<td><code>'SYSTEM' <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a> </code></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NDataDecl"></a>[76] </td> -<td><code>NDataDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> 'NDATA' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a></code></td> -<xsltdebug></xsltdebug><td><a href="#not-declared">[VC: Notation Declared]</a></td> -</tr></tbody> -</table> +<h5>External Entity Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-ExternalID"></a>[75] </td><td><code>ExternalID</code></td><td> ::= </td><td><code>'SYSTEM' <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a></code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a> </code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-NDataDecl"></a>[76] </td><td><code>NDataDecl</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> 'NDATA' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a></code></td><xsltdebug></xsltdebug><td><a href="#not-declared">[VC: Notation Declared]</a></td></tr></tbody></table> <p>If the <a href="#NT-NDataDecl">NDataDecl</a> is present, this is a general <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>; otherwise it is a parsed entity.</p> -<div class="constraint"> -<p class="prefix"> -<a name="not-declared"></a><b>Validity constraint: Notation Declared</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="not-declared"></a><b>Validity constraint: Notation Declared</b></p><p>The <a href="#NT-Name">Name</a> must match the declared name of a <a title="Notation" href="#dt-notation">notation</a>.</p> </div> -<p> -<span class="diff-chg">[<a name="dt-sysid" title="System Identifier">Definition</a>: The <a href="#NT-SystemLiteral">SystemLiteral</a> is called the entity's <b>system +<p><span class="diff-chg">[<a name="dt-sysid" title="System Identifier">Definition</a>: The <a href="#NT-SystemLiteral">SystemLiteral</a> is called the entity's <b>system identifier</b>. It is a <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E88">[E88]</a>URI reference</span><span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a> (as defined in <a href="#rfc2396">[IETF RFC 2396]</a>, updated by <a href="#rfc2732">[IETF RFC 2732]</a>)</span>, <a href="http://www.w3.org/XML/xml-19980210-errata#E76">[E76]</a>meant @@ -2606,8 +1448,7 @@ occurs. A URI might thus be relative to the <a title="Document Entity" href="#dt entity</a>, to the entity containing the <a title="Document Type Declaration" href="#dt-doctype">external DTD subset</a>, or to some other <a title="External Entity" href="#dt-extent">external parameter entity</a>.</p> -<div class="diff-chg"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E78">[E78]</a>URI +<div class="diff-chg"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E78">[E78]</a>URI references require encoding and escaping of certain characters. The disallowed characters include all non-ASCII characters, plus the excluded characters listed in Section 2.4 of <a href="#rfc2396">[IETF RFC 2396]</a>, except for the number sign @@ -2620,8 +1461,7 @@ as one or more bytes.</p></li> <li><p>Any octets corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to <code>%</code><var>HH</var>, where HH is the hexadecimal notation of the byte value).</p></li> -<li> -<p>The original character is replaced by the resulting character sequence.</p> +<li><p>The original character is replaced by the resulting character sequence.</p> </li> </ol></div> <p>[<a name="dt-pubid" title="Public identifier">Definition</a>: In addition to a system @@ -2646,60 +1486,29 @@ be removed.</p> </div> <div class="div2"> -<h3> -<a name="TextEntities"></a>4.3 Parsed Entities</h3> +<h3><a name="TextEntities"></a>4.3 Parsed Entities</h3> <div class="div3"> -<h4> -<a name="sec-TextDecl"></a>4.3.1 The Text Declaration</h4> +<h4><a name="sec-TextDecl"></a>4.3.1 The Text Declaration</h4> <p>External parsed entities <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E107">[E107]</a>should</span> each begin with a <b>text declaration</b>.</p> -<h5>Text Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-TextDecl"></a>[77] </td> -<td><code>TextDecl</code></td> -<td> ::= </td> -<td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a>? <a href="#NT-EncodingDecl">EncodingDecl</a> <a href="#NT-S">S</a>? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Text Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-TextDecl"></a>[77] </td><td><code>TextDecl</code></td><td> ::= </td><td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a>? <a href="#NT-EncodingDecl">EncodingDecl</a> <a href="#NT-S">S</a>? '?>'</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The text declaration must be provided literally, not by reference to a parsed entity. No text declaration may appear at any position other than the beginning of an external parsed entity. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E94">[E94]</a>The text declaration in an external parsed entity is not considered part of its <a title="Replacement Text" href="#dt-repltext">replacement -text</a>.</span> -</p> +text</a>.</span></p> </div> <div class="div3"> -<h4> -<a name="wf-entities"></a>4.3.2 Well-Formed Parsed Entities</h4> +<h4><a name="wf-entities"></a>4.3.2 Well-Formed Parsed Entities</h4> <p>The document entity is well-formed if it matches the production labeled <a href="#NT-document">document</a>. An external general parsed entity is well-formed if it matches the production labeled <a href="#NT-extParsedEnt">extParsedEnt</a>. <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a>All -external parameter entities are well-formed by definition.</span> -</p> - -<h5>Well-Formed External Parsed Entity</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-extParsedEnt"></a>[78] </td> -<td><code>extParsedEnt</code></td> -<td> ::= </td> -<td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-content">content</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td class="diff-del"> -<a name="NT-extPE"></a>[79] </td> -<td class="diff-del"><code>extPE</code></td> -<td class="diff-del"> ::= </td> -<td class="diff-del"><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td> -<xsltdebug></xsltdebug><td class="diff-del"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td> -</tr></tbody> -</table> +external parameter entities are well-formed by definition.</span></p> + +<h5>Well-Formed External Parsed Entity</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-extParsedEnt"></a>[78] </td><td><code>extParsedEnt</code></td><td> ::= </td><td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-content">content</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td class="diff-del"><a name="NT-extPE"></a>[79] </td><td class="diff-del"><code>extPE</code></td><td class="diff-del"> ::= </td><td class="diff-del"><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td><xsltdebug></xsltdebug><td class="diff-del"><i>/* <a href="http://www.w3.org/XML/xml-19980210-errata#E109">[E109]</a> */</i></td></tr></tbody></table> <p>An internal general parsed entity is well-formed if its replacement text matches the production labeled <a href="#NT-content">content</a>. All internal parameter entities are well-formed by definition.</p> @@ -2710,15 +1519,13 @@ can begin in one entity and end in another.</p> </div> <div class="div3"> -<h4> -<a name="charencoding"></a>4.3.3 Character Encoding in Entities</h4> +<h4><a name="charencoding"></a>4.3.3 Character Encoding in Entities</h4> <p>Each external parsed entity in an XML document may use a different encoding for its characters. All XML processors must be able to read entities in <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E56">[E56]</a>both the UTF-8 and UTF-16 encodings.</span> <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E77">[E77]</a>The terms "UTF-8" and "UTF-16" in this specification do not apply to character encodings with any other labels, even if the encodings or labels are very -similar to UTF-8 or UTF-16.</span> -</p> +similar to UTF-8 or UTF-16.</span></p> <p>Entities encoded in UTF-16 must begin with the Byte Order Mark described by <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a>Annex F of <a href="#ISO10646">[ISO/IEC 10646]</a>, Annex H of <a href="#ISO10646-2000">[ISO/IEC 10646-2000]</a>, section @@ -2736,28 +1543,10 @@ parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a text declaration <span class="diff-add">(see <a href="#sec-TextDecl"><b>4.3.1 The Text Declaration</b></a>) </span>containing an encoding declaration:</p> -<h5>Encoding Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EncodingDecl"></a>[80] </td> -<td><code>EncodingDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> 'encoding' <a href="#NT-Eq">Eq</a> +<h5>Encoding Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EncodingDecl"></a>[80] </td><td><code>EncodingDecl</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> 'encoding' <a href="#NT-Eq">Eq</a> ('"' <a href="#NT-EncName">EncName</a> '"' | "'" <a href="#NT-EncName">EncName</a> -"'" ) </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EncName"></a>[81] </td> -<td><code>EncName</code></td> -<td> ::= </td> -<td><code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code></td> -<xsltdebug></xsltdebug><td><i>/* Encoding -name contains only Latin characters */</i></td> -</tr></tbody> -</table> +"'" ) </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-EncName"></a>[81] </td><td><code>EncName</code></td><td> ::= </td><td><code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code></td><xsltdebug></xsltdebug><td><i>/* Encoding +name contains only Latin characters */</i></td></tr></tbody></table> <p>In the <a title="Document Entity" href="#dt-docent">document entity</a>, the encoding declaration is part of the <a title="XML Declaration" href="#dt-xmldecl">XML declaration</a>. The <a href="#NT-EncName">EncName</a> is the name of the encoding used.</p> @@ -2777,8 +1566,7 @@ other encodings should use names starting with an "x-" prefix. XML processors should match character encoding names in a case-insensitive way and should either interpret an IANA-registered name as the encoding registered at IANA for that name or treat it as unknown (processors are, of course, not -required to support all IANA-registered encodings).</span> -</p> +required to support all IANA-registered encodings).</span></p> <p>In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is an <a title="Error" href="#dt-error">error</a> for an entity including an encoding declaration to be presented to the XML processor @@ -2788,8 +1576,7 @@ entity, </span>or for an entity which begins with neither a Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration.</p> -<div class="diff-add"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E5">[E5]</a>It +<div class="diff-add"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E5">[E5]</a>It is <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E36">[E36]</a>a fatal</span> error for a <a href="#NT-TextDecl">TextDecl</a> to occur other than at the beginning of an external entity.</p></div> @@ -2798,8 +1585,7 @@ encounters an entity with an encoding that it is unable to process. <span class= is a fatal error if an XML entity is determined (via default, encoding declaration, or higher-level protocol) to be in a certain encoding but contains octet sequences that are not legal in that encoding. It is also a fatal error if an XML entity -contains no encoding declaration and its content is not legal UTF-8 or UTF-16.</span> -</p> +contains no encoding declaration and its content is not legal UTF-8 or UTF-16.</span></p> <p>Examples of <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E23">[E23]</a>text declarations containing </span>encoding declarations:</p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre><?xml encoding='UTF-8'?> @@ -2808,8 +1594,7 @@ declarations containing </span>encoding declarations:</p> </div> <div class="div2"> -<h3> -<a name="entproc"></a>4.4 XML Processor Treatment of Entities and References</h3> +<h3><a name="entproc"></a>4.4 XML Processor Treatment of Entities and References</h3> <p>The table below summarizes the contexts in which character references, entity references, and invocations of unparsed entities might appear and the required behavior of an <a title="XML Processor" href="#dt-xml-proc">XML processor</a> @@ -2840,83 +1625,34 @@ entity value</a> in the entity's declaration; corresponds to the nonterminal <a </dd> <dt class="label">Reference in DTD</dt> <dd> -<div class="diff-chg"><p> -<a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a>as +<div class="diff-chg"><p><a href="http://www.w3.org/XML/xml-19980210-errata#E90">[E90]</a>as a reference within either the internal or external subsets of the <a title="Document Type Declaration" href="#dt-doctype">DTD</a>, but outside of an <a href="#NT-EntityValue">EntityValue</a>, <a href="#NT-AttValue">AttValue</a>, <a href="#NT-PI">PI</a>, <a href="#NT-Comment">Comment</a>, <a href="#NT-SystemLiteral">SystemLiteral</a>, <a href="#NT-PubidLiteral">PubidLiteral</a>, or the contents of an ignored conditional section (see <a href="#sec-condition-sect"><b>3.4 Conditional Sections</b></a>).</p></div> <p>.</p> </dd> </dl><p></p> -<table border="1" frame="border" cellpadding="7"><tbody align="center"> -<tr> -<td rowspan="2" colspan="1"></td> -<td rowspan="1" colspan="4" align="center" valign="bottom">Entity -Type</td> -<td colspan="1" rowspan="2" align="center">Character</td> -</tr> -<tr align="center" valign="bottom"> -<td colspan="1" rowspan="1">Parameter</td> -<td colspan="1" rowspan="1">Internal General</td> -<td colspan="1" rowspan="1">External Parsed -General</td> -<td colspan="1" rowspan="1">Unparsed</td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference -in Content</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -<td colspan="1" rowspan="1"><a href="#include-if-valid"><cite>Included -if validating</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in Attribute Value</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included -in literal</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#forbidden"><cite>Forbidden</cite></a></div> -</td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Occurs as Attribute -Value</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#forbidden"><cite>Forbidden</cite></a></div> -</td> -<td colspan="1" rowspan="1"><a href="#notify"><cite>Notify</cite></a></td> -<td colspan="1" rowspan="1"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#not-recognized"><cite>Not recognized</cite></a></div> -</td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in EntityValue</td> -<td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included in literal</cite></a></td> -<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> -<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in DTD</td> -<td colspan="1" rowspan="1"><a href="#as-PE"><cite>Included -as PE</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -</tr> -</tbody></table> +<table border="1" frame="border" cellpadding="7"><tbody align="center"><tr> +<td rowspan="2" colspan="1"></td><td rowspan="1" colspan="4" align="center" valign="bottom">Entity +Type</td><td colspan="1" rowspan="2" align="center">Character</td></tr><tr align="center" valign="bottom"><td colspan="1" rowspan="1">Parameter</td><td colspan="1" rowspan="1">Internal General</td><td colspan="1" rowspan="1">External Parsed +General</td><td colspan="1" rowspan="1">Unparsed</td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference +in Content</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td><td colspan="1" rowspan="1"><a href="#include-if-valid"><cite>Included +if validating</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in Attribute Value</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td><td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included +in literal</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#forbidden"><cite>Forbidden</cite></a></div></td><td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> +</tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Occurs as Attribute +Value</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#forbidden"><cite>Forbidden</cite></a></div></td><td colspan="1" rowspan="1"><a href="#notify"><cite>Notify</cite></a></td> +<td colspan="1" rowspan="1"><a href="http://www.w3.org/XML/xml-19980210-errata#E51">[E51]</a><div class="diff-chg"><a href="#not-recognized"><cite>Not recognized</cite></a></div></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in EntityValue</td><td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included in literal</cite></a></td><td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> +<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in DTD</td><td colspan="1" rowspan="1"><a href="#as-PE"><cite>Included +as PE</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td></tr></tbody></table> <div class="div3"> -<h4> -<a name="not-recognized"></a>4.4.1 Not Recognized</h4> +<h4><a name="not-recognized"></a>4.4.1 Not Recognized</h4> <p>Outside the DTD, the <code>%</code> character has no special significance; thus, what would be parameter entity references in the DTD are not recognized as markup in <a href="#NT-content">content</a>. Similarly, the names of unparsed @@ -2925,8 +1661,7 @@ declared attribute.</p> </div> <div class="div3"> -<h4> -<a name="included"></a>4.4.2 Included</h4> +<h4><a name="included"></a>4.4.2 Included</h4> <p>[<a name="dt-include" title="Include">Definition</a>: An entity is <b>included</b> when its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is retrieved and processed, in place of the reference itself, as though it were part of @@ -2947,8 +1682,7 @@ of the reference itself. </p> </div> <div class="div3"> -<h4> -<a name="include-if-valid"></a>4.4.3 Included If Validating</h4> +<h4><a name="include-if-valid"></a>4.4.3 Included If Validating</h4> <p>When an XML processor recognizes a reference to a parsed entity, in order to <a title="Validity" href="#dt-valid">validate</a> the document, the processor must <a title="Include" href="#dt-include">include</a> its replacement text. If @@ -2966,15 +1700,13 @@ presence and retrieve it for display only on demand.</p> </div> <div class="div3"> -<h4> -<a name="forbidden"></a>4.4.4 Forbidden</h4> +<h4><a name="forbidden"></a>4.4.4 Forbidden</h4> <p>The following are forbidden, and constitute <a title="Fatal Error" href="#dt-fatal">fatal</a> errors:</p> <ul> <li><p>the appearance of a reference to an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>.</p></li> -<li> -<p>the appearance of any character or general-entity reference in the +<li><p>the appearance of any character or general-entity reference in the DTD except within an <a href="#NT-EntityValue">EntityValue</a> or <a href="#NT-AttValue">AttValue</a>.</p> </li> <li><p>a reference to an external entity in an attribute value.</p></li> @@ -2982,8 +1714,7 @@ DTD except within an <a href="#NT-EntityValue">EntityValue</a> or <a href="#NT-A </div> <div class="div3"> -<h4> -<a name="inliteral"></a>4.4.5 Included in Literal</h4> +<h4><a name="inliteral"></a>4.4.5 Included in Literal</h4> <p>When an <a title="Entity Reference" href="#dt-entref">entity reference</a> appears in an attribute value, or a parameter entity reference appears in a literal entity value, its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is processed @@ -3000,8 +1731,7 @@ character and will not terminate the literal. For example, this is well-formed:< </div> <div class="div3"> -<h4> -<a name="notify"></a>4.4.6 Notify</h4> +<h4><a name="notify"></a>4.4.6 Notify</h4> <p>When the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a> appears as a token in the value of an attribute of declared type <b>ENTITY</b> or <b>ENTITIES</b>, a validating processor must inform the application of @@ -3010,15 +1740,13 @@ the <a title="System Identifier" href="#dt-sysid">system</a> and <a title="Publi </div> <div class="div3"> -<h4> -<a name="bypass"></a>4.4.7 Bypassed</h4> +<h4><a name="bypass"></a>4.4.7 Bypassed</h4> <p>When a general entity reference appears in the <a href="#NT-EntityValue">EntityValue</a> in an entity declaration, it is bypassed and left as is.</p> </div> <div class="div3"> -<h4> -<a name="as-PE"></a>4.4.8 Included as PE</h4> +<h4><a name="as-PE"></a>4.4.8 Included as PE</h4> <p>Just as with external parsed entities, parameter entities need only be <a href="#include-if-valid"><cite>included if validating</cite></a>. When a parameter-entity reference is recognized in the DTD and included, its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is enlarged by the attachment of one leading and one following @@ -3026,14 +1754,12 @@ space (#x20) character; the intent is to constrain the replacement text of parameter entities to contain an integral number of grammatical tokens in the DTD. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E96">[E96]</a>This behavior does not apply to parameter entity references within entity values; -these are described in <a href="#inliteral"><b>4.4.5 Included in Literal</b></a>.</span> -</p> +these are described in <a href="#inliteral"><b>4.4.5 Included in Literal</b></a>.</span></p> </div> </div> <div class="div2"> -<h3> -<a name="intern-replacement"></a>4.5 Construction of Internal Entity Replacement Text</h3> +<h3><a name="intern-replacement"></a>4.5 Construction of Internal Entity Replacement Text</h3> <p>In discussing the treatment of internal entities, it is useful to distinguish two forms of the entity's value. [<a name="dt-litentval" title="Literal Entity Value">Definition</a>: The <b>literal entity value</b> is the quoted string actually present in the entity declaration, @@ -3063,8 +1789,7 @@ of a difficult example, see <a href="#sec-entexpand"><b>D Expansion of Entity an </div> <div class="div2"> -<h3> -<a name="sec-predefined-ent"></a>4.6 Predefined Entities</h3> +<h3><a name="sec-predefined-ent"></a>4.6 Predefined Entities</h3> <p>[<a name="dt-escape" title="escape">Definition</a>: Entity and character references can both be used to <b>escape</b> the left angle bracket, ampersand, and other delimiters. A set of general entities (<code>amp</code>, @@ -3089,8 +1814,7 @@ a well-formed result. If the entities <code>gt</code>, <code>apos</code>, or <code>quot</code> are declared, they must be declared as internal entities whose replacement text is the single character being escaped (or a character reference to that character; the double escaping here is unnecessary but harmless). -For example:</span> -</p> +For example:</span></p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre><!ENTITY lt "&#38;#60;"> <!ENTITY gt "&#62;"> <!ENTITY amp "&#38;#38;"> @@ -3102,8 +1826,7 @@ are doubly escaped to meet the requirement that entity replacement be well-forme </div> <div class="div2"> -<h3> -<a name="Notations"></a>4.7 Notation Declarations</h3> +<h3><a name="Notations"></a>4.7 Notation Declarations</h3> <p>[<a name="dt-notation" title="Notation">Definition</a>: <b>Notations</b> identify by name the format of <a title="External Entity" href="#dt-extent">unparsed entities</a>, the format of elements which bear a notation attribute, or the application @@ -3114,32 +1837,10 @@ and in attribute specifications, and an external identifier for the notation which may allow an XML processor or its client application to locate a helper application capable of processing data in the given notation.]</p> -<h5>Notation Declarations</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NotationDecl"></a>[82] </td> -<td><code>NotationDecl</code></td> -<td> ::= </td> -<td><code>'<!NOTATION' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> (<a href="#NT-ExternalID">ExternalID</a> | <a href="#NT-PublicID">PublicID</a>) <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug><td class="diff-add"><a href="#UniqueNotationName">[VC: Unique -Notation Name]</a></td> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PublicID"></a>[83] </td> -<td><code>PublicID</code></td> -<td> ::= </td> -<td><code>'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> -<div class="diff-add"><div class="constraint"> -<p class="prefix"> -<a name="UniqueNotationName"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E22">[E22]</a>Unique -Notation Name</b> -</p> -<p>Only one notation declaration can declare a given <a href="#NT-Name">Name</a>.</p> +<h5>Notation Declarations</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-NotationDecl"></a>[82] </td><td><code>NotationDecl</code></td><td> ::= </td><td><code>'<!NOTATION' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> (<a href="#NT-ExternalID">ExternalID</a> | <a href="#NT-PublicID">PublicID</a>) <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug><td class="diff-add"><a href="#UniqueNotationName">[VC: Unique +Notation Name]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PublicID"></a>[83] </td><td><code>PublicID</code></td><td> ::= </td><td><code>'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> </code></td><xsltdebug></xsltdebug></tr></tbody></table> +<div class="diff-add"><div class="constraint"><p class="prefix"><a name="UniqueNotationName"></a><b>Validity constraint: <a href="http://www.w3.org/XML/xml-19980210-errata#E22">[E22]</a>Unique +Notation Name</b></p><p>Only one notation declaration can declare a given <a href="#NT-Name">Name</a>.</p> </div></div> <p>XML processors must provide applications with the name and external identifier(s) of any notation declared and referred to in an attribute value, attribute @@ -3153,8 +1854,7 @@ running.)</p> </div> <div class="div2"> -<h3> -<a name="sec-doc-entity"></a>4.8 Document Entity</h3> +<h3><a name="sec-doc-entity"></a>4.8 Document Entity</h3> <p>[<a name="dt-docent" title="Document Entity">Definition</a>: The <b>document entity</b> serves as the root of the entity tree and a starting-point for an <a title="XML Processor" href="#dt-xml-proc">XML processor</a>.] This specification does not specify how the document entity is to be located by an XML processor; @@ -3165,12 +1865,10 @@ on a processor input stream without any identification at all.</p> <div class="div1"> -<h2> -<a name="sec-conformance"></a>5 Conformance</h2> +<h2><a name="sec-conformance"></a>5 Conformance</h2> <div class="div2"> -<h3> -<a name="proc-types"></a>5.1 Validating and Non-Validating Processors</h3> +<h3><a name="proc-types"></a>5.1 Validating and Non-Validating Processors</h3> <p>Conforming <a title="XML Processor" href="#dt-xml-proc">XML processors</a> fall into two classes: validating and non-validating.</p> <p>Validating and non-validating processors alike must report violations of @@ -3200,8 +1898,7 @@ the entity may have contained overriding declarations.</p> </div> <div class="div2"> -<h3> -<a name="safe-behavior"></a>5.2 Using XML Processors</h3> +<h3><a name="safe-behavior"></a>5.2 Using XML Processors</h3> <p>The behavior of a validating XML processor is highly predictable; it must read every piece of a document and report all well-formedness and validity violations. Less is required of a non-validating processor; it need not read @@ -3229,8 +1926,7 @@ external entities should use validating XML processors.</p> </div> <div class="div1"> -<h2> -<a name="sec-notation"></a>6 Notation</h2> +<h2><a name="sec-notation"></a>6 Notation</h2> <p>The formal grammar of XML is given in this specification using a simple Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines one symbol, in the form</p> @@ -3249,9 +1945,7 @@ zeros in the <code>#xN</code> form is insignificant; the number of leading zeros in the corresponding code value is governed by the character encoding in use and is not significant for XML.</p> </dd> -<dt class="label"> -<code>[a-zA-Z]</code>, <code>[#xN-#xN]</code> -</dt> +<dt class="label"><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></dt> <dd> <p>matches any <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E93">[E93]</a><a href="#NT-Char">Char</a></span> with a value in the range(s) indicated (inclusive).</p> </dd> @@ -3260,20 +1954,15 @@ in use and is not significant for XML.</p> <p>matches any <a href="#NT-Char">Char</a> with a value among the characters enumerated. Enumerations and ranges can be mixed in one set of brackets.</p> </div></dd> -<dt class="label"> -<code>[^a-z]</code>, <code>[^#xN-#xN]</code> -</dt> +<dt class="label"><code>[^a-z]</code>, <code>[^#xN-#xN]</code></dt> <dd> <p>matches any <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E93">[E93]</a><a href="#NT-Char">Char</a></span> with a value <em>outside</em> the range indicated.</p> </dd> -<dt class="label"> -<code>[^abc]</code>, <code>[^#xN#xN#xN]</code> -</dt> +<dt class="label"><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></dt> <dd> <p>matches any <span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E93">[E93]</a><a href="#NT-Char">Char</a></span> with a value not among the characters given. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E3">[E3]</a>Enumerations -and ranges of forbidden values can be mixed in one set of brackets.</span> -</p> +and ranges of forbidden values can be mixed in one set of brackets.</span></p> </dd> <dt class="label"><code>"string"</code></dt> <dd> @@ -3289,8 +1978,7 @@ given inside the single quotes.</p> where <code>A</code> and <code>B</code> represent simple expressions: </p><dl> <dt class="label">(<code>expression</code>)</dt> <dd> -<p> -<code>expression</code> is treated as a unit and may be combined as described +<p><code>expression</code> is treated as a unit and may be combined as described in this list.</p> </dd> <dt class="label"><code>A?</code></dt> @@ -3301,8 +1989,7 @@ in this list.</p> <dd> <p>matches <code>A</code> followed by <code>B</code>. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E20">[E20]</a>This operator has higher precedence than alternation; thus <code>A B | C D</code> -is identical to <code>(A B) | (C D)</code>.</span> -</p> +is identical to <code>(A B) | (C D)</code>.</span></p> </dd> <dt class="label"><code>A | B</code></dt> <dd> @@ -3316,15 +2003,13 @@ is identical to <code>(A B) | (C D)</code>.</span> <dd> <p>matches one or more occurrences of <code>A</code>.<span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E20">[E20]</a>Concatenation has higher precedence than alternation; thus <code>A+ | B+</code> is identical -to <code>(A+) | (B+)</code>.</span> -</p> +to <code>(A+) | (B+)</code>.</span></p> </dd> <dt class="label"><code>A*</code></dt> <dd> <p>matches zero or more occurrences of <code>A</code>. <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E20">[E20]</a>Concatenation has higher precedence than alternation; thus <code>A* | B*</code> is identical -to <code>(A*) | (B*)</code>.</span> -</p> +to <code>(A*) | (B*)</code>.</span></p> </dd> </dl><p> Other notations used in the productions are: </p><dl> <dt class="label"><code>/* ... */</code></dt> @@ -3342,190 +2027,129 @@ documents associated with a production.</p> </dd> </dl><p></p> </div> -</div> -<div class="back"> +</div><div class="back"> <div class="div1"> -<h2> -<a name="sec-bibliography"></a>A References</h2> +<h2><a name="sec-bibliography"></a>A References</h2> <div class="div2"> -<h3> -<a name="sec-existing-stds"></a>A.1 Normative References</h3> +<h3><a name="sec-existing-stds"></a>A.1 Normative References</h3> <dl> -<dt class="label"><span class="diff-chg"><a name="IANA"></a>IANA-CHARSETS</span></dt> -<dd><div class="diff-chg"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E58">[E58]</a>(Internet +<dt class="label"><span class="diff-chg"><a name="IANA"></a>IANA-CHARSETS</span></dt><dd><div class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E58">[E58]</a>(Internet Assigned Numbers Authority) <cite>Official Names for Character Sets</cite>, ed. Keld Simonsen et al. See <a href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</a>. </div></dd> -<dt class="label"> -<a name="RFC1766"></a>IETF RFC 1766</dt> -<dd>IETF +<dt class="label"><a name="RFC1766"></a>IETF RFC 1766</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 1766: Tags for the Identification of Languages</cite>, ed. H. Alvestrand. 1995. (See <a href="http://www.ietf.org/rfc/rfc1766.txt">http://www.ietf.org/rfc/rfc1766.txt</a>.)</dd> -<dt class="label"><span class="diff-del"><a name="ISO639-old"></a>ISO 639</span></dt> -<dd><div class="diff-del"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> +<dt class="label"><span class="diff-del"><a name="ISO639-old"></a>ISO 639</span></dt><dd><div class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> (International Organization for Standardization). <cite>ISO 639:1988 (E). Code for the representation of names of languages.</cite> [Geneva]: International Organization for Standardization, 1988.</div></dd> -<dt class="label"><span class="diff-del"><a name="ISO3166-old"></a>ISO 3166</span></dt> -<dd><div class="diff-del"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> +<dt class="label"><span class="diff-del"><a name="ISO3166-old"></a>ISO 3166</span></dt><dd><div class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> (International Organization for Standardization). <cite>ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes</cite> [Geneva]: International Organization for Standardization, 1997.</div></dd> -<dt class="label"> -<a name="ISO10646"></a>ISO/IEC 10646</dt> -<dd>ISO (International Organization for +<dt class="label"><a name="ISO10646"></a>ISO/IEC 10646</dt><dd>ISO (International Organization for Standardization). <cite>ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.</cite> [Geneva]: International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7).</dd> -<dt class="label"><span class="diff-add"><a name="ISO10646-2000"></a>ISO/IEC 10646-2000</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a> ISO (International +<dt class="label"><span class="diff-add"><a name="ISO10646-2000"></a>ISO/IEC 10646-2000</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a> ISO (International Organization for Standardization). <cite>ISO/IEC 10646-1:2000. Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.</cite> [Geneva]: International Organization for Standardization, 2000.</div></dd> -<dt class="label"> -<a name="Unicode"></a>Unicode</dt> -<dd>The Unicode Consortium. <em>The Unicode +<dt class="label"><a name="Unicode"></a>Unicode</dt><dd>The Unicode Consortium. <em>The Unicode Standard, Version 2.0.</em> Reading, Mass.: Addison-Wesley Developers Press, 1996.</dd> -<dt class="label"><span class="diff-add"><a name="Unicode3"></a>Unicode3</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a> +<dt class="label"><span class="diff-add"><a name="Unicode3"></a>Unicode3</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a> The Unicode Consortium. <em>The Unicode Standard, Version 3.0.</em> Reading, Mass.: Addison-Wesley Developers Press, 2000. ISBN 0-201-61633-5.</div></dd> -</dl> -</div> +</dl></div> <div class="div2"> -<h3> -<a name="null"></a>A.2 Other References</h3> +<h3><a name="null"></a>A.2 Other References</h3> <dl> -<dt class="label"> -<a name="Aho"></a>Aho/Ullman</dt> -<dd>Aho, Alfred V., Ravi Sethi, and Jeffrey D. +<dt class="label"><a name="Aho"></a>Aho/Ullman</dt><dd>Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. <cite>Compilers: Principles, Techniques, and Tools</cite>. Reading: Addison-Wesley, 1986, rpt. corr. 1988.</dd> -<dt class="label"> -<a name="Berners-Lee"></a>Berners-Lee et al.</dt> -<dd> Berners-Lee, T., R. Fielding, +<dt class="label"><a name="Berners-Lee"></a>Berners-Lee et al.</dt><dd> Berners-Lee, T., R. Fielding, and L. Masinter. <cite>Uniform Resource Identifiers (URI): Generic Syntax and Semantics</cite>. 1997. (Work in progress; see updates to RFC1738.)</dd> -<dt class="label"><span class="diff-chg"><a name="ABK"></a>Brüggemann-Klein</span></dt> -<dd><div class="diff-chg"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E2">[E2]</a>Brüggemann-Klein, +<dt class="label"><span class="diff-chg"><a name="ABK"></a>Brüggemann-Klein</span></dt><dd><div class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E2">[E2]</a>Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993. (See <a href="ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps">ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps</a>.)</div></dd> -<dt class="label"><span class="diff-chg"><a name="ABKDW"></a>Brüggemann-Klein and Wood</span></dt> -<dd><div class="diff-chg"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E2">[E2]</a>Brüggemann-Klein, +<dt class="label"><span class="diff-chg"><a name="ABKDW"></a>Brüggemann-Klein and Wood</span></dt><dd><div class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E2">[E2]</a>Brüggemann-Klein, Anne, and Derick Wood. <cite>Deterministic Regular Languages</cite>. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. Full version titled <cite>One-Unambiguous Regular Languages</cite> in Information and Computation 140 (2): 229-253, February 1998.</div></dd> -<dt class="label"> -<a name="Clark"></a>Clark</dt> -<dd>James Clark. Comparison of SGML and XML. See <a href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</a>. </dd> -<dt class="label"><span class="diff-add"><a name="IANA-LANGCODES"></a>IANA-LANGCODES</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E58">[E58]</a>(Internet +<dt class="label"><a name="Clark"></a>Clark</dt><dd>James Clark. Comparison of SGML and XML. See <a href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</a>. </dd> +<dt class="label"><span class="diff-add"><a name="IANA-LANGCODES"></a>IANA-LANGCODES</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E58">[E58]</a>(Internet Assigned Numbers Authority) <cite>Registry of Language Tags</cite>, ed. Keld Simonsen et al. (See <a href="http://www.isi.edu/in-notes/iana/assignments/languages/">http://www.isi.edu/in-notes/iana/assignments/languages/</a>.)</div></dd> -<dt class="label"><span class="diff-del"><a name="RFC1738"></a>IETF RFC1738</span></dt> -<dd><div class="diff-del">IETF +<dt class="label"><span class="diff-del"><a name="RFC1738"></a>IETF RFC1738</span></dt><dd><div class="diff-del">IETF (Internet Engineering Task Force). <cite>RFC 1738: Uniform Resource Locators (URL)</cite>, ed. T. Berners-Lee, L. Masinter, M. McCahill. 1994. (See <a href="http://www.ietf.org/rfc/rfc1738.txt">http://www.ietf.org/rfc/rfc1738.txt</a>.)</div></dd> -<dt class="label"><span class="diff-del"><a name="RFC1808"></a>IETF RFC1808</span></dt> -<dd><div class="diff-del">IETF +<dt class="label"><span class="diff-del"><a name="RFC1808"></a>IETF RFC1808</span></dt><dd><div class="diff-del">IETF (Internet Engineering Task Force). <cite>RFC 1808: Relative Uniform Resource Locators</cite>, ed. R. Fielding. 1995. (See <a href="http://www.ietf.org/rfc/rfc1808.txt">http://www.ietf.org/rfc/rfc1808.txt</a>.)</div></dd> -<dt class="label"> -<a name="RFC2141"></a>IETF RFC2141</dt> -<dd>IETF +<dt class="label"><a name="RFC2141"></a>IETF RFC2141</dt><dd>IETF (Internet Engineering Task Force). <em>RFC 2141: URN Syntax</em>, ed. R. Moats. 1997. (See <a href="http://www.ietf.org/rfc/rfc2141.txt">http://www.ietf.org/rfc/rfc2141.txt</a>.)</dd> -<dt class="label"><span class="diff-add"><a name="rfc2279"></a>IETF RFC 2279</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E78">[E78]</a>IETF +<dt class="label"><span class="diff-add"><a name="rfc2279"></a>IETF RFC 2279</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E78">[E78]</a>IETF (Internet Engineering Task Force). <cite>RFC 2279: UTF-8, a transformation format of ISO 10646</cite>, <span class="diff-add">ed. F. Yergeau, </span>1998. (See <a href="http://www.ietf.org/rfc/rfc2279.txt">http://www.ietf.org/rfc/rfc2279.txt</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="rfc2376"></a>IETF RFC 2376</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E48">[E48]</a>IETF +<dt class="label"><span class="diff-add"><a name="rfc2376"></a>IETF RFC 2376</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E48">[E48]</a>IETF (Internet Engineering Task Force). <cite>RFC 2376: XML Media Types</cite>. ed. E. Whitehead, M. Murata. 1998. (See <a href="http://www.ietf.org/rfc/rfc2376.txt">http://www.ietf.org/rfc/rfc2376.txt</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="rfc2396"></a>IETF RFC 2396</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>IETF +<dt class="label"><span class="diff-add"><a name="rfc2396"></a>IETF RFC 2396</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>IETF (Internet Engineering Task Force). <cite>RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax</cite>. T. Berners-Lee, R. Fielding, L. Masinter. 1998. (See <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="rfc2732"></a>IETF RFC 2732</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>IETF +<dt class="label"><span class="diff-add"><a name="rfc2732"></a>IETF RFC 2732</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E66">[E66]</a>IETF (Internet Engineering Task Force). <cite>RFC 2732: Format for Literal IPv6 Addresses in URL's</cite>. R. Hinden, B. Carpenter, L. Masinter. 1999. (See <a href="http://www.ietf.org/rfc/rfc2732.txt">http://www.ietf.org/rfc/rfc2732.txt</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="rfc2781"></a>IETF RFC 2781</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E77">[E77]</a> +<dt class="label"><span class="diff-add"><a name="rfc2781"></a>IETF RFC 2781</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E77">[E77]</a> IETF (Internet Engineering Task Force). <em>RFC 2781: UTF-16, an encoding of ISO 10646</em>, ed. P. Hoffman, F. Yergeau. 2000. (See <a href="http://www.ietf.org/rfc/rfc2781.txt">http://www.ietf.org/rfc/rfc2781.txt</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="ISO639"></a>ISO 639</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> +<dt class="label"><span class="diff-add"><a name="ISO639"></a>ISO 639</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> (International Organization for Standardization). <cite>ISO 639:1988 (E). Code for the representation of names of languages.</cite> [Geneva]: International Organization for Standardization, 1988.</div></dd> -<dt class="label"><span class="diff-add"><a name="ISO3166"></a>ISO 3166</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> +<dt class="label"><span class="diff-add"><a name="ISO3166"></a>ISO 3166</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E38">[E38]</a> (International Organization for Standardization). <cite>ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes</cite> [Geneva]: International Organization for Standardization, 1997.</div></dd> -<dt class="label"> -<a name="ISO8879"></a>ISO 8879</dt> -<dd>ISO (International Organization for Standardization). <cite>ISO +<dt class="label"><a name="ISO8879"></a>ISO 8879</dt><dd>ISO (International Organization for Standardization). <cite>ISO 8879:1986(E). Information processing -- Text and Office Systems -- Standard Generalized Markup Language (SGML).</cite> First edition -- 1986-10-15. [Geneva]: International Organization for Standardization, 1986. </dd> -<dt class="label"> -<a name="ISO10744"></a>ISO/IEC 10744</dt> -<dd>ISO (International Organization for +<dt class="label"><a name="ISO10744"></a>ISO/IEC 10744</dt><dd>ISO (International Organization for Standardization). <cite>ISO/IEC 10744-1992 (E). Information technology -- Hypermedia/Time-based Structuring Language (HyTime). </cite> [Geneva]: International Organization for Standardization, 1992. <em>Extended Facilities Annexe.</em> [Geneva]: International Organization for Standardization, 1996. </dd> -<dt class="label"><span class="diff-add"><a name="websgml"></a>WEBSGML</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E43">[E43]</a>ISO +<dt class="label"><span class="diff-add"><a name="websgml"></a>WEBSGML</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E43">[E43]</a>ISO (International Organization for Standardization). <cite>ISO 8879:1986 TC2. Information technology -- Document Description and Processing Languages. </cite> [Geneva]: International Organization for Standardization, 1998. (See <a href="http://www.sgmlsource.com/8879rev/n0029.htm">http://www.sgmlsource.com/8879rev/n0029.htm</a>.)</div></dd> -<dt class="label"><span class="diff-add"><a name="xml-names"></a>XML Names</span></dt> -<dd><div class="diff-add"> -<a href="http://www.w3.org/XML/xml-19980210-errata#E98">[E98]</a>Tim Bray, +<dt class="label"><span class="diff-add"><a name="xml-names"></a>XML Names</span></dt><dd><div class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E98">[E98]</a>Tim Bray, Dave Hollander, and Andrew Layman, editors. <cite>Namespaces in XML</cite>. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999. (See <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a>.)</div></dd> -</dl> -</div> +</dl></div> </div> <div class="div1"> -<h2> -<a name="CharClasses"></a>B Character Classes</h2> +<h2><a name="CharClasses"></a>B Character Classes</h2> <p>Following the characteristics defined in the Unicode standard, characters are classed as base characters (among others, these contain the alphabetic characters of the Latin alphabet<span class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E84">[E84]</a>, without @@ -3534,22 +2158,9 @@ others, this class contains most diacritics)<span class="diff-del"><a href="http combine to form the class of letters.</span> Digits and extenders are also distinguished.</p> -<h5>Characters</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Letter"></a>[84] </td> -<td><code>Letter</code></td> -<td> ::= </td> -<td><code><a href="#NT-BaseChar">BaseChar</a> | <a href="#NT-Ideographic">Ideographic</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-BaseChar"></a>[85] </td> -<td><code>BaseChar</code></td> -<td> ::= </td> -<td><code>[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] +<h5>Characters</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Letter"></a>[84] </td><td><code>Letter</code></td><td> ::= </td><td><code><a href="#NT-BaseChar">BaseChar</a> | <a href="#NT-Ideographic">Ideographic</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-BaseChar"></a>[85] </td><td><code>BaseChar</code></td><td> ::= </td><td><code>[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] @@ -3598,23 +2209,9 @@ distinguished.</p> | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] -| [#x3105-#x312C] | [#xAC00-#xD7A3] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Ideographic"></a>[86] </td> -<td><code>Ideographic</code></td> -<td> ::= </td> -<td><code>[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-CombiningChar"></a>[87] </td> -<td><code>CombiningChar</code></td> -<td> ::= </td> -<td><code>[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] +| [#x3105-#x312C] | [#xAC00-#xD7A3] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Ideographic"></a>[86] </td><td><code>Ideographic</code></td><td> ::= </td><td><code>[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-CombiningChar"></a>[87] </td><td><code>CombiningChar</code></td><td> ::= </td><td><code>[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] @@ -3637,30 +2234,14 @@ distinguished.</p> | #x0F3F | [#x0F71-#x0F84] | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] | #x3099 -| #x309A </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Digit"></a>[88] </td> -<td><code>Digit</code></td> -<td> ::= </td> -<td><code>[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] +| #x309A </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Digit"></a>[88] </td><td><code>Digit</code></td><td> ::= </td><td><code>[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] -| [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Extender"></a>[89] </td> -<td><code>Extender</code></td> -<td> ::= </td> -<td><code>#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 +| [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Extender"></a>[89] </td><td><code>Extender</code></td><td> ::= </td><td><code>#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] -| [#x30FC-#x30FE] </code></td> -<xsltdebug></xsltdebug> -</tr> +| [#x30FC-#x30FE] </code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The character classes defined here can be derived from the Unicode <span class="diff-add"><a href="http://www.w3.org/XML/xml-19980210-errata#E67">[E67]</a>2.0</span> character database as follows:</p> @@ -3684,26 +2265,22 @@ section 5.14).</p></li> list so identifies it.</p></li> <li><p>Character #x0387 is added as a name character, because #x00B7 is its canonical equivalent.</p></li> -<li> -<p>Characters ':' and '_' are allowed as name-start characters.</p> +<li><p>Characters ':' and '_' are allowed as name-start characters.</p> </li> <li><p>Characters '-' and '.' are allowed as name characters.</p></li> </ul> </div> <div class="div1"> -<h2> -<a name="sec-xml-and-sgml"></a>C XML and SGML (Non-Normative)</h2> -<p> -<span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E43">[E43]</a>XML +<h2><a name="sec-xml-and-sgml"></a>C XML and SGML (Non-Normative)</h2> +<p><span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E43">[E43]</a>XML is designed to be a subset of SGML, in that every XML document should also be a conforming SGML document.</span> For a detailed comparison of the additional restrictions that XML places on documents beyond those of SGML, see <a href="#Clark">[Clark]</a>.</p> </div> <div class="div1"> -<h2> -<a name="sec-entexpand"></a>D Expansion of Entity and Character References (Non-Normative)</h2> +<h2><a name="sec-entexpand"></a>D Expansion of Entity and Character References (Non-Normative)</h2> <p>This appendix contains some examples illustrating the sequence of entity- and character-reference recognition and expansion, as specified in <a href="#entproc"><b>4.4 XML Processor Treatment of Entities and References</b></a>.</p> <p>If the DTD contains the declaration</p> @@ -3746,8 +2323,7 @@ is not yet declared.)</p></li> is expanded immediately and the parameter entity "<code>zz</code>" is stored with the replacement text "<code><!ENTITY tricky "error-prone" ></code>", which is a well-formed entity declaration.</p></li> -<li> -<p>in line 6, the reference to "<code>xx</code>" is recognized, +<li><p>in line 6, the reference to "<code>xx</code>" is recognized, and the replacement text of "<code>xx</code>" (namely "<code>%zz;</code>") is parsed. The reference to "<code>zz</code>" is recognized in its turn, and its replacement text ("<code><!ENTITY tricky "error-prone" @@ -3757,16 +2333,13 @@ has now been declared, with the replacement text "<code>error-prone</code>& <li><p>in line 8, the reference to the general entity "<code>tricky</code>" is recognized, and it is expanded, so the full content of the <code>test</code> element is the self-describing (and ungrammatical) string <em>This sample -shows a error-prone method.</em> -</p></li> +shows a error-prone method.</em></p></li> </ul> </div> <div class="div1"> -<h2> -<a name="determinism"></a>E Deterministic Content Models (Non-Normative)</h2> -<p> -<span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E102">[E102]</a>As +<h2><a name="determinism"></a>E Deterministic Content Models (Non-Normative)</h2> +<p><span class="diff-chg"><a href="http://www.w3.org/XML/xml-19980210-errata#E102">[E102]</a>As noted in <a href="#sec-element-content"><b>3.2.1 Element Content</b></a>, it is required that content models in element type declarations be deterministic. This requirement is <a title="For Compatibility" href="#dt-compat">for compatibility</a> with SGML (which calls deterministic content models "unambiguous");</span> XML processors built @@ -3793,8 +2366,7 @@ Brüggemann-Klein 1991 <a href="#ABK">[Brüggemann-Klein]</a>.</p> </div> <div class="div1"> -<h2> -<a name="sec-guessing"></a>F <a href="http://www.w3.org/XML/xml-19980210-errata#E105">[E105]</a><a href="http://www.w3.org/XML/xml-19980210-errata#E48">[E48]</a>Autodetection +<h2><a name="sec-guessing"></a>F <a href="http://www.w3.org/XML/xml-19980210-errata#E105">[E105]</a><a href="http://www.w3.org/XML/xml-19980210-errata#E48">[E48]</a>Autodetection of Character Encodings (Non-Normative)</h2> <p>The XML encoding declaration functions as an internal label on each entity, indicating which character encoding is in use. Before an XML processor can @@ -3812,9 +2384,7 @@ or with, any accompanying (external) information. We consider the first case first.</p> <div class="div2"> <div class="diff-add"> -<h3> -<a name="sec-guessing-no-ext-info"></a>F.1 Detection Without External Encoding Information</h3> -</div> +<h3><a name="sec-guessing-no-ext-info"></a>F.1 Detection Without External Encoding Information</h3></div> <p>Because each XML entity <span class="diff-add">not accompanied by external encoding information and </span>not in UTF-8 or UTF-16 <span class="diff-chg">encoding</span> <em>must</em> begin with an XML encoding declaration, in which the first characters must @@ -3822,101 +2392,47 @@ be '<code><?xml</code>', any conforming processor can detect, after two to four octets of input, which of the following cases apply. In reading this list, it may help to know that in UCS-4, '<' is "<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte Order Mark -required of UTF-16 data streams is "<code>#xFEFF</code>". <span class="diff-add">The notation <var>##</var> is used to denote any byte value except <span class="diff-chg">that two consecutive <var>##</var>s cannot be both 00</span>.</span> -</p> +required of UTF-16 data streams is "<code>#xFEFF</code>". <span class="diff-add">The notation <var>##</var> is used to denote any byte value except <span class="diff-chg">that two consecutive <var>##</var>s cannot be both 00</span>.</span></p> <div class="diff-add"><p>With a Byte Order Mark:</p></div> -<div class="diff-add"><table border="1" frame="border"><tbody> -<tr> -<td colspan="1" rowspan="1"><code>00 00 FE -FF</code></td> -<td colspan="1" rowspan="1">UCS-4, big-endian machine (1234 order)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FF -FE 00 00</code></td> -<td colspan="1" rowspan="1">UCS-4, little-endian machine (4321 order)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 00 FF FE</code></td> -<td colspan="1" rowspan="1">UCS-4, unusual octet order (2143)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FE FF 00 00</code></td> -<td colspan="1" rowspan="1">UCS-4, unusual octet order (3412)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FE FF ## ##</code></td> -<td colspan="1" rowspan="1">UTF-16, big-endian</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FF FE ## ##</code></td> -<td colspan="1" rowspan="1">UTF-16, little-endian</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>EF BB BF</code></td> -<td colspan="1" rowspan="1">UTF-8</td> -</tr> -</tbody></table></div> +<div class="diff-add"><table border="1" frame="border"><tbody><tr><td colspan="1" rowspan="1"><code>00 00 FE +FF</code></td><td colspan="1" rowspan="1">UCS-4, big-endian machine (1234 order)</td></tr><tr><td colspan="1" rowspan="1"><code>FF +FE 00 00</code></td><td colspan="1" rowspan="1">UCS-4, little-endian machine (4321 order)</td></tr> +<tr><td colspan="1" rowspan="1"><code>00 00 FF FE</code></td><td colspan="1" rowspan="1">UCS-4, unusual octet order (2143)</td> +</tr><tr><td colspan="1" rowspan="1"><code>FE FF 00 00</code></td><td colspan="1" rowspan="1">UCS-4, unusual octet order (3412)</td> +</tr><tr><td colspan="1" rowspan="1"><code>FE FF ## ##</code></td><td colspan="1" rowspan="1">UTF-16, big-endian</td></tr> +<tr><td colspan="1" rowspan="1"><code>FF FE ## ##</code></td><td colspan="1" rowspan="1">UTF-16, little-endian</td></tr><tr> +<td colspan="1" rowspan="1"><code>EF BB BF</code></td><td colspan="1" rowspan="1">UTF-8</td></tr></tbody></table></div> <div class="diff-add"><p>Without a Byte Order Mark:</p></div> -<div class="diff-add"><table border="1" frame="border"><tbody> -<tr> -<td colspan="1" rowspan="1"><code>00 00 00 3C</code></td> +<div class="diff-add"><table border="1" frame="border"><tbody><tr><td colspan="1" rowspan="1"><code>00 00 00 3C</code></td> <td colspan="1" rowspan="4">UCS-4 or other encoding with a 32-bit code unit and ASCII characters encoded as ASCII values, in respectively big-endian (1234), little-endian (4321) and two unusual byte orders (2143 and 3412). The encoding declaration must be read to determine which of UCS-4 or other supported 32-bit encodings -applies.</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 00 00 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 00 3C 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 3C 00 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 3C 00 3F</code></td> -<td colspan="1" rowspan="1">UTF-16BE or big-endian ISO-10646-UCS-2 +applies.</td></tr><tr><td colspan="1" rowspan="1"><code>3C 00 00 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 00 3C 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 3C 00 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 3C 00 3F</code></td><td colspan="1" rowspan="1">UTF-16BE or big-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in big-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine -which)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 00 3F 00</code></td> -<td colspan="1" rowspan="1">UTF-16LE or little-endian +which)</td></tr><tr><td colspan="1" rowspan="1"><code>3C 00 3F 00</code></td><td colspan="1" rowspan="1">UTF-16LE or little-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in little-endian order and ASCII characters encoded as ASCII values (the encoding declaration -must be read to determine which)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 3F 78 6D</code></td> +must be read to determine which)</td></tr><tr><td colspan="1" rowspan="1"><code>3C 3F 78 6D</code></td> <td colspan="1" rowspan="1">UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding which ensures that the characters of ASCII have their normal positions, width, and values; the actual encoding declaration must be read to detect which of these applies, but since all of these encodings use the same bit patterns for the relevant ASCII characters, -the encoding declaration itself may be read reliably</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>4C -6F A7 94</code></td> -<td colspan="1" rowspan="1">EBCDIC (in some flavor; the full encoding declaration -must be read to tell which code page is in use)</td> -</tr> -<tr> -<td colspan="1" rowspan="1">Other</td> +the encoding declaration itself may be read reliably</td></tr><tr><td colspan="1" rowspan="1"><code>4C +6F A7 94</code></td><td colspan="1" rowspan="1">EBCDIC (in some flavor; the full encoding declaration +must be read to tell which code page is in use)</td></tr><tr><td colspan="1" rowspan="1">Other</td> <td colspan="1" rowspan="1">UTF-8 without an encoding declaration, or else the data stream is mislabeled (lacking a required encoding declaration), corrupt, fragmentary, or enclosed -in a wrapper of some kind</td> -</tr> -</tbody></table></div> -<div class="diff-add"><div class="note"> -<p class="prefix"><b>Note:</b></p> +in a wrapper of some kind</td></tr></tbody></table></div> +<div class="diff-add"><div class="note"><p class="prefix"><b>Note:</b></p> <p>In cases above which do not require reading the encoding declaration to determine the encoding, section 4.3.3 still requires that the encoding declaration, if present, be read and that the encoding name be checked to match the actual @@ -3938,8 +2454,7 @@ even when external sources of information at the operating-system or transport-p level are unreliable. <span class="diff-del">Note that since external parsed entities in UTF-16 may begin with any character, this autodetection does not always work. Also, </span><span class="diff-add">Character encodings such as UTF-7 -that make overloaded usage of ASCII-valued bytes may fail to be reliably detected.</span> -</p> +that make overloaded usage of ASCII-valued bytes may fail to be reliably detected.</span></p> <p>Once the processor has detected the character encoding in use, it can act appropriately, whether by invoking a separate input routine for each case, or by calling the proper conversion function on each character of input.</p> @@ -3951,9 +2466,7 @@ used to label the entity.</p> </div> <div class="div2"> <div class="diff-add"> -<h3> -<a name="sec-guessing-with-ext-info"></a>F.2 Priorities in the Presence of External Encoding Information</h3> -</div> +<h3><a name="sec-guessing-with-ext-info"></a>F.2 Priorities in the Presence of External Encoding Information</h3></div> <p>The second possible case occurs when the XML entity is accompanied by encoding information, as in some file systems and some network protocols. When multiple sources of information are available, their relative priority and the preferred @@ -3961,13 +2474,10 @@ method of handling conflict should be specified as part of the higher-level protocol used to deliver XML. <span class="diff-chg">In particular, please refer to <a href="#rfc2376">[IETF RFC 2376]</a> or its successor, which defines the <code>text/xml</code> and <code>application/xml</code> MIME types and provides some useful guidance. -In the interests of interoperability, however, the following rule is recommended.</span> -</p> +In the interests of interoperability, however, the following rule is recommended.</span></p> <ul> -<li> -<p>If an XML entity is in a file, the Byte-Order Mark and encoding declaration <span class="diff-del">PI </span>are used (if present) to determine the character encoding.<span class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E74">[E74]</a> -All other heuristics and sources of information are solely for error recovery.</span> -</p> +<li><p>If an XML entity is in a file, the Byte-Order Mark and encoding declaration <span class="diff-del">PI </span>are used (if present) to determine the character encoding.<span class="diff-del"><a href="http://www.w3.org/XML/xml-19980210-errata#E74">[E74]</a> +All other heuristics and sources of information are solely for error recovery.</span></p> </li> </ul> <div class="diff-del"><ul> @@ -3987,8 +2497,7 @@ the recommendations of the relevant RFC will supersede these rules.</p></div> </div> <div class="div1"> -<h2> -<a name="sec-xml-wg"></a>G W3C XML Working Group (Non-Normative)</h2> +<h2><a name="sec-xml-wg"></a>G W3C XML Working Group (Non-Normative)</h2> <p>This specification was prepared and approved for publication by the W3C XML Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval. The current and former members @@ -4012,10 +2521,8 @@ Co-editor</i>) </li> <li>Eve Maler, ArborText</li> <li>Tom Magliery, NCSA</li> <li>Murray Maloney<span class="diff-chg">, SoftQuad, Grif -SA, Muzmo and Veo Systems</span> -</li> -<li> -<span class="diff-chg">MURATA Makoto (FAMILY Given)</span>, Fuji +SA, Muzmo and Veo Systems</span></li> +<li><span class="diff-chg">MURATA Makoto (FAMILY Given)</span>, Fuji Xerox Information Systems</li> <li>Joel Nava, Adobe</li> <li>Conleth O'Connell, Vignette @@ -4026,8 +2533,7 @@ Xerox Information Systems</li> </div> <div class="diff-add"><div class="div1"> -<h2> -<a name="sec-core-wg"></a>H W3C XML Core Group (Non-Normative)</h2> +<h2><a name="sec-core-wg"></a>H W3C XML Core Group (Non-Normative)</h2> <p>The second edition of this specification was prepared by the W3C XML Core Working Group (WG). The members of the WG at the time of publication of this edition were:</p> @@ -4068,8 +2574,7 @@ Contact</i>) </li> </div></div> <div class="diff-add"><div class="div1"> -<h2> -<a name="id2675459"></a>I Production Notes (Non-Normative)</h2> +<h2><a name="id2674567"></a>I Production Notes (Non-Normative)</h2> <p>This Second Edition was encoded in the <a href="http://www.w3.org/XML/1998/06/xmlspec-v21.dtd">XMLspec DTD</a> (which has <a href="http://www.w3.org/XML/1998/06/xmlspec-report-v21.htm">documentation</a> available). The HTML versions were produced with a combination of the <a href="http://www.w3.org/XML/1998/06/xmlspec.xsl">xmlspec.xsl</a>, <a href="http://www.w3.org/XML/1998/06/diffspec.xsl">diffspec.xsl</a>, @@ -4077,6 +2582,4 @@ and <a href="http://www.w3.org/XML/1998/06/REC-xml-2e.xsl">REC-xml-2e.xsl</a> XSLT stylesheets. The PDF version was produced with the <a href="http://www.tdb.uu.se/~jan/html2ps.html">html2ps</a> facility and a distiller program.</p> </div></div> -</div> -</body> -</html> +</div></body></html> diff --git a/tests/xmlspec/REC-xml-20001006.html b/tests/xmlspec/REC-xml-20001006.html index ab60d021..ce9bfd3f 100644 --- a/tests/xmlspec/REC-xml-20001006.html +++ b/tests/xmlspec/REC-xml-20001006.html @@ -1,10 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html lang="EN"> -<head> -<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<title>Extensible Markup Language (XML) 1.0 (Second Edition)</title> -<style type="text/css"> +<html lang="EN"><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Extensible Markup Language (XML) 1.0 (Second Edition)</title><style type="text/css"> code { font-family: monospace; } div.constraint, @@ -16,51 +11,28 @@ dt.label { display: run-in; } li p { margin-top: 0.3em; margin-bottom: 0.3em; } - </style> -<link rel="stylesheet" type="text/css" href="W3C-REC.css"> -</head> -<body> + </style><link rel="stylesheet" type="text/css" href="W3C-REC.css"></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> +<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> +<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> -<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"><tbray@textuality.com></a> -</dd> -<dd>Jean Paoli, Microsoft <a href="mailto:jeanpa@microsoft.com"><jeanpa@microsoft.com></a> -</dd> +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> +<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"><tbray@textuality.com></a></dd> +<dd>Jean Paoli, Microsoft <a href="mailto:jeanpa@microsoft.com"><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"><cmsmcq@uic.edu></a> -</dd> +of Illinois at Chicago and Text Encoding Initiative <a href="mailto:cmsmcq@uic.edu"><cmsmcq@uic.edu></a></dd> <dd>Eve Maler, Sun Microsystems, Inc. <a href="mailto:elm@east.sun.com"><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> © 2000 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">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> -<div id="abstract"> +</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2000 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">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><div id="abstract"> <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 id="status"> +</div><div id="status"> <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 @@ -83,29 +55,20 @@ at <a href="http://www.w3.org/XML/xml-19980210-errata">http://www.w3.org/XML/xml 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> +<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> 1.1 <a href="#sec-origin-goals">Origin and Goals</a><br> 1.2 <a href="#sec-terminology">Terminology</a><br>2 <a href="#sec-documents">Documents</a><br> 2.1 <a href="#sec-well-formed">Well-Formed XML Documents</a><br> 2.2 <a href="#charsets">Characters</a><br> 2.3 <a href="#sec-common-syn">Common Syntactic Constructs</a><br> 2.4 <a href="#syntax">Character Data and Markup</a><br> 2.5 <a href="#sec-comments">Comments</a><br> 2.6 <a href="#sec-pi">Processing Instructions</a><br> 2.7 <a href="#sec-cdata-sect">CDATA Sections</a><br> 2.8 <a href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br> 2.9 <a href="#sec-rmd">Standalone Document Declaration</a><br> 2.10 <a href="#sec-white-space">White Space Handling</a><br> 2.11 <a href="#sec-line-ends">End-of-Line Handling</a><br> 2.12 <a href="#sec-lang-tag">Language Identification</a><br>3 <a href="#sec-logical-struct">Logical Structures</a><br> 3.1 <a href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br> 3.2 <a href="#elemdecls">Element Type Declarations</a><br> 3.2.1 <a href="#sec-element-content">Element Content</a><br> 3.2.2 <a href="#sec-mixed-content">Mixed Content</a><br> 3.3 <a href="#attdecls">Attribute-List Declarations</a><br> 3.3.1 <a href="#sec-attribute-types">Attribute Types</a><br> 3.3.2 <a href="#sec-attr-defaults">Attribute Defaults</a><br> 3.3.3 <a href="#AVNormalize">Attribute-Value -Normalization</a><br> 3.4 <a href="#sec-condition-sect">Conditional Sections</a><br>4 <a href="#sec-physical-struct">Physical Structures</a><br> 4.1 <a href="#sec-references">Character and Entity References</a><br> 4.2 <a href="#sec-entity-decl">Entity Declarations</a><br> 4.2.1 <a href="#sec-internal-ent">Internal Entities</a><br> 4.2.2 <a href="#sec-external-ent">External Entities</a><br> 4.3 <a href="#TextEntities">Parsed Entities</a><br> 4.3.1 <a href="#sec-TextDecl">The Text Declaration</a><br> 4.3.2 <a href="#wf-entities">Well-Formed Parsed Entities</a><br> 4.3.3 <a href="#charencoding">Character Encoding in Entities</a><br> 4.4 <a href="#entproc">XML Processor Treatment of Entities and References</a><br> 4.4.1 <a href="#not-recognized">Not Recognized</a><br> 4.4.2 <a href="#included">Included</a><br> 4.4.3 <a href="#include-if-valid">Included If Validating</a><br> 4.4.4 <a href="#forbidden">Forbidden</a><br> 4.4.5 <a href="#inliteral">Included in Literal</a><br> 4.4.6 <a href="#notify">Notify</a><br> 4.4.7 <a href="#bypass">Bypassed</a><br> 4.4.8 <a href="#as-PE">Included as PE</a><br> 4.5 <a href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br> 4.6 <a href="#sec-predefined-ent">Predefined Entities</a><br> 4.7 <a href="#Notations">Notation Declarations</a><br> 4.8 <a href="#sec-doc-entity">Document Entity</a><br>5 <a href="#sec-conformance">Conformance</a><br> 5.1 <a href="#proc-types">Validating and Non-Validating Processors</a><br> 5.2 <a href="#safe-behavior">Using XML Processors</a><br>6 <a href="#sec-notation">Notation</a><br> -</p> -<h3>Appendices</h3> -<p class="toc">A <a href="#sec-bibliography">References</a><br> A.1 <a href="#sec-existing-stds">Normative References</a><br> A.2 <a href="#null">Other References</a><br>B <a href="#CharClasses">Character Classes</a><br>C <a href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br>D <a href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br>E <a href="#determinism">Deterministic Content Models</a> (Non-Normative)<br>F <a href="#sec-guessing">Autodetection -of Character Encodings</a> (Non-Normative)<br> F.1 <a href="#sec-guessing-no-ext-info">Detection Without External Encoding Information</a><br> F.2 <a href="#sec-guessing-with-ext-info">Priorities in the Presence of External Encoding Information</a><br>G <a href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br>H <a href="#sec-core-wg">W3C XML Core Group</a> (Non-Normative)<br>I <a href="#id2675459">Production Notes</a> (Non-Normative)<br> -</p> -</div> -<hr> -<div class="body"> +<h2><a name="contents">Table of Contents</a></h2><p class="toc">1 <a href="#sec-intro">Introduction</a><br> 1.1 <a href="#sec-origin-goals">Origin and Goals</a><br> 1.2 <a href="#sec-terminology">Terminology</a><br>2 <a href="#sec-documents">Documents</a><br> 2.1 <a href="#sec-well-formed">Well-Formed XML Documents</a><br> 2.2 <a href="#charsets">Characters</a><br> 2.3 <a href="#sec-common-syn">Common Syntactic Constructs</a><br> 2.4 <a href="#syntax">Character Data and Markup</a><br> 2.5 <a href="#sec-comments">Comments</a><br> 2.6 <a href="#sec-pi">Processing Instructions</a><br> 2.7 <a href="#sec-cdata-sect">CDATA Sections</a><br> 2.8 <a href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br> 2.9 <a href="#sec-rmd">Standalone Document Declaration</a><br> 2.10 <a href="#sec-white-space">White Space Handling</a><br> 2.11 <a href="#sec-line-ends">End-of-Line Handling</a><br> 2.12 <a href="#sec-lang-tag">Language Identification</a><br>3 <a href="#sec-logical-struct">Logical Structures</a><br> 3.1 <a href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br> 3.2 <a href="#elemdecls">Element Type Declarations</a><br> 3.2.1 <a href="#sec-element-content">Element Content</a><br> 3.2.2 <a href="#sec-mixed-content">Mixed Content</a><br> 3.3 <a href="#attdecls">Attribute-List Declarations</a><br> 3.3.1 <a href="#sec-attribute-types">Attribute Types</a><br> 3.3.2 <a href="#sec-attr-defaults">Attribute Defaults</a><br> 3.3.3 <a href="#AVNormalize">Attribute-Value +Normalization</a><br> 3.4 <a href="#sec-condition-sect">Conditional Sections</a><br>4 <a href="#sec-physical-struct">Physical Structures</a><br> 4.1 <a href="#sec-references">Character and Entity References</a><br> 4.2 <a href="#sec-entity-decl">Entity Declarations</a><br> 4.2.1 <a href="#sec-internal-ent">Internal Entities</a><br> 4.2.2 <a href="#sec-external-ent">External Entities</a><br> 4.3 <a href="#TextEntities">Parsed Entities</a><br> 4.3.1 <a href="#sec-TextDecl">The Text Declaration</a><br> 4.3.2 <a href="#wf-entities">Well-Formed Parsed Entities</a><br> 4.3.3 <a href="#charencoding">Character Encoding in Entities</a><br> 4.4 <a href="#entproc">XML Processor Treatment of Entities and References</a><br> 4.4.1 <a href="#not-recognized">Not Recognized</a><br> 4.4.2 <a href="#included">Included</a><br> 4.4.3 <a href="#include-if-valid">Included If Validating</a><br> 4.4.4 <a href="#forbidden">Forbidden</a><br> 4.4.5 <a href="#inliteral">Included in Literal</a><br> 4.4.6 <a href="#notify">Notify</a><br> 4.4.7 <a href="#bypass">Bypassed</a><br> 4.4.8 <a href="#as-PE">Included as PE</a><br> 4.5 <a href="#intern-replacement">Construction of Internal Entity Replacement Text</a><br> 4.6 <a href="#sec-predefined-ent">Predefined Entities</a><br> 4.7 <a href="#Notations">Notation Declarations</a><br> 4.8 <a href="#sec-doc-entity">Document Entity</a><br>5 <a href="#sec-conformance">Conformance</a><br> 5.1 <a href="#proc-types">Validating and Non-Validating Processors</a><br> 5.2 <a href="#safe-behavior">Using XML Processors</a><br>6 <a href="#sec-notation">Notation</a><br></p> +<h3>Appendices</h3><p class="toc">A <a href="#sec-bibliography">References</a><br> A.1 <a href="#sec-existing-stds">Normative References</a><br> A.2 <a href="#null">Other References</a><br>B <a href="#CharClasses">Character Classes</a><br>C <a href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br>D <a href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br>E <a href="#determinism">Deterministic Content Models</a> (Non-Normative)<br>F <a href="#sec-guessing">Autodetection +of Character Encodings</a> (Non-Normative)<br> F.1 <a href="#sec-guessing-no-ext-info">Detection Without External Encoding Information</a><br> F.2 <a href="#sec-guessing-with-ext-info">Priorities in the Presence of External Encoding Information</a><br>G <a href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br>H <a href="#sec-core-wg">W3C XML Core Group</a> (Non-Normative)<br>I <a href="#id2674567">Production Notes</a> (Non-Normative)<br></p></div><hr><div class="body"> <div class="div1"> -<h2> -<a name="sec-intro"></a>1 Introduction</h2> +<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 @@ -127,8 +90,7 @@ 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> +<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 @@ -141,8 +103,7 @@ the W3C.</p> <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><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> @@ -162,8 +123,7 @@ all text and legal notices remain intact.</p> </div> <div class="div2"> -<h3> -<a name="sec-terminology"></a>1.2 Terminology</h3> +<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> @@ -245,8 +205,7 @@ base of SGML processors which predate the WebSGML Adaptations Annex to ISO 8879. <div class="div1"> -<h2> -<a name="sec-documents"></a>2 Documents</h2> +<h2><a name="sec-documents"></a>2 Documents</h2> <p>[<a name="dt-xml-doc" title="XML Document">Definition</a>: A data object is an <b>XML document</b> if it is <a title="Well-Formed" href="#dt-wellformed">well-formed</a>, as defined in this specification. A well-formed XML document may in addition @@ -262,34 +221,22 @@ markup. The logical and physical structures must nest properly, as described in <a href="#wf-entities"><b>4.3.2 Well-Formed Parsed Entities</b></a>.</p> <div class="div2"> -<h3> -<a name="sec-well-formed"></a>2.1 Well-Formed XML Documents</h3> +<h3><a name="sec-well-formed"></a>2.1 Well-Formed XML Documents</h3> <p>[<a name="dt-wellformed" title="Well-Formed">Definition</a>: A textual object is a <b>well-formed</b> XML document if:]</p> <ol> -<li> -<p>Taken as a whole, it matches the production labeled <a href="#NT-document">document</a>.</p> +<li><p>Taken as a whole, it matches the production labeled <a href="#NT-document">document</a>.</p> </li> -<li> -<p>It meets all the well-formedness constraints given in this specification.</p> +<li><p>It meets all the well-formedness constraints given in this specification.</p> </li> <li><p>Each of the <a title="Text Entity" href="#dt-parsedent">parsed entities</a> which is referenced directly or indirectly within the document is <a title="Well-Formed" href="#dt-wellformed">well-formed</a>.</p></li> </ol> -<h5>Document</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-document"></a>[1] </td> -<td><code>document</code></td> -<td> ::= </td> -<td><code><a href="#NT-prolog">prolog</a> <a href="#NT-element">element</a> <a href="#NT-Misc">Misc</a>*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Document</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-document"></a>[1] </td><td><code>document</code></td><td> ::= </td><td><code><a href="#NT-prolog">prolog</a> <a href="#NT-element">element</a> <a href="#NT-Misc">Misc</a>*</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Matching the <a href="#NT-document">document</a> production implies that:</p> <ol> -<li> -<p>It contains one or more <a title="Element" href="#dt-element">elements</a>.</p> +<li><p>It contains one or more <a title="Element" href="#dt-element">elements</a>.</p> </li> <li><p>[<a name="dt-root" title="Root Element">Definition</a>: There is exactly one element, @@ -309,8 +256,7 @@ a <b>child</b> of <code>P</code>.]</p> </div> <div class="div2"> -<h3> -<a name="charsets"></a>2.2 Characters</h3> +<h3><a name="charsets"></a>2.2 Characters</h3> <p>[<a name="dt-text" title="Text">Definition</a>: A parsed entity contains <b>text</b>, a sequence of <a title="Character" href="#dt-character">characters</a>, which may represent markup or character data.] [<a name="dt-character" title="Character">Definition</a>: A <b>character</b> @@ -326,16 +272,8 @@ The use of "compatibility characters", as defined in section 6.8 of <a href="#Unicode">[Unicode]</a> (see also D21 in section 3.6 of <a href="#Unicode3">[Unicode3]</a>), is discouraged.]</p> -<h5>Character Range</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Char"></a>[2] </td> -<td><code>Char</code></td> -<td> ::= </td> -<td><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</code></td> -<xsltdebug></xsltdebug><td><i>/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */</i></td> -</tr> +<h5>Character Range</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Char"></a>[2] </td><td><code>Char</code></td><td> ::= </td><td><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</code></td><xsltdebug></xsltdebug><td><i>/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */</i></td></tr> </tbody></table> <p>The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors must accept the UTF-8 and UTF-16 @@ -345,23 +283,13 @@ or for bringing other encodings into play, are discussed later, in <a href="#cha </div> <div class="div2"> -<h3> -<a name="sec-common-syn"></a>2.3 Common Syntactic Constructs</h3> +<h3><a name="sec-common-syn"></a>2.3 Common Syntactic Constructs</h3> <p>This section defines some symbols used widely in the grammar.</p> -<p> -<a href="#NT-S">S</a> (white space) consists of one or more space (#x20) +<p><a href="#NT-S">S</a> (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.</p> -<h5>White Space</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-S"></a>[3] </td> -<td><code>S</code></td> -<td> ::= </td> -<td><code>(#x20 | #x9 | #xD | #xA)+</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>White Space</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-S"></a>[3] </td><td><code>S</code></td><td> ::= </td><td><code>(#x20 | #x9 | #xD | #xA)+</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>Characters are classified for convenience as letters, digits, or other characters. A @@ -374,8 +302,7 @@ letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string "<code>xml</code>", or any string which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are reserved for standardization in this or future versions of this specification.</p> -<div class="note"> -<p class="prefix"><b>Note:</b></p> +<div class="note"><p class="prefix"><b>Note:</b></p> <p>The Namespaces in XML Recommendation <a href="#xml-names">[XML Names]</a> assigns a meaning to names containing colon characters. Therefore, authors should not use the @@ -385,50 +312,8 @@ accept the colon as a name character.</p> <p>An <a href="#NT-Nmtoken">Nmtoken</a> (name token) is any mixture of name characters.</p> -<h5>Names and Tokens</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NameChar"></a>[4] </td> -<td><code>NameChar</code></td> -<td> ::= </td> -<td><code><a href="#NT-Letter">Letter</a> | <a href="#NT-Digit">Digit</a> -| '.' | '-' | '_' | ':' | <a href="#NT-CombiningChar">CombiningChar</a> | <a href="#NT-Extender">Extender</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Name"></a>[5] </td> -<td><code>Name</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Letter">Letter</a> | '_' | ':') (<a href="#NT-NameChar">NameChar</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Names"></a>[6] </td> -<td><code>Names</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Name">Name</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Nmtoken"></a>[7] </td> -<td><code>Nmtoken</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-NameChar">NameChar</a>)+</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Nmtokens"></a>[8] </td> -<td><code>Nmtokens</code></td> -<td> ::= </td> -<td><code><a href="#NT-Nmtoken">Nmtoken</a> (<a href="#NT-S">S</a> <a href="#NT-Nmtoken">Nmtoken</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Names and Tokens</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-NameChar"></a>[4] </td><td><code>NameChar</code></td><td> ::= </td><td><code><a href="#NT-Letter">Letter</a> | <a href="#NT-Digit">Digit</a> +| '.' | '-' | '_' | ':' | <a href="#NT-CombiningChar">CombiningChar</a> | <a href="#NT-Extender">Extender</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Name"></a>[5] </td><td><code>Name</code></td><td> ::= </td><td><code>(<a href="#NT-Letter">Letter</a> | '_' | ':') (<a href="#NT-NameChar">NameChar</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Names"></a>[6] </td><td><code>Names</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Name">Name</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Nmtoken"></a>[7] </td><td><code>Nmtoken</code></td><td> ::= </td><td><code>(<a href="#NT-NameChar">NameChar</a>)+</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Nmtokens"></a>[8] </td><td><code>Nmtokens</code></td><td> ::= </td><td><code><a href="#NT-Nmtoken">Nmtoken</a> (<a href="#NT-S">S</a> <a href="#NT-Nmtoken">Nmtoken</a>)*</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. Literals are used for specifying the content of internal entities (<a href="#NT-EntityValue">EntityValue</a>), the values @@ -436,71 +321,12 @@ of attributes (<a href="#NT-AttValue">AttValue</a>), and external identifiers (<a href="#NT-SystemLiteral">SystemLiteral</a>). Note that a <a href="#NT-SystemLiteral">SystemLiteral</a> can be parsed without scanning for markup.</p> -<h5>Literals</h5> -<table class="scrap" summary="Scrap"> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityValue"></a>[9] </td> -<td><code>EntityValue</code></td> -<td> ::= </td> -<td><code>'"' ([^%&"] | <a href="#NT-PEReference">PEReference</a> -| <a href="#NT-Reference">Reference</a>)* '"' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| "'" ([^%&'] | <a href="#NT-PEReference">PEReference</a> | <a href="#NT-Reference">Reference</a>)* "'"</code></td> -</tr> -</tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-AttValue"></a>[10] </td> -<td><code>AttValue</code></td> -<td> ::= </td> -<td><code>'"' ([^<&"] | <a href="#NT-Reference">Reference</a>)* -'"' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| "'" ([^<&'] | <a href="#NT-Reference">Reference</a>)* -"'"</code></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-SystemLiteral"></a>[11] </td> -<td><code>SystemLiteral</code></td> -<td> ::= </td> -<td><code>('"' [^"]* '"') | ("'" [^']* "'") </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PubidLiteral"></a>[12] </td> -<td><code>PubidLiteral</code></td> -<td> ::= </td> -<td><code>'"' <a href="#NT-PubidChar">PubidChar</a>* '"' -| "'" (<a href="#NT-PubidChar">PubidChar</a> - "'")* "'"</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PubidChar"></a>[13] </td> -<td><code>PubidChar</code></td> -<td> ::= </td> -<td><code>#x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> -<div class="note"> -<p class="prefix"><b>Note:</b></p> +<h5>Literals</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EntityValue"></a>[9] </td><td><code>EntityValue</code></td><td> ::= </td><td><code>'"' ([^%&"] | <a href="#NT-PEReference">PEReference</a> +| <a href="#NT-Reference">Reference</a>)* '"' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^%&'] | <a href="#NT-PEReference">PEReference</a> | <a href="#NT-Reference">Reference</a>)* "'"</code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-AttValue"></a>[10] </td><td><code>AttValue</code></td><td> ::= </td><td><code>'"' ([^<&"] | <a href="#NT-Reference">Reference</a>)* +'"' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^<&'] | <a href="#NT-Reference">Reference</a>)* +"'"</code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-SystemLiteral"></a>[11] </td><td><code>SystemLiteral</code></td><td> ::= </td><td><code>('"' [^"]* '"') | ("'" [^']* "'") </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PubidLiteral"></a>[12] </td><td><code>PubidLiteral</code></td><td> ::= </td><td><code>'"' <a href="#NT-PubidChar">PubidChar</a>* '"' +| "'" (<a href="#NT-PubidChar">PubidChar</a> - "'")* "'"</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PubidChar"></a>[13] </td><td><code>PubidChar</code></td><td> ::= </td><td><code>#x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code></td><xsltdebug></xsltdebug></tr></tbody></table> +<div class="note"><p class="prefix"><b>Note:</b></p> <p>Although the <a href="#NT-EntityValue">EntityValue</a> production allows the definition of an entity consisting of a single explicit <code><</code> in the literal @@ -511,10 +337,8 @@ error.</p> </div> <div class="div2"> -<h3> -<a name="syntax"></a>2.4 Character Data and Markup</h3> -<p> -<a title="Text" href="#dt-text">Text</a> consists of intermingled <a title="Character Data" href="#dt-chardata">character data</a> and markup. [<a name="dt-markup" title="Markup">Definition</a>: <b>Markup</b> takes the form of <a title="Start-Tag" href="#dt-stag">start-tags</a>, <a title="End Tag" href="#dt-etag">end-tags</a>, <a title="Empty" href="#dt-empty">empty-element tags</a>, <a title="Entity Reference" href="#dt-entref">entity references</a>, <a title="Character Reference" href="#dt-charref">character +<h3><a name="syntax"></a>2.4 Character Data and Markup</h3> +<p><a title="Text" href="#dt-text">Text</a> consists of intermingled <a title="Character Data" href="#dt-chardata">character data</a> and markup. [<a name="dt-markup" title="Markup">Definition</a>: <b>Markup</b> takes the form of <a title="Start-Tag" href="#dt-stag">start-tags</a>, <a title="End Tag" href="#dt-etag">end-tags</a>, <a title="Empty" href="#dt-empty">empty-element tags</a>, <a title="Entity Reference" href="#dt-entref">entity references</a>, <a title="Character Reference" href="#dt-charref">character references</a>, <a title="Comment" href="#dt-comment">comments</a>, <a title="CDATA Section" href="#dt-cdsection">CDATA section</a> delimiters, <a title="Document Type Declaration" href="#dt-doctype">document type declarations</a>, <a title="Processing instruction" href="#dt-pi">processing instructions</a>, <a href="#NT-XMLDecl">XML declarations</a>, <a href="#NT-TextDecl">text declarations</a>, and any white space that is at the top level of the document entity (that @@ -542,20 +366,11 @@ delimiter, "<code>]]></code>".</p> apostrophe or single-quote character (') may be represented as "<code>&apos;</code>", and the double-quote character (") as "<code>&quot;</code>".</p> -<h5>Character Data</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-CharData"></a>[14] </td> -<td><code>CharData</code></td> -<td> ::= </td> -<td><code>[^<&]* - ([^<&]* ']]>' [^<&]*)</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Character Data</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CharData"></a>[14] </td><td><code>CharData</code></td><td> ::= </td><td><code>[^<&]* - ([^<&]* ']]>' [^<&]*)</code></td><xsltdebug></xsltdebug></tr></tbody></table> </div> <div class="div2"> -<h3> -<a name="sec-comments"></a>2.5 Comments</h3> +<h3><a name="sec-comments"></a>2.5 Comments</h3> <p>[<a name="dt-comment" title="Comment">Definition</a>: <b>Comments</b> may appear anywhere in a document outside other <a title="Markup" href="#dt-markup">markup</a>; in addition, they may appear within the document type declaration at places @@ -566,16 +381,8 @@ compatibility</a>, the string "<code>--</code>" (double-hyphen) must not occur within comments.] Parameter entity references are not recognized within comments.</p> -<h5>Comments</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-Comment"></a>[15] </td> -<td><code>Comment</code></td> -<td> ::= </td> -<td><code>'<!--' ((<a href="#NT-Char">Char</a> - '-') | ('-' -(<a href="#NT-Char">Char</a> - '-')))* '-->'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Comments</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-Comment"></a>[15] </td><td><code>Comment</code></td><td> ::= </td><td><code>'<!--' ((<a href="#NT-Char">Char</a> - '-') | ('-' +(<a href="#NT-Char">Char</a> - '-')))* '-->'</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>An example of a comment:</p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre><!-- declarations for <head> & <body> --></pre></td></tr></table> <p>Note @@ -585,32 +392,13 @@ following example is <em>not</em> well-formed.</p> </div> <div class="div2"> -<h3> -<a name="sec-pi"></a>2.6 Processing Instructions</h3> +<h3><a name="sec-pi"></a>2.6 Processing Instructions</h3> <p>[<a name="dt-pi" title="Processing instruction">Definition</a>: <b>Processing instructions</b> (PIs) allow documents to contain instructions for applications.]</p> -<h5>Processing Instructions</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PI"></a>[16] </td> -<td><code>PI</code></td> -<td> ::= </td> -<td><code>'<?' <a href="#NT-PITarget">PITarget</a> (<a href="#NT-S">S</a> -(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* '?>' <a href="#NT-Char">Char</a>*)))? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PITarget"></a>[17] </td> -<td><code>PITarget</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> - (('X' | 'x') ('M' | -'m') ('L' | 'l'))</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Processing Instructions</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-PI"></a>[16] </td><td><code>PI</code></td><td> ::= </td><td><code>'<?' <a href="#NT-PITarget">PITarget</a> (<a href="#NT-S">S</a> +(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* '?>' <a href="#NT-Char">Char</a>*)))? '?>'</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PITarget"></a>[17] </td><td><code>PITarget</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> - (('X' | 'x') ('M' | +'m') ('L' | 'l'))</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>PIs are not part of the document's <a title="Character Data" href="#dt-chardata">character data</a>, but must be passed through to the application. The PI begins with a target (<a href="#NT-PITarget">PITarget</a>) used to identify the application @@ -622,50 +410,15 @@ entity references are not recognized within processing instructions.</p> </div> <div class="div2"> -<h3> -<a name="sec-cdata-sect"></a>2.7 CDATA Sections</h3> +<h3><a name="sec-cdata-sect"></a>2.7 CDATA Sections</h3> <p>[<a name="dt-cdsection" title="CDATA Section">Definition</a>: <b>CDATA sections</b> may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string "<code><![CDATA[</code>" and end with the string "<code>]]></code>":]</p> -<h5>CDATA Sections</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDSect"></a>[18] </td> -<td><code>CDSect</code></td> -<td> ::= </td> -<td><code><a href="#NT-CDStart">CDStart</a> <a href="#NT-CData">CData</a> <a href="#NT-CDEnd">CDEnd</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDStart"></a>[19] </td> -<td><code>CDStart</code></td> -<td> ::= </td> -<td><code>'<![CDATA['</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CData"></a>[20] </td> -<td><code>CData</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* -']]>' <a href="#NT-Char">Char</a>*)) </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-CDEnd"></a>[21] </td> -<td><code>CDEnd</code></td> -<td> ::= </td> -<td><code>']]>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>CDATA Sections</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CDSect"></a>[18] </td><td><code>CDSect</code></td><td> ::= </td><td><code><a href="#NT-CDStart">CDStart</a> <a href="#NT-CData">CData</a> <a href="#NT-CDEnd">CDEnd</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CDStart"></a>[19] </td><td><code>CDStart</code></td><td> ::= </td><td><code>'<![CDATA['</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CData"></a>[20] </td><td><code>CData</code></td><td> ::= </td><td><code>(<a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* +']]>' <a href="#NT-Char">Char</a>*)) </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-CDEnd"></a>[21] </td><td><code>CDEnd</code></td><td> ::= </td><td><code>']]>'</code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>Within a CDATA section, only the <a href="#NT-CDEnd">CDEnd</a> string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "<code>&lt;</code>" @@ -676,8 +429,7 @@ and "<code></greeting></code>" are recognized as <a title="Chara </div> <div class="div2"> -<h3> -<a name="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration</h3> +<h3><a name="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration</h3> <p>[<a name="dt-xmldecl" title="XML Declaration">Definition</a>: XML documents should begin with an <b>XML declaration</b> which specifies the version of XML being used.] For example, the following is a complete XML document, <a title="Well-Formed" href="#dt-wellformed">well-formed</a> but not <a title="Validity" href="#dt-valid">valid</a>:</p> @@ -705,60 +457,17 @@ expressed in it.]</p> <p>The document type declaration must appear before the first <a title="Element" href="#dt-element">element</a> in the document.</p> -<h5>Prolog</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-prolog"></a>[22] </td> -<td><code>prolog</code></td> -<td> ::= </td> -<td><code><a href="#NT-XMLDecl">XMLDecl</a>? <a href="#NT-Misc">Misc</a>* -(<a href="#NT-doctypedecl">doctypedecl</a> <a href="#NT-Misc">Misc</a>*)?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-XMLDecl"></a>[23] </td> -<td><code>XMLDecl</code></td> -<td> ::= </td> -<td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a> <a href="#NT-EncodingDecl">EncodingDecl</a>? <a href="#NT-SDDecl">SDDecl</a>? <a href="#NT-S">S</a>? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-VersionInfo"></a>[24] </td> -<td><code>VersionInfo</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> 'version' <a href="#NT-Eq">Eq</a> +<h5>Prolog</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-prolog"></a>[22] </td><td><code>prolog</code></td><td> ::= </td><td><code><a href="#NT-XMLDecl">XMLDecl</a>? <a href="#NT-Misc">Misc</a>* +(<a href="#NT-doctypedecl">doctypedecl</a> <a href="#NT-Misc">Misc</a>*)?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-XMLDecl"></a>[23] </td><td><code>XMLDecl</code></td><td> ::= </td><td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a> <a href="#NT-EncodingDecl">EncodingDecl</a>? <a href="#NT-SDDecl">SDDecl</a>? <a href="#NT-S">S</a>? '?>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-VersionInfo"></a>[24] </td><td><code>VersionInfo</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> 'version' <a href="#NT-Eq">Eq</a> ("'" <a href="#NT-VersionNum">VersionNum</a> "'" | '"' <a href="#NT-VersionNum">VersionNum</a> -'"')<i>/* */</i></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Eq"></a>[25] </td> -<td><code>Eq</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a>? '=' <a href="#NT-S">S</a>?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-VersionNum"></a>[26] </td> -<td><code>VersionNum</code></td> -<td> ::= </td> -<td><code>([a-zA-Z0-9_.:] | '-')+</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Misc"></a>[27] </td> -<td><code>Misc</code></td> -<td> ::= </td> -<td><code><a href="#NT-Comment">Comment</a> | <a href="#NT-PI">PI</a> -| <a href="#NT-S">S</a></code></td> -<xsltdebug></xsltdebug> -</tr> +'"')<i>/* */</i></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Eq"></a>[25] </td><td><code>Eq</code></td><td> ::= </td><td><code><a href="#NT-S">S</a>? '=' <a href="#NT-S">S</a>?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-VersionNum"></a>[26] </td><td><code>VersionNum</code></td><td> ::= </td><td><code>([a-zA-Z0-9_.:] | '-')+</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Misc"></a>[27] </td><td><code>Misc</code></td><td> ::= </td><td><code><a href="#NT-Comment">Comment</a> | <a href="#NT-PI">PI</a> +| <a href="#NT-S">S</a></code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>[<a name="dt-doctype" title="Document Type Declaration">Definition</a>: The XML <b>document type declaration</b> contains or points to <a title="markup declaration" href="#dt-markupdecl">markup @@ -775,66 +484,16 @@ entities</a>, as described in the well-formedness and validity constraints below. For further information, see <a href="#sec-physical-struct"><b>4 Physical Structures</b></a>.</p> -<h5>Document Type Definition</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-doctypedecl"></a>[28] </td> -<td><code>doctypedecl</code></td> -<td> ::= </td> -<td><code>'<!DOCTYPE' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> +<h5>Document Type Definition</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-doctypedecl"></a>[28] </td><td><code>doctypedecl</code></td><td> ::= </td><td><code>'<!DOCTYPE' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-ExternalID">ExternalID</a>)? <a href="#NT-S">S</a>? ('[' (<a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-DeclSep">DeclSep</a>)* -']' <a href="#NT-S">S</a>?)? '>'</code></td> -<xsltdebug></xsltdebug><td><a href="#vc-roottype">[VC: Root Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#ExtSubset">[WFC: External -Subset]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-DeclSep"></a>[28a] </td> -<td><code>DeclSep</code></td> -<td> ::= </td> -<td><code><a href="#NT-PEReference">PEReference</a> | <a href="#NT-S">S</a></code></td> -<xsltdebug></xsltdebug><td><a href="#PE-between-Decls">[WFC: PE -Between Declarations]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-markupdecl"></a>[29] </td> -<td><code>markupdecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-elementdecl">elementdecl</a> | <a href="#NT-AttlistDecl">AttlistDecl</a> | <a href="#NT-EntityDecl">EntityDecl</a> -| <a href="#NT-NotationDecl">NotationDecl</a> | <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a> </code></td> -<xsltdebug></xsltdebug><td><a href="#vc-PEinMarkupDecl">[VC: Proper Declaration/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#wfc-PEinInternalSubset">[WFC: PEs in Internal Subset]</a></td> -</tr> +']' <a href="#NT-S">S</a>?)? '>'</code></td><xsltdebug></xsltdebug><td><a href="#vc-roottype">[VC: Root Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#ExtSubset">[WFC: External +Subset]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><i>/* */</i></td></tr> +<tr valign="baseline"><td><a name="NT-DeclSep"></a>[28a] </td><td><code>DeclSep</code></td><td> ::= </td><td><code><a href="#NT-PEReference">PEReference</a> | <a href="#NT-S">S</a></code></td><xsltdebug></xsltdebug><td><a href="#PE-between-Decls">[WFC: PE +Between Declarations]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><i>/* */</i></td></tr> +<tr valign="baseline"><td><a name="NT-markupdecl"></a>[29] </td><td><code>markupdecl</code></td><td> ::= </td><td><code><a href="#NT-elementdecl">elementdecl</a> | <a href="#NT-AttlistDecl">AttlistDecl</a> | <a href="#NT-EntityDecl">EntityDecl</a> +| <a href="#NT-NotationDecl">NotationDecl</a> | <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a> </code></td><xsltdebug></xsltdebug><td><a href="#vc-PEinMarkupDecl">[VC: Proper Declaration/PE Nesting]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#wfc-PEinInternalSubset">[WFC: PEs in Internal Subset]</a></td></tr> </tbody></table> <p>Note that it is possible to construct a well-formed document containing a <a href="#NT-doctypedecl">doctypedecl</a> @@ -850,46 +509,27 @@ subsets and external parameter entities), except in literals, processing instruc comments, and the contents of ignored conditional sections (see <a href="#sec-condition-sect"><b>3.4 Conditional Sections</b></a>). They are also recognized in entity value literals. The use of parameter entities in the internal subset is restricted as described below.</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-roottype"></a><b>Validity constraint: Root Element Type</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="vc-roottype"></a><b>Validity constraint: Root Element Type</b></p><p>The <a href="#NT-Name">Name</a> in the document type declaration must match the element type of the <a title="Root Element" href="#dt-root">root element</a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="vc-PEinMarkupDecl"></a><b>Validity constraint: Proper Declaration/PE Nesting</b> -</p> +<div class="constraint"><p class="prefix"><a name="vc-PEinMarkupDecl"></a><b>Validity constraint: Proper Declaration/PE Nesting</b></p> <p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (<a href="#NT-markupdecl">markupdecl</a> above) is contained in the replacement text for a <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity reference</a>, both must be contained in the same replacement text.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="wfc-PEinInternalSubset"></a><b>Well-formedness constraint: PEs in Internal Subset</b> -</p> -<p>In +<div class="constraint"><p class="prefix"><a name="wfc-PEinInternalSubset"></a><b>Well-formedness constraint: PEs in Internal Subset</b></p><p>In the internal DTD subset, <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity references</a> can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="ExtSubset"></a><b>Well-formedness constraint: External -Subset</b> -</p> -<p>The external subset, if any, must match the production for <a href="#NT-extSubset">extSubset</a>.</p> -</div> -<div class="constraint"> -<p class="prefix"> -<a name="PE-between-Decls"></a><b>Well-formedness constraint: PE -Between Declarations</b> -</p> -<p>The replacement text of a parameter entity reference +<div class="constraint"><p class="prefix"><a name="ExtSubset"></a><b>Well-formedness constraint: External +Subset</b></p><p>The external subset, if any, must match the production for <a href="#NT-extSubset">extSubset</a>.</p> +</div> +<div class="constraint"><p class="prefix"><a name="PE-between-Decls"></a><b>Well-formedness constraint: PE +Between Declarations</b></p><p>The replacement text of a parameter entity reference in a <a href="#NT-DeclSep">DeclSep</a> must match the production <a href="#NT-extSubsetDecl">extSubsetDecl</a>.</p> </div> <p>Like the internal subset, the external subset and any external parameter @@ -900,24 +540,9 @@ the contents of the external subset or of these external parameter entities may conditionally be ignored by using the <a title="conditional section" href="#dt-cond-section">conditional section</a> construct; this is not allowed in the internal subset.</p> -<h5>External Subset</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-extSubset"></a>[30] </td> -<td><code>extSubset</code></td> -<td> ::= </td> -<td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-extSubsetDecl"></a>[31] </td> -<td><code>extSubsetDecl</code></td> -<td> ::= </td> -<td><code>( <a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-conditionalSect">conditionalSect</a> | <a href="#NT-DeclSep">DeclSep</a>)*</code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> +<h5>External Subset</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-extSubset"></a>[30] </td><td><code>extSubset</code></td><td> ::= </td><td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-extSubsetDecl">extSubsetDecl</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-extSubsetDecl"></a>[31] </td><td><code>extSubsetDecl</code></td><td> ::= </td><td><code>( <a href="#NT-markupdecl">markupdecl</a> | <a href="#NT-conditionalSect">conditionalSect</a> | <a href="#NT-DeclSep">DeclSep</a>)*</code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr> </tbody></table> <p>The external subset and external parameter entities also differ from the internal subset in that in them, <a title="Parameter-entity reference" href="#dt-PERef">parameter-entity @@ -941,8 +566,7 @@ subset take precedence over those in the external subset.</p> </div> <div class="div2"> -<h3> -<a name="sec-rmd"></a>2.9 Standalone Document Declaration</h3> +<h3><a name="sec-rmd"></a>2.9 Standalone Document Declaration</h3> <p>Markup declarations can affect the content of the document, as passed from an <a title="XML Processor" href="#dt-xml-proc">XML processor</a> to an application; examples are attribute defaults and entity declarations. The standalone document declaration, @@ -955,17 +579,9 @@ the external subset or in a parameter entity (external or internal, the latter being included because non-validating processors are not required to read them).]</p> -<h5>Standalone Document Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-SDDecl"></a>[32] </td> -<td><code>SDDecl</code></td> -<td> ::= </td> -<td><code> <a href="#NT-S">S</a> 'standalone' <a href="#NT-Eq">Eq</a> -(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </code></td> -<xsltdebug></xsltdebug><td><a href="#vc-check-rmd">[VC: Standalone Document Declaration]</a></td> -</tr> +<h5>Standalone Document Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-SDDecl"></a>[32] </td><td><code>SDDecl</code></td><td> ::= </td><td><code> <a href="#NT-S">S</a> 'standalone' <a href="#NT-Eq">Eq</a> +(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </code></td><xsltdebug></xsltdebug><td><a href="#vc-check-rmd">[VC: Standalone Document Declaration]</a></td></tr> </tbody></table> <p>In a standalone document declaration, the value "yes" indicates that there are no <a title="External Markup Declaration" href="#dt-extmkpdecl">external markup declarations</a> which @@ -981,11 +597,7 @@ standalone document declaration, the value "no" is assumed.</p> <p>Any XML document for which <code>standalone="no"</code> holds can be converted algorithmically to a standalone document, which may be desirable for some network delivery applications.</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-check-rmd"></a><b>Validity constraint: Standalone Document Declaration</b> -</p> -<p>The +<div class="constraint"><p class="prefix"><a name="vc-check-rmd"></a><b>Validity constraint: Standalone Document Declaration</b></p><p>The standalone document declaration must have the value "no" if any external markup declarations contain declarations of:</p> <ul> @@ -1010,8 +622,7 @@ if white space occurs directly within any instance of those types.</p></li> </div> <div class="div2"> -<h3> -<a name="sec-white-space"></a>2.10 White Space Handling</h3> +<h3><a name="sec-white-space"></a>2.10 White Space Handling</h3> <p>In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines) to set apart the markup for greater readability. Such white space is typically @@ -1048,8 +659,7 @@ default value.</p> </div> <div class="div2"> -<h3> -<a name="sec-line-ends"></a>2.11 End-of-Line Handling</h3> +<h3><a name="sec-line-ends"></a>2.11 End-of-Line Handling</h3> <p>XML <a title="Text Entity" href="#dt-parsedent">parsed entities</a> are often stored in computer files which, for editing convenience, are organized into lines. These lines are typically separated by some combination of the characters @@ -1065,8 +675,7 @@ both the two-character sequence #xD #xA and any #xD that is not followed by </div> <div class="div2"> -<h3> -<a name="sec-lang-tag"></a>2.12 Language Identification</h3> +<h3><a name="sec-lang-tag"></a>2.12 Language Identification</h3> <p>In document processing, it is often useful to identify the natural or formal language in which the content is written. A special <a title="Attribute" href="#dt-attr">attribute</a> named <code>xml:lang</code> may be inserted in documents to specify the language @@ -1076,10 +685,8 @@ if it is used. The values of the attribute are language identifiers as defined by <a href="#RFC1766">[IETF RFC 1766]</a>, <cite>Tags for the Identification of Languages</cite>, or its successor on the IETF Standards Track.</p> -<div class="note"> -<p class="prefix"><b>Note:</b></p> -<p> -<a href="#RFC1766">[IETF RFC 1766]</a> tags are constructed from two-letter language codes as defined +<div class="note"><p class="prefix"><b>Note:</b></p> +<p><a href="#RFC1766">[IETF RFC 1766]</a> tags are constructed from two-letter language codes as defined by <a href="#ISO639">[ISO 639]</a>, from two-letter country codes as defined by <a href="#ISO3166">[ISO 3166]</a>, or from language identifiers registered with the Internet Assigned Numbers Authority <a href="#IANA-LANGCODES">[IANA-LANGCODES]</a>. It is expected that the successor to <a href="#RFC1766">[IETF RFC 1766]</a> will introduce three-letter language codes for @@ -1120,8 +727,7 @@ attribute might be declared this way:</p> <div class="div1"> -<h2> -<a name="sec-logical-struct"></a>3 Logical Structures</h2> +<h2><a name="sec-logical-struct"></a>3 Logical Structures</h2> <p>[<a name="dt-element" title="Element">Definition</a>: Each <a title="XML Document" href="#dt-xml-doc">XML document</a> contains one or more <b>elements</b>, the boundaries of which are either delimited by <a title="Start-Tag" href="#dt-stag">start-tags</a> @@ -1132,47 +738,15 @@ identifier" (GI), and may have a set of attribute specifications.] Each attribute specification has a <a title="Attribute Name" href="#dt-attrname">name</a> and a <a title="Attribute Value" href="#dt-attrval">value</a>.</p> -<h5>Element</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-element"></a>[39] </td> -<td><code>element</code></td> -<td> ::= </td> -<td><code><a href="#NT-EmptyElemTag">EmptyElemTag</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| <a href="#NT-STag">STag</a> <a href="#NT-content">content</a> <a href="#NT-ETag">ETag</a></code></td> -<td><a href="#GIMatch">[WFC: Element Type Match]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#elementvalid">[VC: Element Valid]</a></td> -</tr> -</tbody></table> +<h5>Element</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-element"></a>[39] </td><td><code>element</code></td><td> ::= </td><td><code><a href="#NT-EmptyElemTag">EmptyElemTag</a></code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| <a href="#NT-STag">STag</a> <a href="#NT-content">content</a> <a href="#NT-ETag">ETag</a></code></td><td><a href="#GIMatch">[WFC: Element Type Match]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#elementvalid">[VC: Element Valid]</a></td></tr></tbody></table> <p>This specification does not constrain the semantics, use, or (beyond syntax) names of the element types and attributes, except that names beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code> are reserved for standardization in this or future versions of this specification.</p> -<div class="constraint"> -<p class="prefix"> -<a name="GIMatch"></a><b>Well-formedness constraint: Element Type Match</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="GIMatch"></a><b>Well-formedness constraint: Element Type Match</b></p><p>The <a href="#NT-Name">Name</a> in an element's end-tag must match the element type in the start-tag.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="elementvalid"></a><b>Validity constraint: Element Valid</b> -</p> -<p>An element is valid +<div class="constraint"><p class="prefix"><a name="elementvalid"></a><b>Validity constraint: Element Valid</b></p><p>An element is valid if there is a declaration matching <a href="#NT-elementdecl">elementdecl</a> where the <a href="#NT-Name">Name</a> matches the element type, and one of the following holds:</p> @@ -1195,43 +769,13 @@ content model.</p></li> </div> <div class="div2"> -<h3> -<a name="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags</h3> +<h3><a name="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags</h3> <p>[<a name="dt-stag" title="Start-Tag">Definition</a>: The beginning of every non-empty XML element is marked by a <b>start-tag</b>.]</p> -<h5>Start-tag</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-STag"></a>[40] </td> -<td><code>STag</code></td> -<td> ::= </td> -<td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Attribute"></a>[41] </td> -<td><code>Attribute</code></td> -<td> ::= </td> -<td><code><a href="#NT-Name">Name</a> <a href="#NT-Eq">Eq</a> <a href="#NT-AttValue">AttValue</a></code></td> -<xsltdebug></xsltdebug><td><a href="#ValueType">[VC: Attribute Value Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td> -</tr> +<h5>Start-tag</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-STag"></a>[40] </td><td><code>STag</code></td><td> ::= </td><td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr> +<tr valign="baseline"><td><a name="NT-Attribute"></a>[41] </td><td><code>Attribute</code></td><td> ::= </td><td><code><a href="#NT-Name">Name</a> <a href="#NT-Eq">Eq</a> <a href="#NT-AttValue">AttValue</a></code></td><xsltdebug></xsltdebug><td><a href="#ValueType">[VC: Attribute Value Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td></tr> </tbody></table> <p>The <a href="#NT-Name">Name</a> in the start- and end-tags gives the element's <b>type</b>. [<a name="dt-attr" title="Attribute">Definition</a>: The <a href="#NT-Name">Name</a>-<a href="#NT-AttValue">AttValue</a> pairs are referred to as the <b>attribute specifications</b> of the @@ -1240,32 +784,17 @@ and [<a name="dt-attrval" title="Attribute Value">Definition</a>: the content of delimiters) as the <b>attribute value</b>.]Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.</p> -<div class="constraint"> -<p class="prefix"> -<a name="uniqattspec"></a><b>Well-formedness constraint: Unique Att Spec</b> -</p> -<p>No attribute name +<div class="constraint"><p class="prefix"><a name="uniqattspec"></a><b>Well-formedness constraint: Unique Att Spec</b></p><p>No attribute name may appear more than once in the same start-tag or empty-element tag.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="ValueType"></a><b>Validity constraint: Attribute Value Type</b> -</p> -<p>The attribute must +<div class="constraint"><p class="prefix"><a name="ValueType"></a><b>Validity constraint: Attribute Value Type</b></p><p>The attribute must have been declared; the value must be of the type declared for it. (For attribute types, see <a href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.)</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="NoExternalRefs"></a><b>Well-formedness constraint: No External Entity References</b> -</p> -<p>Attribute +<div class="constraint"><p class="prefix"><a name="NoExternalRefs"></a><b>Well-formedness constraint: No External Entity References</b></p><p>Attribute values cannot contain direct or indirect entity references to external entities.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="CleanAttrVals"></a><b>Well-formedness constraint: No <code><</code> in Attribute Values</b> -</p> +<div class="constraint"><p class="prefix"><a name="CleanAttrVals"></a><b>Well-formedness constraint: No <code><</code> in Attribute Values</b></p> <p>The <a title="Replacement Text" href="#dt-repltext">replacement text</a> of any entity referred to directly or indirectly in an attribute value must not contain a <code><</code>.</p> </div> @@ -1275,35 +804,19 @@ referred to directly or indirectly in an attribute value must not contain a <cod with a start-tag must be marked by an <b>end-tag</b> containing a name that echoes the element's type as given in the start-tag:]</p> -<h5>End-tag</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-ETag"></a>[42] </td> -<td><code>ETag</code></td> -<td> ::= </td> -<td><code>'</' <a href="#NT-Name">Name</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>End-tag</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-ETag"></a>[42] </td><td><code>ETag</code></td><td> ::= </td><td><code>'</' <a href="#NT-Name">Name</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>An example of an end-tag:</p> <table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre></termdef></pre></td></tr></table> <p>[<a name="dt-content" title="Content">Definition</a>: The <a title="Text" href="#dt-text">text</a> between the start-tag and end-tag is called the element's <b>content</b>:]</p> -<h5>Content of Elements</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-content"></a>[43] </td> -<td><code>content</code></td> -<td> ::= </td> -<td><code><a href="#NT-CharData">CharData</a>? ((<a href="#NT-element">element</a> +<h5>Content of Elements</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-content"></a>[43] </td><td><code>content</code></td><td> ::= </td><td><code><a href="#NT-CharData">CharData</a>? ((<a href="#NT-element">element</a> | <a href="#NT-Reference">Reference</a> | <a href="#NT-CDSect">CDSect</a> -| <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a>) <a href="#NT-CharData">CharData</a>?)*</code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> +| <a href="#NT-PI">PI</a> | <a href="#NT-Comment">Comment</a>) <a href="#NT-CharData">CharData</a>?)*</code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr> </tbody></table> <p>[<a name="dt-empty" title="Empty">Definition</a>: An element with no content is said to be <b>empty</b>.] The representation @@ -1311,16 +824,8 @@ of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. [<a name="dt-eetag" title="empty-element tag">Definition</a>: An <b>empty-element tag</b> takes a special form:]</p> -<h5>Tags for Empty Elements</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-EmptyElemTag"></a>[44] </td> -<td><code>EmptyElemTag</code></td> -<td> ::= </td> -<td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '/>'</code></td> -<xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td> -</tr> +<h5>Tags for Empty Elements</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-EmptyElemTag"></a>[44] </td><td><code>EmptyElemTag</code></td><td> ::= </td><td><code>'<' <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a> <a href="#NT-Attribute">Attribute</a>)* <a href="#NT-S">S</a>? '/>'</code></td><xsltdebug></xsltdebug><td><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr> </tbody></table> <p>Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword <b>EMPTY</b>. <a title="For interoperability" href="#dt-interop">For @@ -1335,8 +840,7 @@ EMPTY.</p> </div> <div class="div2"> -<h3> -<a name="elemdecls"></a>3.2 Element Type Declarations</h3> +<h3><a name="elemdecls"></a>3.2 Element Type Declarations</h3> <p>The <a title="Element" href="#dt-element">element</a> structure of an <a title="XML Document" href="#dt-xml-doc">XML document</a> may, for <a title="Validity" href="#dt-valid">validation</a> purposes, be constrained using element type and attribute-list declarations. An element type declaration constrains the element's <a title="Content" href="#dt-content">content</a>.</p> @@ -1347,33 +851,14 @@ element type for which no declaration is provided, but this is not an error.</p> <p>[<a name="dt-eldecl" title="Element Type declaration">Definition</a>: An <b>element type declaration</b> takes the form:]</p> -<h5>Element Type Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-elementdecl"></a>[45] </td> -<td><code>elementdecl</code></td> -<td> ::= </td> -<td><code>'<!ELEMENT' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-contentspec">contentspec</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug><td><a href="#EDUnique">[VC: Unique Element Type Declaration]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-contentspec"></a>[46] </td> -<td><code>contentspec</code></td> -<td> ::= </td> -<td><code>'EMPTY' | 'ANY' | <a href="#NT-Mixed">Mixed</a> -| <a href="#NT-children">children</a> </code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Element Type Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-elementdecl"></a>[45] </td><td><code>elementdecl</code></td><td> ::= </td><td><code>'<!ELEMENT' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-contentspec">contentspec</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug><td><a href="#EDUnique">[VC: Unique Element Type Declaration]</a></td></tr> +<tr valign="baseline"><td><a name="NT-contentspec"></a>[46] </td><td><code>contentspec</code></td><td> ::= </td><td><code>'EMPTY' | 'ANY' | <a href="#NT-Mixed">Mixed</a> +| <a href="#NT-children">children</a> </code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>where the <a href="#NT-Name">Name</a> gives the element type being declared.</p> -<div class="constraint"> -<p class="prefix"> -<a name="EDUnique"></a><b>Validity constraint: Unique Element Type Declaration</b> -</p> -<p>No element +<div class="constraint"><p class="prefix"><a name="EDUnique"></a><b>Validity constraint: Unique Element Type Declaration</b></p><p>No element type may be declared more than once.</p> </div> <p>Examples of element type declarations:</p> @@ -1383,8 +868,7 @@ type may be declared more than once.</p> <!ELEMENT container ANY></pre></td></tr></table> <div class="div3"> -<h4> -<a name="sec-element-content"></a>3.2.1 Element Content</h4> +<h4><a name="sec-element-content"></a>3.2.1 Element Content</h4> <p>[<a name="dt-elemcontent" title="Element content">Definition</a>: An element <a title="Start-Tag" href="#dt-stag">type</a> has <b>element content</b> when elements of that type must contain only <a title="Parent/Child" href="#dt-parentchild">child</a> elements (no character data), optionally separated by white space (characters @@ -1395,63 +879,13 @@ The grammar is built on content particles (<a href="#NT-cp">cp</a>s), which consist of names, choice lists of content particles, or sequence lists of content particles:</p> -<h5>Element-content Models</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-children"></a>[47] </td> -<td><code>children</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-choice">choice</a> | <a href="#NT-seq">seq</a>) -('?' | '*' | '+')?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-cp"></a>[48] </td> -<td><code>cp</code></td> -<td> ::= </td> -<td><code>(<a href="#NT-Name">Name</a> | <a href="#NT-choice">choice</a> -| <a href="#NT-seq">seq</a>) ('?' | '*' | '+')?</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-choice"></a>[49] </td> -<td><code>choice</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )+ <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-seq"></a>[50] </td> -<td><code>seq</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? ',' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )* <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> +<h5>Element-content Models</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-children"></a>[47] </td><td><code>children</code></td><td> ::= </td><td><code>(<a href="#NT-choice">choice</a> | <a href="#NT-seq">seq</a>) +('?' | '*' | '+')?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-cp"></a>[48] </td><td><code>cp</code></td><td> ::= </td><td><code>(<a href="#NT-Name">Name</a> | <a href="#NT-choice">choice</a> +| <a href="#NT-seq">seq</a>) ('?' | '*' | '+')?</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-choice"></a>[49] </td><td><code>choice</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )+ <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><i>/* */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr> +<tr valign="baseline"><td><a name="NT-seq"></a>[50] </td><td><code>seq</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> ( <a href="#NT-S">S</a>? ',' <a href="#NT-S">S</a>? <a href="#NT-cp">cp</a> )* <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr> </tbody></table> <p>where each <a href="#NT-Name">Name</a> is the type of an element which may appear as a <a title="Parent/Child" href="#dt-parentchild">child</a>. Any content @@ -1473,17 +907,12 @@ match more than one occurrence of an element type in the content model. For more information, see <a href="#determinism"><b>E Deterministic Content Models</b></a>.</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-PEinGroup"></a><b>Validity constraint: Proper Group/PE Nesting</b> -</p> -<p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with parenthesized +<div class="constraint"><p class="prefix"><a name="vc-PEinGroup"></a><b>Validity constraint: Proper Group/PE Nesting</b></p><p>Parameter-entity <a title="Replacement Text" href="#dt-repltext">replacement text</a> must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or <a href="#NT-Mixed">Mixed</a> construct is contained in the replacement text for a <a title="Parameter-entity reference" href="#dt-PERef">parameter entity</a>, both must be contained in the same replacement text.</p> -<p> -<a title="For interoperability" href="#dt-interop">For interoperability</a>, if a parameter-entity reference +<p><a title="For interoperability" href="#dt-interop">For interoperability</a>, if a parameter-entity reference appears in a <a href="#NT-choice">choice</a>, <a href="#NT-seq">seq</a>, or <a href="#NT-Mixed">Mixed</a> construct, its replacement text should contain at least one non-blank character, and neither the first nor last non-blank character of the replacement text should be a connector (<code>|</code> or <code>,</code>).</p> @@ -1495,50 +924,23 @@ of the replacement text should be a connector (<code>|</code> or <code>,</code>) </div> <div class="div3"> -<h4> -<a name="sec-mixed-content"></a>3.2.2 Mixed Content</h4> +<h4><a name="sec-mixed-content"></a>3.2.2 Mixed Content</h4> <p>[<a name="dt-mixed" title="Mixed Content">Definition</a>: An element <a title="Start-Tag" href="#dt-stag">type</a> has <b>mixed content</b> when elements of that type may contain character data, optionally interspersed with <a title="Parent/Child" href="#dt-parentchild">child</a> elements.] In this case, the types of the child elements may be constrained, but not their order or their number of occurrences:</p> -<h5>Mixed-content Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Mixed"></a>[51] </td> -<td><code>Mixed</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? '#PCDATA' (<a href="#NT-S">S</a>? +<h5>Mixed-content Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Mixed"></a>[51] </td><td><code>Mixed</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? '#PCDATA' (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? -')*' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| '(' <a href="#NT-S">S</a>? '#PCDATA' <a href="#NT-S">S</a>? ')' </code></td> -<td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-MixedChildrenUnique">[VC: No Duplicate Types]</a></td> -</tr> +')*' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| '(' <a href="#NT-S">S</a>? '#PCDATA' <a href="#NT-S">S</a>? ')' </code></td><td><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-MixedChildrenUnique">[VC: No Duplicate Types]</a></td></tr> </tbody></table> <p>where the <a href="#NT-Name">Name</a>s give the types of elements that may appear as children. The keyword <b>#PCDATA</b> derives historically from the term "parsed character data."</p> -<div class="constraint"> -<p class="prefix"> -<a name="vc-MixedChildrenUnique"></a><b>Validity constraint: No Duplicate Types</b> -</p> -<p>The +<div class="constraint"><p class="prefix"><a name="vc-MixedChildrenUnique"></a><b>Validity constraint: No Duplicate Types</b></p><p>The same name must not appear more than once in a single mixed-content declaration.</p> </div> <p>Examples of mixed content declarations:</p> @@ -1549,17 +951,14 @@ same name must not appear more than once in a single mixed-content declaration.< </div> <div class="div2"> -<h3> -<a name="attdecls"></a>3.3 Attribute-List Declarations</h3> -<p> -<a title="Attribute" href="#dt-attr">Attributes</a> are used to associate name-value +<h3><a name="attdecls"></a>3.3 Attribute-List Declarations</h3> +<p><a title="Attribute" href="#dt-attr">Attributes</a> are used to associate name-value pairs with <a title="Element" href="#dt-element">elements</a>. Attribute specifications may appear only within <a title="Start-Tag" href="#dt-stag">start-tags</a> and <a title="empty-element tag" href="#dt-eetag">empty-element tags</a>; thus, the productions used to recognize them appear in <a href="#sec-starttags"><b>3.1 Start-Tags, End-Tags, and Empty-Element Tags</b></a>. Attribute-list declarations may be used:</p> <ul> -<li> -<p>To define the set of attributes pertaining to a given element type.</p> +<li><p>To define the set of attributes pertaining to a given element type.</p> </li> <li><p>To establish type constraints for these attributes.</p></li> <li><p>To provide <a title="Attribute Default" href="#dt-default">default values</a> for @@ -1569,25 +968,7 @@ attributes.</p></li> declarations</b> specify the name, data type, and default value (if any) of each attribute associated with a given element type:]</p> -<h5>Attribute-list Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-AttlistDecl"></a>[52] </td> -<td><code>AttlistDecl</code></td> -<td> ::= </td> -<td><code>'<!ATTLIST' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-AttDef">AttDef</a>* <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-AttDef"></a>[53] </td> -<td><code>AttDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-AttType">AttType</a> <a href="#NT-S">S</a> <a href="#NT-DefaultDecl">DefaultDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> +<h5>Attribute-list Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-AttlistDecl"></a>[52] </td><td><code>AttlistDecl</code></td><td> ::= </td><td><code>'<!ATTLIST' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-AttDef">AttDef</a>* <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-AttDef"></a>[53] </td><td><code>AttDef</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-AttType">AttType</a> <a href="#NT-S">S</a> <a href="#NT-DefaultDecl">DefaultDecl</a></code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>The <a href="#NT-Name">Name</a> in the <a href="#NT-AttlistDecl">AttlistDecl</a> rule is the type of an element. At user option, an XML processor may issue a warning if attributes are declared for an element type not itself declared, @@ -1606,145 +987,42 @@ for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error.</p> <div class="div3"> -<h4> -<a name="sec-attribute-types"></a>3.3.1 Attribute Types</h4> +<h4><a name="sec-attribute-types"></a>3.3.1 Attribute Types</h4> <p>XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints. The validity constraints noted in the grammar are applied after the attribute value has been normalized as described in <a href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.</p> -<h5>Attribute Types</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-AttType"></a>[54] </td> -<td><code>AttType</code></td> -<td> ::= </td> -<td><code><a href="#NT-StringType">StringType</a> | <a href="#NT-TokenizedType">TokenizedType</a> -| <a href="#NT-EnumeratedType">EnumeratedType</a> </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-StringType"></a>[55] </td> -<td><code>StringType</code></td> -<td> ::= </td> -<td><code>'CDATA'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-TokenizedType"></a>[56] </td> -<td><code>TokenizedType</code></td> -<td> ::= </td> -<td><code>'ID'</code></td> -<xsltdebug></xsltdebug><td><a href="#id">[VC: ID]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#one-id-per-el">[VC: One ID per Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#id-default">[VC: ID Attribute Default]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'IDREF'</code></td> -<td><a href="#idref">[VC: IDREF]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'IDREFS'</code></td> -<td><a href="#idref">[VC: IDREF]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'ENTITY'</code></td> -<td><a href="#entname">[VC: Entity Name]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'ENTITIES'</code></td> -<td><a href="#entname">[VC: Entity Name]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'NMTOKEN'</code></td> -<td><a href="#nmtok">[VC: Name Token]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'NMTOKENS'</code></td> -<td><a href="#nmtok">[VC: Name Token]</a></td> -</tr> +<h5>Attribute Types</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-AttType"></a>[54] </td><td><code>AttType</code></td><td> ::= </td><td><code><a href="#NT-StringType">StringType</a> | <a href="#NT-TokenizedType">TokenizedType</a> +| <a href="#NT-EnumeratedType">EnumeratedType</a> </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-StringType"></a>[55] </td><td><code>StringType</code></td><td> ::= </td><td><code>'CDATA'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-TokenizedType"></a>[56] </td><td><code>TokenizedType</code></td><td> ::= </td><td><code>'ID'</code></td><xsltdebug></xsltdebug><td><a href="#id">[VC: ID]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#one-id-per-el">[VC: One ID per Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#id-default">[VC: ID Attribute Default]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREF'</code></td><td><a href="#idref">[VC: IDREF]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREFS'</code></td><td><a href="#idref">[VC: IDREF]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITY'</code></td><td><a href="#entname">[VC: Entity Name]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITIES'</code></td><td><a href="#entname">[VC: Entity Name]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKEN'</code></td><td><a href="#nmtok">[VC: Name Token]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKENS'</code></td><td><a href="#nmtok">[VC: Name Token]</a></td></tr> </tbody></table> -<div class="constraint"> -<p class="prefix"> -<a name="id"></a><b>Validity constraint: ID</b> -</p> -<p>Values of type <b>ID</b> must match the <a href="#NT-Name">Name</a> production. A name must not appear more than once +<div class="constraint"><p class="prefix"><a name="id"></a><b>Validity constraint: ID</b></p><p>Values of type <b>ID</b> must match the <a href="#NT-Name">Name</a> production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="one-id-per-el"></a><b>Validity constraint: One ID per Element Type</b> -</p> -<p>No element +<div class="constraint"><p class="prefix"><a name="one-id-per-el"></a><b>Validity constraint: One ID per Element Type</b></p><p>No element type may have more than one ID attribute specified.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="id-default"></a><b>Validity constraint: ID Attribute Default</b> -</p> -<p>An ID attribute +<div class="constraint"><p class="prefix"><a name="id-default"></a><b>Validity constraint: ID Attribute Default</b></p><p>An ID attribute must have a declared default of <b>#IMPLIED</b> or <b>#REQUIRED</b>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="idref"></a><b>Validity constraint: IDREF</b> -</p> -<p>Values of type <b>IDREF</b> must +<div class="constraint"><p class="prefix"><a name="idref"></a><b>Validity constraint: IDREF</b></p><p>Values of type <b>IDREF</b> must match the <a href="#NT-Name">Name</a> production, and values of type <b>IDREFS</b> must match <a href="#NT-Names">Names</a>; each <a href="#NT-Name">Name</a> must match the value of an ID attribute on some element in the XML document; i.e. <b>IDREF</b> values must match the value of some ID attribute.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="entname"></a><b>Validity constraint: Entity Name</b> -</p> -<p>Values of type <b>ENTITY</b> +<div class="constraint"><p class="prefix"><a name="entname"></a><b>Validity constraint: Entity Name</b></p><p>Values of type <b>ENTITY</b> must match the <a href="#NT-Name">Name</a> production, values of type <b>ENTITIES</b> must match <a href="#NT-Names">Names</a>; each <a href="#NT-Name">Name</a> must match the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a> declared in the <a title="Document Type Declaration" href="#dt-doctype">DTD</a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="nmtok"></a><b>Validity constraint: Name Token</b> -</p> -<p>Values of type <b>NMTOKEN</b> +<div class="constraint"><p class="prefix"><a name="nmtok"></a><b>Validity constraint: Name Token</b></p><p>Values of type <b>NMTOKEN</b> must match the <a href="#NT-Nmtoken">Nmtoken</a> production; values of type <b>NMTOKENS</b> must match <a title="" href="#NT-Nmtokens">Nmtokens</a>.</p> </div> @@ -1752,140 +1030,43 @@ must match <a title="" href="#NT-Nmtokens">Nmtokens</a>.</p> <p>[<a name="dt-enumerated" title="Enumerated Attribute Values">Definition</a>: <b>Enumerated attributes</b> can take one of a list of values provided in the declaration]. There are two kinds of enumerated types:</p> -<h5>Enumerated Attribute Types</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EnumeratedType"></a>[57] </td> -<td><code>EnumeratedType</code></td> -<td> ::= </td> -<td><code><a href="#NT-NotationType">NotationType</a> -| <a href="#NT-Enumeration">Enumeration</a> </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-NotationType"></a>[58] </td> -<td><code>NotationType</code></td> -<td> ::= </td> -<td><code>'NOTATION' <a href="#NT-S">S</a> '(' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? ')' </code></td> -<xsltdebug></xsltdebug><td><a href="#notatn">[VC: Notation Attributes]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#OneNotationPer">[VC: One -Notation Per Element Type]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#NoNotationEmpty">[VC: No -Notation on Empty Element]</a></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Enumeration"></a>[59] </td> -<td><code>Enumeration</code></td> -<td> ::= </td> -<td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a> -(<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a>)* <a href="#NT-S">S</a>? ')'</code></td> -<xsltdebug></xsltdebug><td><a href="#enum">[VC: Enumeration]</a></td> -</tr></tbody> -</table> +<h5>Enumerated Attribute Types</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EnumeratedType"></a>[57] </td><td><code>EnumeratedType</code></td><td> ::= </td><td><code><a href="#NT-NotationType">NotationType</a> +| <a href="#NT-Enumeration">Enumeration</a> </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-NotationType"></a>[58] </td><td><code>NotationType</code></td><td> ::= </td><td><code>'NOTATION' <a href="#NT-S">S</a> '(' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a> (<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Name">Name</a>)* <a href="#NT-S">S</a>? ')' </code></td><xsltdebug></xsltdebug><td><a href="#notatn">[VC: Notation Attributes]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#OneNotationPer">[VC: One +Notation Per Element Type]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoNotationEmpty">[VC: No +Notation on Empty Element]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-Enumeration"></a>[59] </td><td><code>Enumeration</code></td><td> ::= </td><td><code>'(' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a> +(<a href="#NT-S">S</a>? '|' <a href="#NT-S">S</a>? <a href="#NT-Nmtoken">Nmtoken</a>)* <a href="#NT-S">S</a>? ')'</code></td><xsltdebug></xsltdebug><td><a href="#enum">[VC: Enumeration]</a></td></tr></tbody></table> <p>A <b>NOTATION</b> attribute identifies a <a title="Notation" href="#dt-notation">notation</a>, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached.</p> -<div class="constraint"> -<p class="prefix"> -<a name="notatn"></a><b>Validity constraint: Notation Attributes</b> -</p> -<p>Values of this type +<div class="constraint"><p class="prefix"><a name="notatn"></a><b>Validity constraint: Notation Attributes</b></p><p>Values of this type must match one of the <a href="#Notations"><cite>notation</cite></a> names included in the declaration; all notation names in the declaration must be declared.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="OneNotationPer"></a><b>Validity constraint: One -Notation Per Element Type</b> -</p> -<p>No element type may have more than one <b>NOTATION</b> +<div class="constraint"><p class="prefix"><a name="OneNotationPer"></a><b>Validity constraint: One +Notation Per Element Type</b></p><p>No element type may have more than one <b>NOTATION</b> attribute specified.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="NoNotationEmpty"></a><b>Validity constraint: No -Notation on Empty Element</b> -</p> -<p> -<a title="For Compatibility" href="#dt-compat">For compatibility</a>, +<div class="constraint"><p class="prefix"><a name="NoNotationEmpty"></a><b>Validity constraint: No +Notation on Empty Element</b></p><p><a title="For Compatibility" href="#dt-compat">For compatibility</a>, an attribute of type <b>NOTATION</b> must not be declared on an element declared <b>EMPTY</b>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="enum"></a><b>Validity constraint: Enumeration</b> -</p> -<p>Values of this type must match +<div class="constraint"><p class="prefix"><a name="enum"></a><b>Validity constraint: Enumeration</b></p><p>Values of this type must match one of the <a href="#NT-Nmtoken">Nmtoken</a> tokens in the declaration.</p> </div> -<p> -<a title="For interoperability" href="#dt-interop">For interoperability,</a> the same <a href="#NT-Nmtoken">Nmtoken</a> should not occur more than once in the enumerated +<p><a title="For interoperability" href="#dt-interop">For interoperability,</a> the same <a href="#NT-Nmtoken">Nmtoken</a> should not occur more than once in the enumerated attribute types of a single element type.</p> </div> <div class="div3"> -<h4> -<a name="sec-attr-defaults"></a>3.3.2 Attribute Defaults</h4> +<h4><a name="sec-attr-defaults"></a>3.3.2 Attribute Defaults</h4> <p>An <a title="Attribute-List Declaration" href="#dt-attdecl">attribute declaration</a> provides information on whether the attribute's presence is required, and if not, how an XML processor should react if a declared attribute is absent in a document.</p> -<h5>Attribute Defaults</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-DefaultDecl"></a>[60] </td> -<td><code>DefaultDecl</code></td> -<td> ::= </td> -<td><code>'#REQUIRED' | '#IMPLIED' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| (('#FIXED' S)? <a href="#NT-AttValue">AttValue</a>)</code></td> -<td><a href="#RequiredAttr">[VC: Required Attribute]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#defattrvalid">[VC: Attribute Default Legal]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#FixedAttr">[VC: Fixed Attribute Default]</a></td> -</tr> +<h5>Attribute Defaults</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-DefaultDecl"></a>[60] </td><td><code>DefaultDecl</code></td><td> ::= </td><td><code>'#REQUIRED' | '#IMPLIED' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| (('#FIXED' S)? <a href="#NT-AttValue">AttValue</a>)</code></td><td><a href="#RequiredAttr">[VC: Required Attribute]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#defattrvalid">[VC: Attribute Default Legal]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#FixedAttr">[VC: Fixed Attribute Default]</a></td></tr> </tbody></table> <p>In an attribute declaration, <b>#REQUIRED</b> means that the attribute must always be provided, <b>#IMPLIED</b> that no default value is provided. [<a name="dt-default" title="Attribute Default">Definition</a>: If @@ -1895,27 +1076,15 @@ value; the <b>#FIXED</b> keyword states that the attribute must always have the default value. If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.]</p> -<div class="constraint"> -<p class="prefix"> -<a name="RequiredAttr"></a><b>Validity constraint: Required Attribute</b> -</p> -<p>If the default +<div class="constraint"><p class="prefix"><a name="RequiredAttr"></a><b>Validity constraint: Required Attribute</b></p><p>If the default declaration is the keyword <b>#REQUIRED</b>, then the attribute must be specified for all elements of the type in the attribute-list declaration.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="defattrvalid"></a><b>Validity constraint: Attribute Default Legal</b> -</p> -<p>The declared +<div class="constraint"><p class="prefix"><a name="defattrvalid"></a><b>Validity constraint: Attribute Default Legal</b></p><p>The declared default value must meet the lexical constraints of the declared attribute type.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="FixedAttr"></a><b>Validity constraint: Fixed Attribute Default</b> -</p> -<p>If an attribute +<div class="constraint"><p class="prefix"><a name="FixedAttr"></a><b>Validity constraint: Fixed Attribute Default</b></p><p>If an attribute has a default value declared with the <b>#FIXED</b> keyword, instances of that attribute must match the default value.</p> </div> @@ -1930,8 +1099,7 @@ that attribute must match the default value.</p> </div> <div class="div3"> -<h4> -<a name="AVNormalize"></a>3.3.3 Attribute-Value +<h4><a name="AVNormalize"></a>3.3.3 Attribute-Value Normalization</h4> <p>Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize the attribute value by applying @@ -1941,11 +1109,9 @@ to the application is the same as that produced by the algorithm.</p> <li><p>All line breaks must have been normalized on input to #xA as described in <a href="#sec-line-ends"><b>2.11 End-of-Line Handling</b></a>, so the rest of this algorithm operates on text normalized in this way.</p></li> -<li> -<p>Begin with a normalized value consisting of the empty string.</p> +<li><p>Begin with a normalized value consisting of the empty string.</p> </li> -<li> -<p>For each character, entity reference, or character reference in the +<li><p>For each character, entity reference, or character reference in the unnormalized attribute value, beginning with the first and continuing to the last, do the following:</p> <ul> @@ -1955,8 +1121,7 @@ normalized value.</p></li> to the replacement text of the entity.</p></li> <li><p>For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value.</p></li> -<li> -<p>For another character, append the character to the normalized value.</p> +<li><p>For another character, append the character to the normalized value.</p> </li> </ul> </li> @@ -1986,116 +1151,42 @@ declarations:</p> to the character sequences of the middle column if the attribute <code>a</code> is declared <b>NMTOKENS</b> and to those of the right columns if <code>a</code> is declared <b>CDATA</b>.</p> -<table border="1" frame="border"> -<thead><tr> -<th colspan="1" rowspan="1">Attribute specification</th> -<th colspan="1" rowspan="1">a is NMTOKENS</th> -<th colspan="1" rowspan="1">a is CDATA</th> -</tr></thead> -<tbody> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a=" - -xyz"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>x y z</code></td> -<td colspan="1" rowspan="1"><code>#x20 #x20 x y z</code></td> -</tr> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a="&d;&d;A&a;&a;B&da;"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>A -#x20 B</code></td> -<td colspan="1" rowspan="1"><code>#x20 #x20 A #x20 #x20 B #x20 #x20</code></td> -</tr> -<tr> -<td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a= -"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"</pre></td></tr></table></td> -<td colspan="1" rowspan="1"><code>#xD -#xD A #xA #xA B #xD #xA</code></td> -<td colspan="1" rowspan="1"><code>#xD #xD A #xA #xA B #xD #xD</code></td> -</tr> -</tbody> -</table> +<table border="1" frame="border"><thead><tr><th colspan="1" rowspan="1">Attribute specification</th> +<th colspan="1" rowspan="1">a is NMTOKENS</th><th colspan="1" rowspan="1">a is CDATA</th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a=" + +xyz"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>x y z</code></td><td colspan="1" rowspan="1"><code>#x20 #x20 x y z</code></td> +</tr><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a="&d;&d;A&a;&a;B&da;"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>A +#x20 B</code></td><td colspan="1" rowspan="1"><code>#x20 #x20 A #x20 #x20 B #x20 #x20</code></td> +</tr><tr><td colspan="1" rowspan="1"><table class="eg" cellpadding="5" border="1" bgcolor="#99ffff" width="100%" summary="Example"><tr><td><pre>a= +"&#xd;&#xd;A&#xa;&#xa;B&#xd;&#xa;"</pre></td></tr></table></td><td colspan="1" rowspan="1"><code>#xD +#xD A #xA #xA B #xD #xA</code></td><td colspan="1" rowspan="1"><code>#xD #xD A #xA #xA B #xD #xD</code></td> +</tr></tbody></table> <p>Note that the last example is invalid (but well-formed) if <code>a</code> is declared to be of type <b>NMTOKENS</b>.</p> </div> </div> <div class="div2"> -<h3> -<a name="sec-condition-sect"></a>3.4 Conditional Sections</h3> +<h3><a name="sec-condition-sect"></a>3.4 Conditional Sections</h3> <p>[<a name="dt-cond-section" title="conditional section">Definition</a>: <b>Conditional sections</b> are portions of the <a title="Document Type Declaration" href="#dt-doctype">document type declaration external subset</a> which are included in, or excluded from, the logical structure of the DTD based on the keyword which governs them.]</p> -<h5>Conditional Section</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-conditionalSect"></a>[61] </td> -<td><code>conditionalSect</code></td> -<td> ::= </td> -<td><code><a href="#NT-includeSect">includeSect</a> | <a href="#NT-ignoreSect">ignoreSect</a> </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-includeSect"></a>[62] </td> -<td><code>includeSect</code></td> -<td> ::= </td> -<td><code>'<![' S? 'INCLUDE' S? '[' <a href="#NT-extSubsetDecl">extSubsetDecl</a> -']]>' </code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#condsec-nesting">[VC: Proper -Conditional Section/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-ignoreSect"></a>[63] </td> -<td><code>ignoreSect</code></td> -<td> ::= </td> -<td><code>'<![' S? 'IGNORE' S? '[' <a href="#NT-ignoreSectContents">ignoreSectContents</a>* -']]>'</code></td> -<xsltdebug></xsltdebug><td><i>/* */</i></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#condsec-nesting">[VC: Proper -Conditional Section/PE Nesting]</a></td> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-ignoreSectContents"></a>[64] </td> -<td><code>ignoreSectContents</code></td> -<td> ::= </td> -<td><code><a href="#NT-Ignore">Ignore</a> ('<![' <a href="#NT-ignoreSectContents">ignoreSectContents</a> ']]>' <a href="#NT-Ignore">Ignore</a>)*</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Ignore"></a>[65] </td> -<td><code>Ignore</code></td> -<td> ::= </td> -<td><code><a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* -('<![' | ']]>') <a href="#NT-Char">Char</a>*) </code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Conditional Section</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-conditionalSect"></a>[61] </td><td><code>conditionalSect</code></td><td> ::= </td><td><code><a href="#NT-includeSect">includeSect</a> | <a href="#NT-ignoreSect">ignoreSect</a> </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-includeSect"></a>[62] </td><td><code>includeSect</code></td><td> ::= </td><td><code>'<![' S? 'INCLUDE' S? '[' <a href="#NT-extSubsetDecl">extSubsetDecl</a> +']]>' </code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#condsec-nesting">[VC: Proper +Conditional Section/PE Nesting]</a></td></tr> +<tr valign="baseline"><td><a name="NT-ignoreSect"></a>[63] </td><td><code>ignoreSect</code></td><td> ::= </td><td><code>'<![' S? 'IGNORE' S? '[' <a href="#NT-ignoreSectContents">ignoreSectContents</a>* +']]>'</code></td><xsltdebug></xsltdebug><td><i>/* */</i></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#condsec-nesting">[VC: Proper +Conditional Section/PE Nesting]</a></td></tr> +<tr valign="baseline"><td><a name="NT-ignoreSectContents"></a>[64] </td><td><code>ignoreSectContents</code></td><td> ::= </td><td><code><a href="#NT-Ignore">Ignore</a> ('<![' <a href="#NT-ignoreSectContents">ignoreSectContents</a> ']]>' <a href="#NT-Ignore">Ignore</a>)*</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Ignore"></a>[65] </td><td><code>Ignore</code></td><td> ::= </td><td><code><a href="#NT-Char">Char</a>* - (<a href="#NT-Char">Char</a>* +('<![' | ']]>') <a href="#NT-Char">Char</a>*) </code></td><xsltdebug></xsltdebug></tr> </tbody></table> -<div class="constraint"> -<p class="prefix"> -<a name="condsec-nesting"></a><b>Validity constraint: Proper -Conditional Section/PE Nesting</b> -</p> -<p>If any of the "<code><![</code>", +<div class="constraint"><p class="prefix"><a name="condsec-nesting"></a><b>Validity constraint: Proper +Conditional Section/PE Nesting</b></p><p>If any of the "<code><![</code>", "<code>[</code>", or "<code>]]></code>" of a conditional section is contained in the replacement text for a parameter-entity reference, all of them must be contained in the same replacement text.</p> @@ -2134,8 +1225,7 @@ decides whether to include or ignore the conditional section.</p> <div class="div1"> -<h2> -<a name="sec-physical-struct"></a>4 Physical Structures</h2> +<h2><a name="sec-physical-struct"></a>4 Physical Structures</h2> <p>[<a name="dt-entity" title="Entity">Definition</a>: An XML document may consist of one or many storage units. These are called <b>entities</b>; they all have <b>content</b> and are @@ -2168,35 +1258,13 @@ in different contexts. Furthermore, they occupy different namespaces; a paramete entity and a general entity with the same name are two distinct entities.</p> <div class="div2"> -<h3> -<a name="sec-references"></a>4.1 Character and Entity References</h3> +<h3><a name="sec-references"></a>4.1 Character and Entity References</h3> <p>[<a name="dt-charref" title="Character Reference">Definition</a>: A <b>character reference</b> refers to a specific character in the ISO/IEC 10646 character set, for example one not directly accessible from available input devices.]</p> -<h5>Character Reference</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-CharRef"></a>[66] </td> -<td><code>CharRef</code></td> -<td> ::= </td> -<td><code>'&#' [0-9]+ ';' </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| '&#x' [0-9a-fA-F]+ ';'</code></td> -<td><a href="#wf-Legalchar">[WFC: Legal Character]</a></td> -</tr> -</tbody></table> -<div class="constraint"> -<p class="prefix"> -<a name="wf-Legalchar"></a><b>Well-formedness constraint: Legal Character</b> -</p> -<p>Characters referred +<h5>Character Reference</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-CharRef"></a>[66] </td><td><code>CharRef</code></td><td> ::= </td><td><code>'&#' [0-9]+ ';' </code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| '&#x' [0-9a-fA-F]+ ';'</code></td><td><a href="#wf-Legalchar">[WFC: Legal Character]</a></td></tr></tbody></table> +<div class="constraint"><p class="prefix"><a name="wf-Legalchar"></a><b>Well-formedness constraint: Legal Character</b></p><p>Characters referred to using character references must match the production for <a title="" href="#NT-Char">Char</a>.</p> </div> <p>If the character reference begins with "<code>&#x</code>", @@ -2209,77 +1277,8 @@ refers to the content of a named entity.] [<a name="dt-GERef" title="General Ent ampersand (<code>&</code>) and semicolon (<code>;</code>) as delimiters.] [<a name="dt-PERef" title="Parameter-entity reference">Definition</a>: <b>Parameter-entity references</b> use percent-sign (<code>%</code>) and semicolon (<code>;</code>) as delimiters.]</p> -<h5>Entity Reference</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-Reference"></a>[67] </td> -<td><code>Reference</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityRef">EntityRef</a> | <a href="#NT-CharRef">CharRef</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityRef"></a>[68] </td> -<td><code>EntityRef</code></td> -<td> ::= </td> -<td><code>'&' <a href="#NT-Name">Name</a> ';'</code></td> -<xsltdebug></xsltdebug><td><a href="#wf-entdeclared">[WFC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#textent">[WFC: Parsed Entity]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#norecursion">[WFC: No Recursion]</a></td> -</tr> -</tbody> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-PEReference"></a>[69] </td> -<td><code>PEReference</code></td> -<td> ::= </td> -<td><code>'%' <a href="#NT-Name">Name</a> ';'</code></td> -<xsltdebug></xsltdebug><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#norecursion">[WFC: No Recursion]</a></td> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td></td> -<td><a href="#indtd">[WFC: In DTD]</a></td> -</tr> -</tbody> -</table> -<div class="constraint"> -<p class="prefix"> -<a name="wf-entdeclared"></a><b>Well-formedness constraint: Entity Declared</b> -</p> -<p>In a document +<h5>Entity Reference</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-Reference"></a>[67] </td><td><code>Reference</code></td><td> ::= </td><td><code><a href="#NT-EntityRef">EntityRef</a> | <a href="#NT-CharRef">CharRef</a></code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-EntityRef"></a>[68] </td><td><code>EntityRef</code></td><td> ::= </td><td><code>'&' <a href="#NT-Name">Name</a> ';'</code></td><xsltdebug></xsltdebug><td><a href="#wf-entdeclared">[WFC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#textent">[WFC: Parsed Entity]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#norecursion">[WFC: No Recursion]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PEReference"></a>[69] </td><td><code>PEReference</code></td><td> ::= </td><td><code>'%' <a href="#NT-Name">Name</a> ';'</code></td><xsltdebug></xsltdebug><td><a href="#vc-entdeclared">[VC: Entity Declared]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#norecursion">[WFC: No Recursion]</a></td></tr><tr valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#indtd">[WFC: In DTD]</a></td></tr></tbody></table> +<div class="constraint"><p class="prefix"><a name="wf-entdeclared"></a><b>Well-formedness constraint: Entity Declared</b></p><p>In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "<code>standalone='yes'</code>", for an entity reference that does not occur within the external subset or a parameter @@ -2299,11 +1298,7 @@ obligated to</cite></a> read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if <a href="#sec-rmd"><cite>standalone='yes'</cite></a>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="vc-entdeclared"></a><b>Validity constraint: Entity Declared</b> -</p> -<p>In a document with +<div class="constraint"><p class="prefix"><a name="vc-entdeclared"></a><b>Validity constraint: Entity Declared</b></p><p>In a document with an external subset or external parameter entities with "<code>standalone='no'</code>", the <a href="#NT-Name">Name</a> given in the entity reference must <a title="match" href="#dt-match">match</a> that in an <a href="#sec-entity-decl"><cite>entity declaration</cite></a>. For interoperability, valid documents should declare @@ -2318,27 +1313,15 @@ declaration containing a default value with a direct or indirect reference to that general entity.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="textent"></a><b>Well-formedness constraint: Parsed Entity</b> -</p> -<p>An entity reference must +<div class="constraint"><p class="prefix"><a name="textent"></a><b>Well-formedness constraint: Parsed Entity</b></p><p>An entity reference must not contain the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>. Unparsed entities may be referred to only in <a title="Attribute Value" href="#dt-attrval">attribute values</a> declared to be of type <b>ENTITY</b> or <b>ENTITIES</b>.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="norecursion"></a><b>Well-formedness constraint: No Recursion</b> -</p> -<p>A parsed entity must +<div class="constraint"><p class="prefix"><a name="norecursion"></a><b>Well-formedness constraint: No Recursion</b></p><p>A parsed entity must not contain a recursive reference to itself, either directly or indirectly.</p> </div> -<div class="constraint"> -<p class="prefix"> -<a name="indtd"></a><b>Well-formedness constraint: In DTD</b> -</p> -<p>Parameter-entity references may +<div class="constraint"><p class="prefix"><a name="indtd"></a><b>Well-formedness constraint: In DTD</b></p><p>Parameter-entity references may only appear in the <a title="Document Type Declaration" href="#dt-doctype">DTD</a>.</p> </div> <p>Examples of character and entity references:</p> @@ -2354,55 +1337,18 @@ is classified &security-level;.</pre></td></tr></table> </div> <div class="div2"> -<h3> -<a name="sec-entity-decl"></a>4.2 Entity Declarations</h3> +<h3><a name="sec-entity-decl"></a>4.2 Entity Declarations</h3> <p>[<a name="dt-entdecl" title="entity declaration">Definition</a>: Entities are declared thus:]</p> -<h5>Entity Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-EntityDecl"></a>[70] </td> -<td><code>EntityDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-GEDecl">GEDecl</a> | <a href="#NT-PEDecl">PEDecl</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-GEDecl"></a>[71] </td> -<td><code>GEDecl</code></td> -<td> ::= </td> -<td><code>'<!ENTITY' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-EntityDef">EntityDef</a> <a href="#NT-S">S</a>? -'>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-PEDecl"></a>[72] </td> -<td><code>PEDecl</code></td> -<td> ::= </td> -<td><code>'<!ENTITY' <a href="#NT-S">S</a> '%' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-PEDef">PEDef</a> <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-EntityDef"></a>[73] </td> -<td><code>EntityDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityValue">EntityValue</a> | (<a href="#NT-ExternalID">ExternalID</a> <a href="#NT-NDataDecl">NDataDecl</a>?)</code></td> -<xsltdebug></xsltdebug> -</tr> - -<tr valign="baseline"> -<td> -<a name="NT-PEDef"></a>[74] </td> -<td><code>PEDef</code></td> -<td> ::= </td> -<td><code><a href="#NT-EntityValue">EntityValue</a> | <a href="#NT-ExternalID">ExternalID</a></code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Entity Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-EntityDecl"></a>[70] </td><td><code>EntityDecl</code></td><td> ::= </td><td><code><a href="#NT-GEDecl">GEDecl</a> | <a href="#NT-PEDecl">PEDecl</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-GEDecl"></a>[71] </td><td><code>GEDecl</code></td><td> ::= </td><td><code>'<!ENTITY' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-EntityDef">EntityDef</a> <a href="#NT-S">S</a>? +'>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-PEDecl"></a>[72] </td><td><code>PEDecl</code></td><td> ::= </td><td><code>'<!ENTITY' <a href="#NT-S">S</a> '%' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> <a href="#NT-PEDef">PEDef</a> <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-EntityDef"></a>[73] </td><td><code>EntityDef</code></td><td> ::= </td><td><code><a href="#NT-EntityValue">EntityValue</a> | (<a href="#NT-ExternalID">ExternalID</a> <a href="#NT-NDataDecl">NDataDecl</a>?)</code></td><xsltdebug></xsltdebug></tr> + +<tr valign="baseline"><td><a name="NT-PEDef"></a>[74] </td><td><code>PEDef</code></td><td> ::= </td><td><code><a href="#NT-EntityValue">EntityValue</a> | <a href="#NT-ExternalID">ExternalID</a></code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The <a href="#NT-Name">Name</a> identifies the entity in an <a title="Entity Reference" href="#dt-entref">entity reference</a> or, in the case of an unparsed entity, in the value of @@ -2411,8 +1357,7 @@ more than once, the first declaration encountered is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.</p> <div class="div3"> -<h4> -<a name="sec-internal-ent"></a>4.2.1 Internal Entities</h4> +<h4><a name="sec-internal-ent"></a>4.2.1 Internal Entities</h4> <p>[<a name="dt-internent" title="Internal Entity Replacement Text">Definition</a>: If the entity definition is an <a href="#NT-EntityValue">EntityValue</a>, the defined entity is called an <b>internal entity</b>. There is no separate physical @@ -2426,44 +1371,13 @@ the correct <a title="Replacement Text" href="#dt-repltext">replacement text</a> </div> <div class="div3"> -<h4> -<a name="sec-external-ent"></a>4.2.2 External Entities</h4> +<h4><a name="sec-external-ent"></a>4.2.2 External Entities</h4> <p>[<a name="dt-extent" title="External Entity">Definition</a>: If the entity is not internal, it is an <b>external entity</b>, declared as follows:]</p> -<h5>External Entity Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody> -<tr valign="baseline"> -<td> -<a name="NT-ExternalID"></a>[75] </td> -<td><code>ExternalID</code></td> -<td> ::= </td> -<td><code>'SYSTEM' <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td></td> -<td></td> -<td></td> -<td><code>| 'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a> </code></td> -</tr> -</tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NDataDecl"></a>[76] </td> -<td><code>NDataDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> 'NDATA' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a></code></td> -<xsltdebug></xsltdebug><td><a href="#not-declared">[VC: Notation Declared]</a></td> -</tr></tbody> -</table> +<h5>External Entity Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-ExternalID"></a>[75] </td><td><code>ExternalID</code></td><td> ::= </td><td><code>'SYSTEM' <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a></code></td><xsltdebug></xsltdebug></tr><tr valign="baseline"><td></td><td></td><td></td><td><code>| 'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> <a href="#NT-S">S</a> <a href="#NT-SystemLiteral">SystemLiteral</a> </code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-NDataDecl"></a>[76] </td><td><code>NDataDecl</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> 'NDATA' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a></code></td><xsltdebug></xsltdebug><td><a href="#not-declared">[VC: Notation Declared]</a></td></tr></tbody></table> <p>If the <a href="#NT-NDataDecl">NDataDecl</a> is present, this is a general <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>; otherwise it is a parsed entity.</p> -<div class="constraint"> -<p class="prefix"> -<a name="not-declared"></a><b>Validity constraint: Notation Declared</b> -</p> -<p>The <a href="#NT-Name">Name</a> +<div class="constraint"><p class="prefix"><a name="not-declared"></a><b>Validity constraint: Notation Declared</b></p><p>The <a href="#NT-Name">Name</a> must match the declared name of a <a title="Notation" href="#dt-notation">notation</a>.</p> </div> <p>[<a name="dt-sysid" title="System Identifier">Definition</a>: The <a href="#NT-SystemLiteral">SystemLiteral</a> is called the entity's <b>system @@ -2494,8 +1408,7 @@ as one or more bytes.</p></li> <li><p>Any octets corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to <code>%</code><var>HH</var>, where HH is the hexadecimal notation of the byte value).</p></li> -<li> -<p>The original character is replaced by the resulting character sequence.</p> +<li><p>The original character is replaced by the resulting character sequence.</p> </li> </ol> <p>[<a name="dt-pubid" title="Public identifier">Definition</a>: In addition to a system @@ -2520,24 +1433,14 @@ be removed.</p> </div> <div class="div2"> -<h3> -<a name="TextEntities"></a>4.3 Parsed Entities</h3> +<h3><a name="TextEntities"></a>4.3 Parsed Entities</h3> <div class="div3"> -<h4> -<a name="sec-TextDecl"></a>4.3.1 The Text Declaration</h4> +<h4><a name="sec-TextDecl"></a>4.3.1 The Text Declaration</h4> <p>External parsed entities should each begin with a <b>text declaration</b>.</p> -<h5>Text Declaration</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-TextDecl"></a>[77] </td> -<td><code>TextDecl</code></td> -<td> ::= </td> -<td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a>? <a href="#NT-EncodingDecl">EncodingDecl</a> <a href="#NT-S">S</a>? '?>'</code></td> -<xsltdebug></xsltdebug> -</tr> +<h5>Text Declaration</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-TextDecl"></a>[77] </td><td><code>TextDecl</code></td><td> ::= </td><td><code>'<?xml' <a href="#NT-VersionInfo">VersionInfo</a>? <a href="#NT-EncodingDecl">EncodingDecl</a> <a href="#NT-S">S</a>? '?>'</code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The text declaration must be provided literally, not by reference to a parsed entity. No text declaration may appear at any position other than the @@ -2547,21 +1450,12 @@ text</a>.</p> </div> <div class="div3"> -<h4> -<a name="wf-entities"></a>4.3.2 Well-Formed Parsed Entities</h4> +<h4><a name="wf-entities"></a>4.3.2 Well-Formed Parsed Entities</h4> <p>The document entity is well-formed if it matches the production labeled <a href="#NT-document">document</a>. An external general parsed entity is well-formed if it matches the production labeled <a href="#NT-extParsedEnt">extParsedEnt</a>. All external parameter entities are well-formed by definition.</p> -<h5>Well-Formed External Parsed Entity</h5> -<table class="scrap" summary="Scrap"><tbody><tr valign="baseline"> -<td> -<a name="NT-extParsedEnt"></a>[78] </td> -<td><code>extParsedEnt</code></td> -<td> ::= </td> -<td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-content">content</a></code></td> -<xsltdebug></xsltdebug> -</tr></tbody></table> +<h5>Well-Formed External Parsed Entity</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-extParsedEnt"></a>[78] </td><td><code>extParsedEnt</code></td><td> ::= </td><td><code><a href="#NT-TextDecl">TextDecl</a>? <a href="#NT-content">content</a></code></td><xsltdebug></xsltdebug></tr></tbody></table> <p>An internal general parsed entity is well-formed if its replacement text matches the production labeled <a href="#NT-content">content</a>. All internal parameter entities are well-formed by definition.</p> @@ -2572,8 +1466,7 @@ can begin in one entity and end in another.</p> </div> <div class="div3"> -<h4> -<a name="charencoding"></a>4.3.3 Character Encoding in Entities</h4> +<h4><a name="charencoding"></a>4.3.3 Character Encoding in Entities</h4> <p>Each external parsed entity in an XML document may use a different encoding for its characters. All XML processors must be able to read entities in both the UTF-8 and UTF-16 encodings. The terms "UTF-8" @@ -2597,28 +1490,10 @@ parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a text declaration (see <a href="#sec-TextDecl"><b>4.3.1 The Text Declaration</b></a>) containing an encoding declaration:</p> -<h5>Encoding Declaration</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EncodingDecl"></a>[80] </td> -<td><code>EncodingDecl</code></td> -<td> ::= </td> -<td><code><a href="#NT-S">S</a> 'encoding' <a href="#NT-Eq">Eq</a> +<h5>Encoding Declaration</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-EncodingDecl"></a>[80] </td><td><code>EncodingDecl</code></td><td> ::= </td><td><code><a href="#NT-S">S</a> 'encoding' <a href="#NT-Eq">Eq</a> ('"' <a href="#NT-EncName">EncName</a> '"' | "'" <a href="#NT-EncName">EncName</a> -"'" ) </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-EncName"></a>[81] </td> -<td><code>EncName</code></td> -<td> ::= </td> -<td><code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code></td> -<xsltdebug></xsltdebug><td><i>/* Encoding -name contains only Latin characters */</i></td> -</tr></tbody> -</table> +"'" ) </code></td><xsltdebug></xsltdebug></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-EncName"></a>[81] </td><td><code>EncName</code></td><td> ::= </td><td><code>[A-Za-z] ([A-Za-z0-9._] | '-')*</code></td><xsltdebug></xsltdebug><td><i>/* Encoding +name contains only Latin characters */</i></td></tr></tbody></table> <p>In the <a title="Document Entity" href="#dt-docent">document entity</a>, the encoding declaration is part of the <a title="XML Declaration" href="#dt-xmldecl">XML declaration</a>. The <a href="#NT-EncName">EncName</a> is the name of the encoding used.</p> @@ -2664,8 +1539,7 @@ declarations containing encoding declarations:</p> </div> <div class="div2"> -<h3> -<a name="entproc"></a>4.4 XML Processor Treatment of Entities and References</h3> +<h3><a name="entproc"></a>4.4 XML Processor Treatment of Entities and References</h3> <p>The table below summarizes the contexts in which character references, entity references, and invocations of unparsed entities might appear and the required behavior of an <a title="XML Processor" href="#dt-xml-proc">XML processor</a> @@ -2702,70 +1576,28 @@ or the contents of an ignored conditional section (see <a href="#sec-condition-s <p>.</p> </dd> </dl><p></p> -<table border="1" frame="border" cellpadding="7"><tbody align="center"> -<tr> -<td rowspan="2" colspan="1"></td> -<td rowspan="1" colspan="4" align="center" valign="bottom">Entity -Type</td> -<td colspan="1" rowspan="2" align="center">Character</td> -</tr> -<tr align="center" valign="bottom"> -<td colspan="1" rowspan="1">Parameter</td> -<td colspan="1" rowspan="1">Internal General</td> -<td colspan="1" rowspan="1">External Parsed -General</td> -<td colspan="1" rowspan="1">Unparsed</td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference -in Content</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -<td colspan="1" rowspan="1"><a href="#include-if-valid"><cite>Included -if validating</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in Attribute Value</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included -in literal</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Occurs as Attribute -Value</td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#notify"><cite>Notify</cite></a></td> -<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in EntityValue</td> -<td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included in literal</cite></a></td> -<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> -<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> -</tr> -<tr align="center" valign="middle"> -<td colspan="1" rowspan="1" align="right">Reference in DTD</td> -<td colspan="1" rowspan="1"><a href="#as-PE"><cite>Included -as PE</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> -</tr> -</tbody></table> +<table border="1" frame="border" cellpadding="7"><tbody align="center"><tr> +<td rowspan="2" colspan="1"></td><td rowspan="1" colspan="4" align="center" valign="bottom">Entity +Type</td><td colspan="1" rowspan="2" align="center">Character</td></tr><tr align="center" valign="bottom"><td colspan="1" rowspan="1">Parameter</td><td colspan="1" rowspan="1">Internal General</td><td colspan="1" rowspan="1">External Parsed +General</td><td colspan="1" rowspan="1">Unparsed</td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference +in Content</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td><td colspan="1" rowspan="1"><a href="#include-if-valid"><cite>Included +if validating</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in Attribute Value</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td><td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included +in literal</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td> +</tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Occurs as Attribute +Value</td><td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="#notify"><cite>Notify</cite></a></td> +<td colspan="1" rowspan="1"><a href="#not-recognized"><cite>Not recognized</cite></a></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in EntityValue</td><td colspan="1" rowspan="1"><a href="#inliteral"><cite>Included in literal</cite></a></td><td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td> +<td colspan="1" rowspan="1"><a href="#bypass"><cite>Bypassed</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#included"><cite>Included</cite></a></td></tr><tr align="center" valign="middle"><td colspan="1" rowspan="1" align="right">Reference in DTD</td><td colspan="1" rowspan="1"><a href="#as-PE"><cite>Included +as PE</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td><td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td> +<td colspan="1" rowspan="1"><a href="#forbidden"><cite>Forbidden</cite></a></td></tr></tbody></table> <div class="div3"> -<h4> -<a name="not-recognized"></a>4.4.1 Not Recognized</h4> +<h4><a name="not-recognized"></a>4.4.1 Not Recognized</h4> <p>Outside the DTD, the <code>%</code> character has no special significance; thus, what would be parameter entity references in the DTD are not recognized as markup in <a href="#NT-content">content</a>. Similarly, the names of unparsed @@ -2774,8 +1606,7 @@ declared attribute.</p> </div> <div class="div3"> -<h4> -<a name="included"></a>4.4.2 Included</h4> +<h4><a name="included"></a>4.4.2 Included</h4> <p>[<a name="dt-include" title="Include">Definition</a>: An entity is <b>included</b> when its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is retrieved and processed, in place of the reference itself, as though it were part of @@ -2790,8 +1621,7 @@ of the reference itself. </p> </div> <div class="div3"> -<h4> -<a name="include-if-valid"></a>4.4.3 Included If Validating</h4> +<h4><a name="include-if-valid"></a>4.4.3 Included If Validating</h4> <p>When an XML processor recognizes a reference to a parsed entity, in order to <a title="Validity" href="#dt-valid">validate</a> the document, the processor must <a title="Include" href="#dt-include">include</a> its replacement text. If @@ -2809,15 +1639,13 @@ presence and retrieve it for display only on demand.</p> </div> <div class="div3"> -<h4> -<a name="forbidden"></a>4.4.4 Forbidden</h4> +<h4><a name="forbidden"></a>4.4.4 Forbidden</h4> <p>The following are forbidden, and constitute <a title="Fatal Error" href="#dt-fatal">fatal</a> errors:</p> <ul> <li><p>the appearance of a reference to an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>.</p></li> -<li> -<p>the appearance of any character or general-entity reference in the +<li><p>the appearance of any character or general-entity reference in the DTD except within an <a href="#NT-EntityValue">EntityValue</a> or <a href="#NT-AttValue">AttValue</a>.</p> </li> <li><p>a reference to an external entity in an attribute value.</p></li> @@ -2825,8 +1653,7 @@ DTD except within an <a href="#NT-EntityValue">EntityValue</a> or <a href="#NT-A </div> <div class="div3"> -<h4> -<a name="inliteral"></a>4.4.5 Included in Literal</h4> +<h4><a name="inliteral"></a>4.4.5 Included in Literal</h4> <p>When an <a title="Entity Reference" href="#dt-entref">entity reference</a> appears in an attribute value, or a parameter entity reference appears in a literal entity value, its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is processed @@ -2843,8 +1670,7 @@ character and will not terminate the literal. For example, this is well-formed:< </div> <div class="div3"> -<h4> -<a name="notify"></a>4.4.6 Notify</h4> +<h4><a name="notify"></a>4.4.6 Notify</h4> <p>When the name of an <a title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a> appears as a token in the value of an attribute of declared type <b>ENTITY</b> or <b>ENTITIES</b>, a validating processor must inform the application of @@ -2853,15 +1679,13 @@ the <a title="System Identifier" href="#dt-sysid">system</a> and <a title="Publi </div> <div class="div3"> -<h4> -<a name="bypass"></a>4.4.7 Bypassed</h4> +<h4><a name="bypass"></a>4.4.7 Bypassed</h4> <p>When a general entity reference appears in the <a href="#NT-EntityValue">EntityValue</a> in an entity declaration, it is bypassed and left as is.</p> </div> <div class="div3"> -<h4> -<a name="as-PE"></a>4.4.8 Included as PE</h4> +<h4><a name="as-PE"></a>4.4.8 Included as PE</h4> <p>Just as with external parsed entities, parameter entities need only be <a href="#include-if-valid"><cite>included if validating</cite></a>. When a parameter-entity reference is recognized in the DTD and included, its <a title="Replacement Text" href="#dt-repltext">replacement text</a> is enlarged by the attachment of one leading and one following @@ -2874,8 +1698,7 @@ these are described in <a href="#inliteral"><b>4.4.5 Included in Literal</b></a> </div> <div class="div2"> -<h3> -<a name="intern-replacement"></a>4.5 Construction of Internal Entity Replacement Text</h3> +<h3><a name="intern-replacement"></a>4.5 Construction of Internal Entity Replacement Text</h3> <p>In discussing the treatment of internal entities, it is useful to distinguish two forms of the entity's value. [<a name="dt-litentval" title="Literal Entity Value">Definition</a>: The <b>literal entity value</b> is the quoted string actually present in the entity declaration, @@ -2905,8 +1728,7 @@ of a difficult example, see <a href="#sec-entexpand"><b>D Expansion of Entity an </div> <div class="div2"> -<h3> -<a name="sec-predefined-ent"></a>4.6 Predefined Entities</h3> +<h3><a name="sec-predefined-ent"></a>4.6 Predefined Entities</h3> <p>[<a name="dt-escape" title="escape">Definition</a>: Entity and character references can both be used to <b>escape</b> the left angle bracket, ampersand, and other delimiters. A set of general entities (<code>amp</code>, @@ -2941,8 +1763,7 @@ For example:</p> </div> <div class="div2"> -<h3> -<a name="Notations"></a>4.7 Notation Declarations</h3> +<h3><a name="Notations"></a>4.7 Notation Declarations</h3> <p>[<a name="dt-notation" title="Notation">Definition</a>: <b>Notations</b> identify by name the format of <a title="External Entity" href="#dt-extent">unparsed entities</a>, the format of elements which bear a notation attribute, or the application @@ -2953,32 +1774,10 @@ and in attribute specifications, and an external identifier for the notation which may allow an XML processor or its client application to locate a helper application capable of processing data in the given notation.]</p> -<h5>Notation Declarations</h5> -<table class="scrap" summary="Scrap"> -<tbody><tr valign="baseline"> -<td> -<a name="NT-NotationDecl"></a>[82] </td> -<td><code>NotationDecl</code></td> -<td> ::= </td> -<td><code>'<!NOTATION' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> (<a href="#NT-ExternalID">ExternalID</a> | <a href="#NT-PublicID">PublicID</a>) <a href="#NT-S">S</a>? '>'</code></td> -<xsltdebug></xsltdebug><td><a href="#UniqueNotationName">[VC: Unique -Notation Name]</a></td> -</tr></tbody> -<tbody><tr valign="baseline"> -<td> -<a name="NT-PublicID"></a>[83] </td> -<td><code>PublicID</code></td> -<td> ::= </td> -<td><code>'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> </code></td> -<xsltdebug></xsltdebug> -</tr></tbody> -</table> -<div class="constraint"> -<p class="prefix"> -<a name="UniqueNotationName"></a><b>Validity constraint: Unique -Notation Name</b> -</p> -<p>Only one notation declaration can declare a given <a href="#NT-Name">Name</a>.</p> +<h5>Notation Declarations</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-NotationDecl"></a>[82] </td><td><code>NotationDecl</code></td><td> ::= </td><td><code>'<!NOTATION' <a href="#NT-S">S</a> <a href="#NT-Name">Name</a> <a href="#NT-S">S</a> (<a href="#NT-ExternalID">ExternalID</a> | <a href="#NT-PublicID">PublicID</a>) <a href="#NT-S">S</a>? '>'</code></td><xsltdebug></xsltdebug><td><a href="#UniqueNotationName">[VC: Unique +Notation Name]</a></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-PublicID"></a>[83] </td><td><code>PublicID</code></td><td> ::= </td><td><code>'PUBLIC' <a href="#NT-S">S</a> <a href="#NT-PubidLiteral">PubidLiteral</a> </code></td><xsltdebug></xsltdebug></tr></tbody></table> +<div class="constraint"><p class="prefix"><a name="UniqueNotationName"></a><b>Validity constraint: Unique +Notation Name</b></p><p>Only one notation declaration can declare a given <a href="#NT-Name">Name</a>.</p> </div> <p>XML processors must provide applications with the name and external identifier(s) of any notation declared and referred to in an attribute value, attribute @@ -2992,8 +1791,7 @@ running.)</p> </div> <div class="div2"> -<h3> -<a name="sec-doc-entity"></a>4.8 Document Entity</h3> +<h3><a name="sec-doc-entity"></a>4.8 Document Entity</h3> <p>[<a name="dt-docent" title="Document Entity">Definition</a>: The <b>document entity</b> serves as the root of the entity tree and a starting-point for an <a title="XML Processor" href="#dt-xml-proc">XML processor</a>.] This specification does not specify how the document entity is to be located by an XML processor; @@ -3004,12 +1802,10 @@ on a processor input stream without any identification at all.</p> <div class="div1"> -<h2> -<a name="sec-conformance"></a>5 Conformance</h2> +<h2><a name="sec-conformance"></a>5 Conformance</h2> <div class="div2"> -<h3> -<a name="proc-types"></a>5.1 Validating and Non-Validating Processors</h3> +<h3><a name="proc-types"></a>5.1 Validating and Non-Validating Processors</h3> <p>Conforming <a title="XML Processor" href="#dt-xml-proc">XML processors</a> fall into two classes: validating and non-validating.</p> <p>Validating and non-validating processors alike must report violations of @@ -3039,8 +1835,7 @@ the entity may have contained overriding declarations.</p> </div> <div class="div2"> -<h3> -<a name="safe-behavior"></a>5.2 Using XML Processors</h3> +<h3><a name="safe-behavior"></a>5.2 Using XML Processors</h3> <p>The behavior of a validating XML processor is highly predictable; it must read every piece of a document and report all well-formedness and validity violations. Less is required of a non-validating processor; it need not read @@ -3068,8 +1863,7 @@ external entities should use validating XML processors.</p> </div> <div class="div1"> -<h2> -<a name="sec-notation"></a>6 Notation</h2> +<h2><a name="sec-notation"></a>6 Notation</h2> <p>The formal grammar of XML is given in this specification using a simple Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines one symbol, in the form</p> @@ -3088,29 +1882,21 @@ zeros in the <code>#xN</code> form is insignificant; the number of leading zeros in the corresponding code value is governed by the character encoding in use and is not significant for XML.</p> </dd> -<dt class="label"> -<code>[a-zA-Z]</code>, <code>[#xN-#xN]</code> -</dt> +<dt class="label"><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></dt> <dd> <p>matches any <a href="#NT-Char">Char</a> with a value in the range(s) indicated (inclusive).</p> </dd> -<dt class="label"> -<code>[abc]</code>, <code>[#xN#xN#xN]</code> -</dt> +<dt class="label"><code>[abc]</code>, <code>[#xN#xN#xN]</code></dt> <dd> <p>matches any <a href="#NT-Char">Char</a> with a value among the characters enumerated. Enumerations and ranges can be mixed in one set of brackets.</p> </dd> -<dt class="label"> -<code>[^a-z]</code>, <code>[^#xN-#xN]</code> -</dt> +<dt class="label"><code>[^a-z]</code>, <code>[^#xN-#xN]</code></dt> <dd> <p>matches any <a href="#NT-Char">Char</a> with a value <em>outside</em> the range indicated.</p> </dd> -<dt class="label"> -<code>[^abc]</code>, <code>[^#xN#xN#xN]</code> -</dt> +<dt class="label"><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></dt> <dd> <p>matches any <a href="#NT-Char">Char</a> with a value not among the characters given. Enumerations and ranges of forbidden values can be mixed in one set of brackets.</p> @@ -3129,8 +1915,7 @@ given inside the single quotes.</p> where <code>A</code> and <code>B</code> represent simple expressions: </p><dl> <dt class="label">(<code>expression</code>)</dt> <dd> -<p> -<code>expression</code> is treated as a unit and may be combined as described +<p><code>expression</code> is treated as a unit and may be combined as described in this list.</p> </dd> <dt class="label"><code>A?</code></dt> @@ -3179,195 +1964,127 @@ documents associated with a production.</p> </dd> </dl><p></p> </div> -</div> -<div class="back"> +</div><div class="back"> <div class="div1"> -<h2> -<a name="sec-bibliography"></a>A References</h2> +<h2><a name="sec-bibliography"></a>A References</h2> <div class="div2"> -<h3> -<a name="sec-existing-stds"></a>A.1 Normative References</h3> +<h3><a name="sec-existing-stds"></a>A.1 Normative References</h3> <dl> -<dt class="label"> -<a name="IANA"></a>IANA-CHARSETS</dt> -<dd>(Internet +<dt class="label"><a name="IANA"></a>IANA-CHARSETS</dt><dd>(Internet Assigned Numbers Authority) <cite>Official Names for Character Sets</cite>, ed. Keld Simonsen et al. See <a href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</a>. </dd> -<dt class="label"> -<a name="RFC1766"></a>IETF RFC 1766</dt> -<dd>IETF +<dt class="label"><a name="RFC1766"></a>IETF RFC 1766</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 1766: Tags for the Identification of Languages</cite>, ed. H. Alvestrand. 1995. (See <a href="http://www.ietf.org/rfc/rfc1766.txt">http://www.ietf.org/rfc/rfc1766.txt</a>.)</dd> -<dt class="label"> -<a name="ISO10646"></a>ISO/IEC 10646</dt> -<dd>ISO (International Organization for +<dt class="label"><a name="ISO10646"></a>ISO/IEC 10646</dt><dd>ISO (International Organization for Standardization). <cite>ISO/IEC 10646-1993 (E). Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.</cite> [Geneva]: International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7).</dd> -<dt class="label"> -<a name="ISO10646-2000"></a>ISO/IEC 10646-2000</dt> -<dd> ISO (International +<dt class="label"><a name="ISO10646-2000"></a>ISO/IEC 10646-2000</dt><dd> ISO (International Organization for Standardization). <cite>ISO/IEC 10646-1:2000. Information technology -- Universal Multiple-Octet Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual Plane.</cite> [Geneva]: International Organization for Standardization, 2000.</dd> -<dt class="label"> -<a name="Unicode"></a>Unicode</dt> -<dd>The Unicode Consortium. <em>The Unicode +<dt class="label"><a name="Unicode"></a>Unicode</dt><dd>The Unicode Consortium. <em>The Unicode Standard, Version 2.0.</em> Reading, Mass.: Addison-Wesley Developers Press, 1996.</dd> -<dt class="label"> -<a name="Unicode3"></a>Unicode3</dt> -<dd> +<dt class="label"><a name="Unicode3"></a>Unicode3</dt><dd> The Unicode Consortium. <em>The Unicode Standard, Version 3.0.</em> Reading, Mass.: Addison-Wesley Developers Press, 2000. ISBN 0-201-61633-5.</dd> -</dl> -</div> +</dl></div> <div class="div2"> -<h3> -<a name="null"></a>A.2 Other References</h3> +<h3><a name="null"></a>A.2 Other References</h3> <dl> -<dt class="label"> -<a name="Aho"></a>Aho/Ullman</dt> -<dd>Aho, Alfred V., Ravi Sethi, and Jeffrey D. +<dt class="label"><a name="Aho"></a>Aho/Ullman</dt><dd>Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. <cite>Compilers: Principles, Techniques, and Tools</cite>. Reading: Addison-Wesley, 1986, rpt. corr. 1988.</dd> -<dt class="label"> -<a name="Berners-Lee"></a>Berners-Lee et al.</dt> -<dd> Berners-Lee, T., R. Fielding, +<dt class="label"><a name="Berners-Lee"></a>Berners-Lee et al.</dt><dd> Berners-Lee, T., R. Fielding, and L. Masinter. <cite>Uniform Resource Identifiers (URI): Generic Syntax and Semantics</cite>. 1997. (Work in progress; see updates to RFC1738.)</dd> -<dt class="label"> -<a name="ABK"></a>Brüggemann-Klein</dt> -<dd>Brüggemann-Klein, +<dt class="label"><a name="ABK"></a>Brüggemann-Klein</dt><dd>Brüggemann-Klein, Anne. Formal Models in Document Processing. Habilitationsschrift. Faculty of Mathematics at the University of Freiburg, 1993. (See <a href="ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps">ftp://ftp.informatik.uni-freiburg.de/documents/papers/brueggem/habil.ps</a>.)</dd> -<dt class="label"> -<a name="ABKDW"></a>Brüggemann-Klein and Wood</dt> -<dd>Brüggemann-Klein, +<dt class="label"><a name="ABKDW"></a>Brüggemann-Klein and Wood</dt><dd>Brüggemann-Klein, Anne, and Derick Wood. <cite>Deterministic Regular Languages</cite>. Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. Extended abstract in A. Finkel, M. Jantzen, Hrsg., STACS 1992, S. 173-184. Springer-Verlag, Berlin 1992. Lecture Notes in Computer Science 577. Full version titled <cite>One-Unambiguous Regular Languages</cite> in Information and Computation 140 (2): 229-253, February 1998.</dd> -<dt class="label"> -<a name="Clark"></a>Clark</dt> -<dd>James Clark. Comparison of SGML and XML. See <a href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</a>. </dd> -<dt class="label"> -<a name="IANA-LANGCODES"></a>IANA-LANGCODES</dt> -<dd>(Internet +<dt class="label"><a name="Clark"></a>Clark</dt><dd>James Clark. Comparison of SGML and XML. See <a href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</a>. </dd> +<dt class="label"><a name="IANA-LANGCODES"></a>IANA-LANGCODES</dt><dd>(Internet Assigned Numbers Authority) <cite>Registry of Language Tags</cite>, ed. Keld Simonsen et al. (See <a href="http://www.isi.edu/in-notes/iana/assignments/languages/">http://www.isi.edu/in-notes/iana/assignments/languages/</a>.)</dd> -<dt class="label"> -<a name="RFC2141"></a>IETF RFC2141</dt> -<dd>IETF +<dt class="label"><a name="RFC2141"></a>IETF RFC2141</dt><dd>IETF (Internet Engineering Task Force). <em>RFC 2141: URN Syntax</em>, ed. R. Moats. 1997. (See <a href="http://www.ietf.org/rfc/rfc2141.txt">http://www.ietf.org/rfc/rfc2141.txt</a>.)</dd> -<dt class="label"> -<a name="rfc2279"></a>IETF RFC 2279</dt> -<dd>IETF +<dt class="label"><a name="rfc2279"></a>IETF RFC 2279</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 2279: UTF-8, a transformation format of ISO 10646</cite>, ed. F. Yergeau, 1998. (See <a href="http://www.ietf.org/rfc/rfc2279.txt">http://www.ietf.org/rfc/rfc2279.txt</a>.)</dd> -<dt class="label"> -<a name="rfc2376"></a>IETF RFC 2376</dt> -<dd>IETF +<dt class="label"><a name="rfc2376"></a>IETF RFC 2376</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 2376: XML Media Types</cite>. ed. E. Whitehead, M. Murata. 1998. (See <a href="http://www.ietf.org/rfc/rfc2376.txt">http://www.ietf.org/rfc/rfc2376.txt</a>.)</dd> -<dt class="label"> -<a name="rfc2396"></a>IETF RFC 2396</dt> -<dd>IETF +<dt class="label"><a name="rfc2396"></a>IETF RFC 2396</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax</cite>. T. Berners-Lee, R. Fielding, L. Masinter. 1998. (See <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a>.)</dd> -<dt class="label"> -<a name="rfc2732"></a>IETF RFC 2732</dt> -<dd>IETF +<dt class="label"><a name="rfc2732"></a>IETF RFC 2732</dt><dd>IETF (Internet Engineering Task Force). <cite>RFC 2732: Format for Literal IPv6 Addresses in URL's</cite>. R. Hinden, B. Carpenter, L. Masinter. 1999. (See <a href="http://www.ietf.org/rfc/rfc2732.txt">http://www.ietf.org/rfc/rfc2732.txt</a>.)</dd> -<dt class="label"> -<a name="rfc2781"></a>IETF RFC 2781</dt> -<dd> +<dt class="label"><a name="rfc2781"></a>IETF RFC 2781</dt><dd> IETF (Internet Engineering Task Force). <em>RFC 2781: UTF-16, an encoding of ISO 10646</em>, ed. P. Hoffman, F. Yergeau. 2000. (See <a href="http://www.ietf.org/rfc/rfc2781.txt">http://www.ietf.org/rfc/rfc2781.txt</a>.)</dd> -<dt class="label"> -<a name="ISO639"></a>ISO 639</dt> -<dd> +<dt class="label"><a name="ISO639"></a>ISO 639</dt><dd> (International Organization for Standardization). <cite>ISO 639:1988 (E). Code for the representation of names of languages.</cite> [Geneva]: International Organization for Standardization, 1988.</dd> -<dt class="label"> -<a name="ISO3166"></a>ISO 3166</dt> -<dd> +<dt class="label"><a name="ISO3166"></a>ISO 3166</dt><dd> (International Organization for Standardization). <cite>ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions -- Part 1: Country codes</cite> [Geneva]: International Organization for Standardization, 1997.</dd> -<dt class="label"> -<a name="ISO8879"></a>ISO 8879</dt> -<dd>ISO (International Organization for Standardization). <cite>ISO +<dt class="label"><a name="ISO8879"></a>ISO 8879</dt><dd>ISO (International Organization for Standardization). <cite>ISO 8879:1986(E). Information processing -- Text and Office Systems -- Standard Generalized Markup Language (SGML).</cite> First edition -- 1986-10-15. [Geneva]: International Organization for Standardization, 1986. </dd> -<dt class="label"> -<a name="ISO10744"></a>ISO/IEC 10744</dt> -<dd>ISO (International Organization for +<dt class="label"><a name="ISO10744"></a>ISO/IEC 10744</dt><dd>ISO (International Organization for Standardization). <cite>ISO/IEC 10744-1992 (E). Information technology -- Hypermedia/Time-based Structuring Language (HyTime). </cite> [Geneva]: International Organization for Standardization, 1992. <em>Extended Facilities Annexe.</em> [Geneva]: International Organization for Standardization, 1996. </dd> -<dt class="label"> -<a name="websgml"></a>WEBSGML</dt> -<dd>ISO +<dt class="label"><a name="websgml"></a>WEBSGML</dt><dd>ISO (International Organization for Standardization). <cite>ISO 8879:1986 TC2. Information technology -- Document Description and Processing Languages. </cite> [Geneva]: International Organization for Standardization, 1998. (See <a href="http://www.sgmlsource.com/8879rev/n0029.htm">http://www.sgmlsource.com/8879rev/n0029.htm</a>.)</dd> -<dt class="label"> -<a name="xml-names"></a>XML Names</dt> -<dd>Tim Bray, +<dt class="label"><a name="xml-names"></a>XML Names</dt><dd>Tim Bray, Dave Hollander, and Andrew Layman, editors. <cite>Namespaces in XML</cite>. Textuality, Hewlett-Packard, and Microsoft. World Wide Web Consortium, 1999. (See <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a>.)</dd> -</dl> -</div> +</dl></div> </div> <div class="div1"> -<h2> -<a name="CharClasses"></a>B Character Classes</h2> +<h2><a name="CharClasses"></a>B Character Classes</h2> <p>Following the characteristics defined in the Unicode standard, characters are classed as base characters (among others, these contain the alphabetic characters of the Latin alphabet), ideographic characters, and combining characters (among others, this class contains most diacritics) Digits and extenders are also distinguished.</p> -<h5>Characters</h5> -<table class="scrap" summary="Scrap"><tbody> -<tr valign="baseline"> -<td> -<a name="NT-Letter"></a>[84] </td> -<td><code>Letter</code></td> -<td> ::= </td> -<td><code><a href="#NT-BaseChar">BaseChar</a> | <a href="#NT-Ideographic">Ideographic</a></code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-BaseChar"></a>[85] </td> -<td><code>BaseChar</code></td> -<td> ::= </td> -<td><code>[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] +<h5>Characters</h5><table class="scrap" summary="Scrap"><tbody> +<tr valign="baseline"><td><a name="NT-Letter"></a>[84] </td><td><code>Letter</code></td><td> ::= </td><td><code><a href="#NT-BaseChar">BaseChar</a> | <a href="#NT-Ideographic">Ideographic</a></code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-BaseChar"></a>[85] </td><td><code>BaseChar</code></td><td> ::= </td><td><code>[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] @@ -3416,23 +2133,9 @@ distinguished.</p> | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] -| [#x3105-#x312C] | [#xAC00-#xD7A3] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Ideographic"></a>[86] </td> -<td><code>Ideographic</code></td> -<td> ::= </td> -<td><code>[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-CombiningChar"></a>[87] </td> -<td><code>CombiningChar</code></td> -<td> ::= </td> -<td><code>[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] +| [#x3105-#x312C] | [#xAC00-#xD7A3] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Ideographic"></a>[86] </td><td><code>Ideographic</code></td><td> ::= </td><td><code>[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-CombiningChar"></a>[87] </td><td><code>CombiningChar</code></td><td> ::= </td><td><code>[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] @@ -3455,30 +2158,14 @@ distinguished.</p> | #x0F3F | [#x0F71-#x0F84] | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] | #x3099 -| #x309A </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Digit"></a>[88] </td> -<td><code>Digit</code></td> -<td> ::= </td> -<td><code>[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] +| #x309A </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Digit"></a>[88] </td><td><code>Digit</code></td><td> ::= </td><td><code>[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] -| [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29] </code></td> -<xsltdebug></xsltdebug> -</tr> -<tr valign="baseline"> -<td> -<a name="NT-Extender"></a>[89] </td> -<td><code>Extender</code></td> -<td> ::= </td> -<td><code>#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 +| [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29] </code></td><xsltdebug></xsltdebug></tr> +<tr valign="baseline"><td><a name="NT-Extender"></a>[89] </td><td><code>Extender</code></td><td> ::= </td><td><code>#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] -| [#x30FC-#x30FE] </code></td> -<xsltdebug></xsltdebug> -</tr> +| [#x30FC-#x30FE] </code></td><xsltdebug></xsltdebug></tr> </tbody></table> <p>The character classes defined here can be derived from the Unicode 2.0 character database as follows:</p> @@ -3502,16 +2189,14 @@ section 5.14).</p></li> list so identifies it.</p></li> <li><p>Character #x0387 is added as a name character, because #x00B7 is its canonical equivalent.</p></li> -<li> -<p>Characters ':' and '_' are allowed as name-start characters.</p> +<li><p>Characters ':' and '_' are allowed as name-start characters.</p> </li> <li><p>Characters '-' and '.' are allowed as name characters.</p></li> </ul> </div> <div class="div1"> -<h2> -<a name="sec-xml-and-sgml"></a>C XML and SGML (Non-Normative)</h2> +<h2><a name="sec-xml-and-sgml"></a>C XML and SGML (Non-Normative)</h2> <p>XML is designed to be a subset of SGML, in that every XML document should also be a conforming SGML document. For a detailed comparison of the additional @@ -3519,8 +2204,7 @@ restrictions that XML places on documents beyond those of SGML, see <a href="#Cl </div> <div class="div1"> -<h2> -<a name="sec-entexpand"></a>D Expansion of Entity and Character References (Non-Normative)</h2> +<h2><a name="sec-entexpand"></a>D Expansion of Entity and Character References (Non-Normative)</h2> <p>This appendix contains some examples illustrating the sequence of entity- and character-reference recognition and expansion, as specified in <a href="#entproc"><b>4.4 XML Processor Treatment of Entities and References</b></a>.</p> <p>If the DTD contains the declaration</p> @@ -3563,8 +2247,7 @@ is not yet declared.)</p></li> is expanded immediately and the parameter entity "<code>zz</code>" is stored with the replacement text "<code><!ENTITY tricky "error-prone" ></code>", which is a well-formed entity declaration.</p></li> -<li> -<p>in line 6, the reference to "<code>xx</code>" is recognized, +<li><p>in line 6, the reference to "<code>xx</code>" is recognized, and the replacement text of "<code>xx</code>" (namely "<code>%zz;</code>") is parsed. The reference to "<code>zz</code>" is recognized in its turn, and its replacement text ("<code><!ENTITY tricky "error-prone" @@ -3574,14 +2257,12 @@ has now been declared, with the replacement text "<code>error-prone</code>& <li><p>in line 8, the reference to the general entity "<code>tricky</code>" is recognized, and it is expanded, so the full content of the <code>test</code> element is the self-describing (and ungrammatical) string <em>This sample -shows a error-prone method.</em> -</p></li> +shows a error-prone method.</em></p></li> </ul> </div> <div class="div1"> -<h2> -<a name="determinism"></a>E Deterministic Content Models (Non-Normative)</h2> +<h2><a name="determinism"></a>E Deterministic Content Models (Non-Normative)</h2> <p>As noted in <a href="#sec-element-content"><b>3.2.1 Element Content</b></a>, it is required that content models in element type declarations be deterministic. This requirement is <a title="For Compatibility" href="#dt-compat">for compatibility</a> with SGML (which calls deterministic @@ -3609,8 +2290,7 @@ Brüggemann-Klein 1991 <a href="#ABK">[Brüggemann-Klein]</a>.</p> </div> <div class="div1"> -<h2> -<a name="sec-guessing"></a>F Autodetection +<h2><a name="sec-guessing"></a>F Autodetection of Character Encodings (Non-Normative)</h2> <p>The XML encoding declaration functions as an internal label on each entity, indicating which character encoding is in use. Before an XML processor can @@ -3628,8 +2308,7 @@ or with, any accompanying (external) information. We consider the first case first.</p> <div class="div2"> -<h3> -<a name="sec-guessing-no-ext-info"></a>F.1 Detection Without External Encoding Information</h3> +<h3><a name="sec-guessing-no-ext-info"></a>F.1 Detection Without External Encoding Information</h3> <p>Because each XML entity not accompanied by external encoding information and not in UTF-8 or UTF-16 encoding <em>must</em> begin with an XML encoding declaration, in which the first characters must @@ -3639,98 +2318,45 @@ list, it may help to know that in UCS-4, '<' is "<code>#x0000003C</code> and '?' is "<code>#x0000003F</code>", and the Byte Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>". The notation <var>##</var> is used to denote any byte value except that two consecutive <var>##</var>s cannot be both 00.</p> <p>With a Byte Order Mark:</p> -<table border="1" frame="border"><tbody> -<tr> -<td colspan="1" rowspan="1"><code>00 00 FE -FF</code></td> -<td colspan="1" rowspan="1">UCS-4, big-endian machine (1234 order)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FF -FE 00 00</code></td> -<td colspan="1" rowspan="1">UCS-4, little-endian machine (4321 order)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 00 FF FE</code></td> -<td colspan="1" rowspan="1">UCS-4, unusual octet order (2143)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FE FF 00 00</code></td> -<td colspan="1" rowspan="1">UCS-4, unusual octet order (3412)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FE FF ## ##</code></td> -<td colspan="1" rowspan="1">UTF-16, big-endian</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>FF FE ## ##</code></td> -<td colspan="1" rowspan="1">UTF-16, little-endian</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>EF BB BF</code></td> -<td colspan="1" rowspan="1">UTF-8</td> -</tr> -</tbody></table> +<table border="1" frame="border"><tbody><tr><td colspan="1" rowspan="1"><code>00 00 FE +FF</code></td><td colspan="1" rowspan="1">UCS-4, big-endian machine (1234 order)</td></tr><tr><td colspan="1" rowspan="1"><code>FF +FE 00 00</code></td><td colspan="1" rowspan="1">UCS-4, little-endian machine (4321 order)</td></tr> +<tr><td colspan="1" rowspan="1"><code>00 00 FF FE</code></td><td colspan="1" rowspan="1">UCS-4, unusual octet order (2143)</td> +</tr><tr><td colspan="1" rowspan="1"><code>FE FF 00 00</code></td><td colspan="1" rowspan="1">UCS-4, unusual octet order (3412)</td> +</tr><tr><td colspan="1" rowspan="1"><code>FE FF ## ##</code></td><td colspan="1" rowspan="1">UTF-16, big-endian</td></tr> +<tr><td colspan="1" rowspan="1"><code>FF FE ## ##</code></td><td colspan="1" rowspan="1">UTF-16, little-endian</td></tr><tr> +<td colspan="1" rowspan="1"><code>EF BB BF</code></td><td colspan="1" rowspan="1">UTF-8</td></tr></tbody></table> <p>Without a Byte Order Mark:</p> -<table border="1" frame="border"><tbody> -<tr> -<td colspan="1" rowspan="1"><code>00 00 00 3C</code></td> +<table border="1" frame="border"><tbody><tr><td colspan="1" rowspan="1"><code>00 00 00 3C</code></td> <td colspan="1" rowspan="4">UCS-4 or other encoding with a 32-bit code unit and ASCII characters encoded as ASCII values, in respectively big-endian (1234), little-endian (4321) and two unusual byte orders (2143 and 3412). The encoding declaration must be read to determine which of UCS-4 or other supported 32-bit encodings -applies.</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 00 00 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 00 3C 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 3C 00 00</code></td> - -</tr> -<tr> -<td colspan="1" rowspan="1"><code>00 3C 00 3F</code></td> -<td colspan="1" rowspan="1">UTF-16BE or big-endian ISO-10646-UCS-2 +applies.</td></tr><tr><td colspan="1" rowspan="1"><code>3C 00 00 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 00 3C 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 3C 00 00</code></td> + +</tr><tr><td colspan="1" rowspan="1"><code>00 3C 00 3F</code></td><td colspan="1" rowspan="1">UTF-16BE or big-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in big-endian order and ASCII characters encoded as ASCII values (the encoding declaration must be read to determine -which)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 00 3F 00</code></td> -<td colspan="1" rowspan="1">UTF-16LE or little-endian +which)</td></tr><tr><td colspan="1" rowspan="1"><code>3C 00 3F 00</code></td><td colspan="1" rowspan="1">UTF-16LE or little-endian ISO-10646-UCS-2 or other encoding with a 16-bit code unit in little-endian order and ASCII characters encoded as ASCII values (the encoding declaration -must be read to determine which)</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>3C 3F 78 6D</code></td> +must be read to determine which)</td></tr><tr><td colspan="1" rowspan="1"><code>3C 3F 78 6D</code></td> <td colspan="1" rowspan="1">UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding which ensures that the characters of ASCII have their normal positions, width, and values; the actual encoding declaration must be read to detect which of these applies, but since all of these encodings use the same bit patterns for the relevant ASCII characters, -the encoding declaration itself may be read reliably</td> -</tr> -<tr> -<td colspan="1" rowspan="1"><code>4C -6F A7 94</code></td> -<td colspan="1" rowspan="1">EBCDIC (in some flavor; the full encoding declaration -must be read to tell which code page is in use)</td> -</tr> -<tr> -<td colspan="1" rowspan="1">Other</td> +the encoding declaration itself may be read reliably</td></tr><tr><td colspan="1" rowspan="1"><code>4C +6F A7 94</code></td><td colspan="1" rowspan="1">EBCDIC (in some flavor; the full encoding declaration +must be read to tell which code page is in use)</td></tr><tr><td colspan="1" rowspan="1">Other</td> <td colspan="1" rowspan="1">UTF-8 without an encoding declaration, or else the data stream is mislabeled (lacking a required encoding declaration), corrupt, fragmentary, or enclosed -in a wrapper of some kind</td> -</tr> -</tbody></table> -<div class="note"> -<p class="prefix"><b>Note:</b></p> +in a wrapper of some kind</td></tr></tbody></table> +<div class="note"><p class="prefix"><b>Note:</b></p> <p>In cases above which do not require reading the encoding declaration to determine the encoding, section 4.3.3 still requires that the encoding declaration, if present, be read and that the encoding name be checked to match the actual @@ -3762,8 +2388,7 @@ used to label the entity.</p> </div> <div class="div2"> -<h3> -<a name="sec-guessing-with-ext-info"></a>F.2 Priorities in the Presence of External Encoding Information</h3> +<h3><a name="sec-guessing-with-ext-info"></a>F.2 Priorities in the Presence of External Encoding Information</h3> <p>The second possible case occurs when the XML entity is accompanied by encoding information, as in some file systems and some network protocols. When multiple sources of information are available, their relative priority and the preferred @@ -3773,8 +2398,7 @@ to <a href="#rfc2376">[IETF RFC 2376]</a> or its successor, which defines the <c and <code>application/xml</code> MIME types and provides some useful guidance. In the interests of interoperability, however, the following rule is recommended.</p> <ul> -<li> -<p>If an XML entity is in a file, the Byte-Order Mark and encoding declaration are used (if present) to determine the character encoding.</p> +<li><p>If an XML entity is in a file, the Byte-Order Mark and encoding declaration are used (if present) to determine the character encoding.</p> </li> </ul> @@ -3783,8 +2407,7 @@ In the interests of interoperability, however, the following rule is recommended </div> <div class="div1"> -<h2> -<a name="sec-xml-wg"></a>G W3C XML Working Group (Non-Normative)</h2> +<h2><a name="sec-xml-wg"></a>G W3C XML Working Group (Non-Normative)</h2> <p>This specification was prepared and approved for publication by the W3C XML Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval. The current and former members @@ -3820,8 +2443,7 @@ Xerox Information Systems</li> </div> <div class="div1"> -<h2> -<a name="sec-core-wg"></a>H W3C XML Core Group (Non-Normative)</h2> +<h2><a name="sec-core-wg"></a>H W3C XML Core Group (Non-Normative)</h2> <p>The second edition of this specification was prepared by the W3C XML Core Working Group (WG). The members of the WG at the time of publication of this edition were:</p> @@ -3862,8 +2484,7 @@ Contact</i>) </li> </div> <div class="div1"> -<h2> -<a name="id2675459"></a>I Production Notes (Non-Normative)</h2> +<h2><a name="id2674567"></a>I Production Notes (Non-Normative)</h2> <p>This Second Edition was encoded in the <a href="http://www.w3.org/XML/1998/06/xmlspec-v21.dtd">XMLspec DTD</a> (which has <a href="http://www.w3.org/XML/1998/06/xmlspec-report-v21.htm">documentation</a> available). The HTML versions were produced with a combination of the <a href="http://www.w3.org/XML/1998/06/xmlspec.xsl">xmlspec.xsl</a>, <a href="http://www.w3.org/XML/1998/06/diffspec.xsl">diffspec.xsl</a>, @@ -3871,6 +2492,4 @@ and <a href="http://www.w3.org/XML/1998/06/REC-xml-2e.xsl">REC-xml-2e.xsl</a> XSLT stylesheets. The PDF version was produced with the <a href="http://www.tdb.uu.se/~jan/html2ps.html">html2ps</a> facility and a distiller program.</p> </div> -</div> -</body> -</html> +</div></body></html> |