• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version='1.0' encoding='ISO-8859-5' standalone='no'?>
2<!DOCTYPE spec SYSTEM "dtds/spec.dtd" [
3
4<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->
5
6<!-- The words 'FINAL EDIT' in comments mark places where changes
7need to be made after approval of the document by the ERB, before
8publication.  -->
9
10<!ENTITY XML.version "1.0">
11<!ENTITY doc.date "10 February 1998">
12<!ENTITY iso6.doc.date "19980210">
13<!ENTITY w3c.doc.date "02-Feb-1998">
14<!ENTITY draft.day '10'>
15<!ENTITY draft.month 'February'>
16<!ENTITY draft.year '1998'>
17
18<!ENTITY WebSGML
19 'WebSGML Adaptations Annex to ISO 8879'>
20
21<!ENTITY lt     "<">
22<!ENTITY gt     ">">
23<!ENTITY xmlpio "'&lt;?xml'">
24<!ENTITY pic    "'?>'">
25<!ENTITY br     "\n">
26<!ENTITY cellback '#c0d9c0'>
27<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->
28<!ENTITY com    "--">
29<!ENTITY como   "--">
30<!ENTITY comc   "--">
31<!ENTITY hcro   "&amp;#x">
32<!-- <!ENTITY nbsp "�"> -->
33<!ENTITY nbsp   "&#160;">
34<!ENTITY magicents "<code>amp</code>,
35<code>lt</code>,
36<code>gt</code>,
37<code>apos</code>,
38<code>quot</code>">
39
40<!-- audience and distribution status:  for use at publication time -->
41<!ENTITY doc.audience "public review and discussion">
42<!ENTITY doc.distribution "may be dislributed freely, as long as
43all text and legal notices remain intact">
44
45]>
46
47<!-- for Panorama *-->
48<?VERBATIM "eg" ?>
49
50<spec>
51<header>
52<title>Extensible Markup Language (XML) 1.0</title>
53<version></version>
54<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>
55<w3c-doctype>W3C Recommendation</w3c-doctype>
56<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>
57
58<publoc>
59<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">
60http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>
61<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">
62http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>
63<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">
64http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>
65<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">
66http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>
67<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">
68http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>
69</publoc>
70<latestloc>
71<loc  href="http://www.w3.org/TR/REC-xml">
72htt����www.w3.org/TR/REC-xml</loc>
73</latestloc>
74<prevlocs>
75<loc  href="http://www.w3.org/TR/PR-xml-971208">
76http://www.w3.org/TR/PR-xml-971208</loc>
77<!--
78<loc  href='http://www.w3.org/TR/WD-xml-961114'>
79http://www.w3.org/TR/WD-xml-961114</loc>
80<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>
81http://www.w3.org/TR/WD-xml-lang-970331</loc>
82<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>
83http://www.w3.org/TR/WD-xml-lang-970630</loc>
84<loc  href='http://www.w3.org/TR/WD-xml-970807'>
85http://www.w3.org/TR/WD-xml-970807</loc>
86<loc  href='http://www.w3.org/TR/WD-xml-971117'>
87http://www.w3.org/TR/WD-xml-971117</loc>-->
88</prevlocs>
89<authlist>
90<author><name>Tim Bray</name>
91<affiliation>Textuality and Netscape</affiliation>
92<email
93href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>
94<author><name>Jean Paoli</name>
95<affiliation>Microsoft</affiliation>
96<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>
97<author><name>C. M. Sperberg-McQueen</name>
98<affiliation>University of Illinois at Chicago</affiliation>
99<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>
100</authlist>
101<abstract>
102<p>The Extensible Markup Language (XML) is a subset of
103SGML that is completely described in this document. Its goal is to
104enable generic SGML to be served, received, and processed on the Web
105in the way that is now possible with HTML. XML has been designed for
106ease of implementation and for interoperability with both SGML and
107HTML.</p>
108</abstract>
109<status>
110<p>This document has been reviewed by W3C Members and
111other interested parties and has been endorsed by the
112Director as a W3C Recommendation. It is a stable
113document and may be used as reference material or cited
114as a normative reference from another document. W3C's
115role in making the Recommendation is to draw attention
116to the spPcification and to promote its widespread
117deployment. This enhances the functionality and
118interoperability of the Web.</p>
119<p>
120This document specifies a syntax created by subsetting an existing,
121widely used international text processing standard (Standard
122Generalized Markup Language, ISO 8879:1986(E) as amended and
123corrected) for use on the World Wide Web.  It is a product of the W3C
124XML Activity, details of which can be found at <loc
125href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of
126current W3C Recommendations and other technical documents can be found
127at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.
128</p>
129<p>This specification uses the term URI, which is defined by <bibref
130ref="Berners-Lee"/>, a work in progress expected to update <bibref
131ref="RFC1738"/> and <bibref ref="RFC1808"/>.
132</p>
133<p>The list of known errors in this specification is
134available at
135<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>
136<p>Please report errors in this document to
137<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.
138</p>
139</status>
140
141
142<pubstmt>
143<p>Chicago, Vancouver, Mountain View, et al.:
144World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>
145</pubstmt>
146<sourcedesc>
147<p>Created in electronic form.</p>
148</sourcedesc>
149<langusage>
150<language id='EN'>English</language>
151<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>
152</langusage>
153<revisiondesc>
154<slist>
155<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>
156<sitem>1997-12-02 : TB : further changes (see TB to XML WG,
1572 December 1997)</sitem>
158<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and
159comments from the proofreaders as possible:
160entify hard-coded document date in pubdate element,
161change expansion of entity WebSGML,
162update status description as per Dan Connolly (am not sure
163about refernece to Berners-Lee et al.),
164add 'The' to abstract as per WG decision,
165move Relationship to Existing Standards to back matter and
166combine with References,
167re-order back matter so normative appendices come first,
168re-tag back matter so informative appendices are tagged informdiv1,
169remove XXX XXX from list of 'normative' specs in prose,
170move some references from Other References to Normative References,
171add RFC 1738, 1808, and 2141 to Other References (they are not
172normative since we do not require the processor to enforce any
173rules based on them),
174add reference to 'Fielding draft' (Berners-Lee et al.),
175move notation section to end of body,
176drop URIchar non-terminal and use SkipLit instead,
177lose stray reference to defunct nonterminal 'markupdecls',
178move reference to Aho et al. into appendix (Tim's right),
179add prose note saying that hash marks and fragment identifiers are
180NOT part of the URI formally speaking, and are NOT legal in
181system identifiers (processor 'may' signal an error).
182Work through:
183Tim Bray reacting to James Clark,
184Tim Bray on his own,
185Eve Maler,
186
187NOT DONE YET:
188change binary / text to unparsed / parsed.
189handle James's suggestion about &lt; in attriubte values
190uppercase hex characters,
191namechar list,
192</sitem>
193<sitem>1997-12-01 : JB : add some column-width parameters</sitem>
194<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate
195recent WG decisions and other corrections:
196binding sources of character encoding info (27 Aug / 3 Sept),
197correct wording of Faust quotation (restore dropped line),
198drop SDD from EncodingDecl,
199change text at version number 1.0,
200drop misleading (wrong!) sentence about ignorables and extenders,
201modify defin�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xamples with Byte Order Mark.
202Add content model as a term and clarify that it applies to both
203mixed and element content.
204</sitem>
205<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,
206changes to productions for choice, seq, Mixed, NotationType,
207Enumeration.  Follow James Clark's suggestion and prohibit
208conditional sections in internal subset.  TO DO:  simplify
209production for ignored sections as a result, since we don't
210need to worry about parsers whi<! don't expand PErefs finding
211a conditional section.</sitem>
212<sitem>1997-06-29 : TB : various edits</sitem>
213<sitem>1997-06-29 : CMSMcQ : further changes:
214Suppress old FINAL EDIT comments and some dead material.
215Revise occurrences of % in grammar to exploit Henry Thompson's pun,
216especially markupdecl and attdef.
217Remove RMD requirement relating to element content (?).
218</sitem>
219<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:
220Add text for draconian error handling (introduce
221the term Fatal Error).
222RE deleta est (changing wording from
223original announcement to restrict the requirement to validating
224parsers).
225Tag definition of validawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww it meant 'may or may not'.</sitem>
226<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago
227to Vancouver</sitem>
228<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.
229</sitem>
230<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>
231<sitem>1997 James Clark:
232Define the set of characters from which [^abc] subtracts.
233Charref should use just [0-9] not Digit.
234Location info needs cleaner treatment:  remove?  (ERB
235question).
236One example of a PI has wrong pic.
237Clarify discussion of encoding names.
238Encoding failure should lead to unspecified results; don't
239prescribe error recovery.
240Don't require exposure of entity boundaries.
241Ignore white space in element content.
242Reserve entity names of the form u-NNNN.
243Clarify relative URLs.
244And some of my own:
245Correct productions for content model:  model cannot
246consist of a name, so "elements ::= cp" is no good.
247</sitem>
248<sitem>1996-11-11 : CMSMcQ : revise for style.
249Add new rhs to entity declaration, for parameter entities.</sitem>
250<sitem>1996-11-10 : CMSMcQ : revise for style.
251Fix / complete section on names, characters.
252Add sections on parameter entities, conditional sections.
253Still to do:  Add compatibility note on deterministic content models.
254Finish stylistic revision.</sitem>
255<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
256<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in
257ERB decision re EMPTY.</sitem>
258<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's
259suggestions.  Change comments back to //.  Introduce language for
260XML namespace reservation.  Add section on white-space handling.
261Lots more cleanup.</sitem>
262<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB
263decisions.  Characters are not integers.  Comments are /* */ not //.
264Add bibliographic refs to 10646, HyTime, Unicode.
265Rename old Cdata as MsData since it's <emph>only</emph> seen
266in marked sections.  Call them attribute-value pairs not
267name-value pairs, except once.  Internal subset is optional, needs
268'?'.  Implied attributes should be signaled to the app, not
269have values supplied by processor.</sitem>
270<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;
271introduce some EBNF for entity declarations.</sitem>
272<sitem>1996-10-?? nsistency check, fix up scraps so
273they all parse, get formatter working, correct a few productions.</sitem>
274<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and
275organizational changes:
276Replace a few literals with xmlpio and
277pi""entities, to make them consistent and ensure we can change pic
278reliably when the ERB votes.
279Drop paragraph on recognizers from notation section.
280Add match, exact match to terminology.
281Move old 2.2 XML Processors and Apps into intro.
282Mention comments, PIs, and marked sections in discussion of
283delimiter escaping.
284Streamline discussion of doctype decl syntax.
285Drop old section of 'PI syntax' for doctype decl, and add
286section on partial-DTD summary PIs to end of Logical Structures
287section.
288Revise DSD syntax section to use Tim's subset-in-a-PI
289mechanism.</sitem>
290<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>
291<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3
292(Characters)</sitem>
293<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,
294at least temporarily, and revise quickly</sitem>
295<sitem>1996-10-08 : TB : first major homogenization pass</sitem>
296<sitem>1996-10-08 : TB : turn "current" attribute on div type into
297CDATA</sitem>
298<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>
299<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange
300                            with Tim.</sitem>
301<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>
302<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>
303<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,
304do some housekeeping</sitem>
305</slist>
306</revisiondesc>
307</header>
308<�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������m> is used to read XML documents
309and provide access to their content and structure.</termdef> <termdef
310id="dt-app" term="Application">It is @ssumed that an XML processor is
311doing its work on behalf of another module, called the
312<term>application</term>.</termdef> This specification describes the
313required beh\vior of an XML processor in terms of how it must read XML
314data and the information it must provide to the application.</p>
315
316<div2 id='sec-origin-goals'>
317<head>Origin and Goals</head>
318<p>XML was developed by an XML Working Group (orisable over the
319Internet.</p></item>
320<item><p>XML shall support a wide varie�y of applications.</p></item>
321<item><p>XML shall be compatible with SGML.</p></item>
322<item><p>It shall be easy to write programs which process XML
323documents.</p></item>
324<item><p>The number of optional features in XML is to be kept to the
325absolute minimum, ideally zero.</p></item>
326<item><p>XML documents shou