-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXML5.xml
2209 lines (2197 loc) · 321 KB
/
XML5.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN"><head><title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title><style xmlns="http://www.w3.org/1999/xhtml" type="text/css">
code { font-family: monospace; }
div.constraint,
div.issue,
div.note,
div.notice { margin-left: 2em; }
ol.enumar { list-style-type: decimal; }
ol.enumla { list-style-type: lower-alpha; }
ol.enumlr { list-style-type: lower-roman; }
ol.enumua { list-style-type: upper-alpha; }
ol.enumur { list-style-type: upper-roman; }
div.exampleInner pre { margin-left: 1em;
margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
margin: 4px}
em.rfc2119 { text-transform: lowercase;
font-variant: small-caps;
font-style: normal; }
</style><link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC.css" /></head><body><div xmlns="http://www.w3.org/1999/xhtml" class="head"><p><a href="http://www.w3.org/"><img src="Extensible%20Markup%20Language%20(XML)%201.0%20(Fifth%20Edition)_files/w3c_home" alt="W3C" height="48" width="72" /></a></p>
<h1><a xmlns="http://www.w3.org/1999/xhtml" name="title" id="title"></a>Extensible Markup Language (XML) 1.0 (Fifth Edition)</h1>
<h2><a xmlns="http://www.w3.org/1999/xhtml" name="w3c-doctype" id="w3c-doctype"></a>W3C Recommendation 26 November 2008</h2><dl><dt xmlns="http://www.w3.org/1999/xhtml">This version:</dt><dd xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/2008/REC-xml-20081126/">http://www.w3.org/TR/2008/REC-xml-20081126/</a>
</dd><dt xmlns="http://www.w3.org/1999/xhtml">Latest version:</dt><dd xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/xml/">http://www.w3.org/TR/xml/</a>
</dd><dt xmlns="http://www.w3.org/1999/xhtml">Previous versions:</dt><dd xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/2008/PER-xml-20080205/">http://www.w3.org/TR/2008/PER-xml-20080205/</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/2006/REC-xml-20060816/">http://www.w3.org/TR/2006/REC-xml-20060816/</a>
</dd><dt xmlns="http://www.w3.org/1999/xhtml">Editors:</dt><dd xmlns="http://www.w3.org/1999/xhtml">Tim Bray, Textuality and Netscape <a xmlns="http://www.w3.org/1999/xhtml" href="mailto:tbray@textuality.com"><tbray@textuality.com></a></dd><dd xmlns="http://www.w3.org/1999/xhtml">Jean Paoli, Microsoft <a xmlns="http://www.w3.org/1999/xhtml" href="mailto:jeanpa@microsoft.com"><jeanpa@microsoft.com></a></dd><dd xmlns="http://www.w3.org/1999/xhtml">C. M. Sperberg-McQueen, W3C <a xmlns="http://www.w3.org/1999/xhtml" href="mailto:cmsmcq@w3.org"><cmsmcq@w3.org></a></dd><dd xmlns="http://www.w3.org/1999/xhtml">Eve Maler, Sun Microsystems, Inc. <a xmlns="http://www.w3.org/1999/xhtml" href="mailto:elm@east.sun.com"><eve.maler@east.sun.com></a></dd><dd xmlns="http://www.w3.org/1999/xhtml">François Yergeau</dd></dl><p xmlns="http://www.w3.org/1999/xhtml">Please refer to the <a href="http://www.w3.org/XML/xml-V10-5e-errata"><strong>errata</strong></a> for this document, which may
include some normative corrections.</p><p xmlns="http://www.w3.org/1999/xhtml">The <a href="http://www.w3.org/XML/xml-V10-4e-errata">previous errata</a> for this document, are also available.</p><p xmlns="http://www.w3.org/1999/xhtml">See also <a href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xml"><strong>translations</strong></a>.</p><p xmlns="http://www.w3.org/1999/xhtml">This document is also available in these non-normative formats: <a xmlns="http://www.w3.org/1999/xhtml" href="https://www.w3.org/TR/xml/REC-xml-20081126.xml">XML</a> and <a xmlns="http://www.w3.org/1999/xhtml" href="https://www.w3.org/TR/xml/REC-xml-20081126-review.html">XHTML with color-coded revision indicators</a>.</p><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2008 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></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> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p></div><hr xmlns="http://www.w3.org/1999/xhtml" /><div xmlns="http://www.w3.org/1999/xhtml">
<h2><a xmlns="http://www.w3.org/1999/xhtml" name="abstract" id="abstract"></a>Abstract</h2><p xmlns="http://www.w3.org/1999/xhtml">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 xmlns="http://www.w3.org/1999/xhtml">
<h2><a xmlns="http://www.w3.org/1999/xhtml" name="status" id="status"></a>Status of this Document</h2><p xmlns="http://www.w3.org/1999/xhtml"><em xmlns="http://www.w3.org/1999/xhtml">This section describes the status of this document at the time of its publication.
Other documents may supersede this document. A list of current W3C publications and the
latest revision of this technical report can be found in the <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/">W3C technical reports index</a> at
http://www.w3.org/TR/.</em></p><p xmlns="http://www.w3.org/1999/xhtml">This document specifies a syntax created by subsetting an existing, widely
used international text processing standard (Standard Generalized Markup Language,
ISO 8879:1986(E) as amended and corrected) for use on the World Wide Web.
It is a product of the <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/Core/">XML Core Working Group</a>
as part of the <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/Activity">XML Activity</a>.
The English version of this specification is the only normative version. However,
for translations of this document, see <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/2003/03/Translations/byTechnology?technology=xml">http://www.w3.org/2003/03/Translations/byTechnology?technology=xml</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">This document is a <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/2005/10/Process-20051014/tr.html#q74">W3C Recommendation</a>. This fifth edition is <em xmlns="http://www.w3.org/1999/xhtml">not</em> a new version of XML. As a convenience to readers,
it incorporates the changes dictated by the accumulated errata (available at
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/xml-V10-4e-errata">http://www.w3.org/XML/xml-V10-4e-errata</a>) to the <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/2006/REC-xml-20060816/">Fourth
Edition of XML 1.0, dated 16 August 2006</a>. In particular, erratum <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/xml-V10-4e-errata#E09">[E09]</a>
relaxes the restrictions on element and attribute names, thereby providing in XML 1.0 the major end user benefit
currently achievable only by using XML
1.1. As a consequence, many possible
documents which were not well-formed according to previous editions of this
specification are now well-formed, and previously invalid documents
using the newly-allowed name characters in, for example, ID
attributes, are now valid.</p><p xmlns="http://www.w3.org/1999/xhtml">This edition supersedes the previous <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/2006/REC-xml-20060816/">W3C Recommendation
of 16 August 2006</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">Please report errors in this document to
the public <a xmlns="http://www.w3.org/1999/xhtml" href="mailto:xml-editor@w3.org">xml-editor@w3.org</a> mail list; public
<a xmlns="http://www.w3.org/1999/xhtml" href="http://lists.w3.org/Archives/Public/xml-editor/">archives</a> are available. For the convenience of readers,
an <a xmlns="http://www.w3.org/1999/xhtml" href="https://www.w3.org/TR/xml/REC-xml-20081126-review.html">XHTML version with color-coded revision indicators</a> is
also provided; this version highlights each change due to an erratum published in the
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/xml-V10-4e-errata">errata
list</a> for the previous edition, together with a link to the particular
erratum in that list. Most of the
errata in the list provide a rationale for the change. The errata
list for this fifth edition is available at <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/xml-V10-5e-errata">http://www.w3.org/XML/xml-V10-5e-errata</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">An implementation report is available at <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/2008/01/xml10-5e-implementation.html">http://www.w3.org/XML/2008/01/xml10-5e-implementation.html</a>.
A <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/XML/Test/">Test Suite</a> is maintained to help assessing conformance to this specification.</p><p xmlns="http://www.w3.org/1999/xhtml">This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.</p><p xmlns="http://www.w3.org/1999/xhtml">W3C maintains a <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/2002/08/xmlcore-IPR-statements" rel="disclosure">public list of
any patent disclosures</a> made in connection with the deliverables of
the group; that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual
believes contains <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="toc">
<h2><a xmlns="http://www.w3.org/1999/xhtml" name="contents" id="contents"></a>Table of Contents</h2><p class="toc">1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-intro">Introduction</a><br xmlns="http://www.w3.org/1999/xhtml" />
1.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-origin-goals">Origin and Goals</a><br xmlns="http://www.w3.org/1999/xhtml" />
1.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-terminology">Terminology</a><br xmlns="http://www.w3.org/1999/xhtml" />
2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-documents">Documents</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-well-formed">Well-Formed XML Documents</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#charsets">Characters</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-common-syn">Common Syntactic Constructs</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.4 <a xmlns="http://www.w3.org/1999/xhtml" href="#syntax">Character Data and Markup</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.5 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-comments">Comments</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.6 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-pi">Processing Instructions</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.7 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-cdata-sect">CDATA Sections</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.8 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-prolog-dtd">Prolog and Document Type Declaration</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.9 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-rmd">Standalone Document Declaration</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.10 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-white-space">White Space Handling</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.11 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-line-ends">End-of-Line Handling</a><br xmlns="http://www.w3.org/1999/xhtml" />
2.12 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-lang-tag">Language Identification</a><br xmlns="http://www.w3.org/1999/xhtml" />
3 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-logical-struct">Logical Structures</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-starttags">Start-Tags, End-Tags, and Empty-Element Tags</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#elemdecls">Element Type Declarations</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.2.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-element-content">Element Content</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.2.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-mixed-content">Mixed Content</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#attdecls">Attribute-List Declarations</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.3.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-attribute-types">Attribute Types</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.3.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-attr-defaults">Attribute Defaults</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.3.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#AVNormalize">Attribute-Value Normalization</a><br xmlns="http://www.w3.org/1999/xhtml" />
3.4 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-condition-sect">Conditional Sections</a><br xmlns="http://www.w3.org/1999/xhtml" />
4 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-physical-struct">Physical Structures</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-references">Character and Entity References</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-entity-decl">Entity Declarations</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.2.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-internal-ent">Internal Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.2.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-external-ent">External Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#TextEntities">Parsed Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.3.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-TextDecl">The Text Declaration</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.3.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#wf-entities">Well-Formed Parsed Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.3.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#charencoding">Character Encoding in Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4 <a xmlns="http://www.w3.org/1999/xhtml" href="#entproc">XML Processor Treatment of Entities and References</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#not-recognized">Not Recognized</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#included">Included</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.3 <a xmlns="http://www.w3.org/1999/xhtml" href="#include-if-valid">Included If Validating</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.4 <a xmlns="http://www.w3.org/1999/xhtml" href="#forbidden">Forbidden</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.5 <a xmlns="http://www.w3.org/1999/xhtml" href="#inliteral">Included in Literal</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.6 <a xmlns="http://www.w3.org/1999/xhtml" href="#notify">Notify</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.7 <a xmlns="http://www.w3.org/1999/xhtml" href="#bypass">Bypassed</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.8 <a xmlns="http://www.w3.org/1999/xhtml" href="#as-PE">Included as PE</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.4.9 <a xmlns="http://www.w3.org/1999/xhtml" href="#error">Error</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.5 <a xmlns="http://www.w3.org/1999/xhtml" href="#intern-replacement">Construction of Entity Replacement Text</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.6 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-predefined-ent">Predefined Entities</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.7 <a xmlns="http://www.w3.org/1999/xhtml" href="#Notations">Notation Declarations</a><br xmlns="http://www.w3.org/1999/xhtml" />
4.8 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-doc-entity">Document Entity</a><br xmlns="http://www.w3.org/1999/xhtml" />
5 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-conformance">Conformance</a><br xmlns="http://www.w3.org/1999/xhtml" />
5.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#proc-types">Validating and Non-Validating Processors</a><br xmlns="http://www.w3.org/1999/xhtml" />
5.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#safe-behavior">Using XML Processors</a><br xmlns="http://www.w3.org/1999/xhtml" />
6 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-notation">Notation</a><br xmlns="http://www.w3.org/1999/xhtml" />
</p>
<h3><a xmlns="http://www.w3.org/1999/xhtml" name="appendices" id="appendices"></a>Appendices</h3><p class="toc">A <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-bibliography">References</a><br xmlns="http://www.w3.org/1999/xhtml" />
A.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-existing-stds">Normative References</a><br xmlns="http://www.w3.org/1999/xhtml" />
A.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#null">Other References</a><br xmlns="http://www.w3.org/1999/xhtml" />
B <a xmlns="http://www.w3.org/1999/xhtml" href="#CharClasses">Character Classes</a><br xmlns="http://www.w3.org/1999/xhtml" />
C <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-xml-and-sgml">XML and SGML</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
D <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-entexpand">Expansion of Entity and Character References</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
E <a xmlns="http://www.w3.org/1999/xhtml" href="#determinism">Deterministic Content Models</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
F <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-guessing">Autodetection of Character Encodings</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
F.1 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-guessing-no-ext-info">Detection Without External Encoding Information</a><br xmlns="http://www.w3.org/1999/xhtml" />
F.2 <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-guessing-with-ext-info">Priorities in the Presence of External Encoding Information</a><br xmlns="http://www.w3.org/1999/xhtml" />
G <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-xml-wg">W3C XML Working Group</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
H <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-core-wg">W3C XML Core Working Group</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
I <a xmlns="http://www.w3.org/1999/xhtml" href="#prod-notes">Production Notes</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
J <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-suggested-names">Suggestions for XML Names</a> (Non-Normative)<br xmlns="http://www.w3.org/1999/xhtml" />
</p></div><hr xmlns="http://www.w3.org/1999/xhtml" /><div xmlns="http://www.w3.org/1999/xhtml" class="body"><div xmlns="http://www.w3.org/1999/xhtml" class="div1">
<h2 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-intro" id="sec-intro"></a>1 Introduction</h2><p xmlns="http://www.w3.org/1999/xhtml">Extensible Markup Language, abbreviated XML, describes a class of data
objects called <a xmlns="http://www.w3.org/1999/xhtml" title="XML Document" href="#dt-xml-doc">XML documents</a> and partially
describes the behavior of computer programs which process them. XML is an
application profile or restricted form of SGML, the Standard Generalized Markup
Language <a xmlns="http://www.w3.org/1999/xhtml" href="#ISO8879">[ISO 8879]</a>. By construction, XML documents are conforming
SGML documents.</p><p xmlns="http://www.w3.org/1999/xhtml">XML documents are made up of storage units called <a xmlns="http://www.w3.org/1999/xhtml" title="Entity" href="#dt-entity">entities</a>,
which contain either parsed or unparsed data. Parsed data is made up of <a xmlns="http://www.w3.org/1999/xhtml" title="Character" href="#dt-character">characters</a>, some of which form <a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character
data</a>, and some of which form <a xmlns="http://www.w3.org/1999/xhtml" title="Markup" href="#dt-markup">markup</a>.
Markup encodes a description of the document's storage layout and logical
structure. XML provides a mechanism to impose constraints on the storage layout
and logical structure.</p><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-xml-proc" id="dt-xml-proc" title="XML Processor">Definition</a>: A software module called
an <b xmlns="http://www.w3.org/1999/xhtml">XML processor</b> is used to read XML documents and provide access
to their content and structure.]
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-app" id="dt-app" title="Application">Definition</a>: It
is assumed that an XML processor is doing its work on behalf of another module,
called the <b xmlns="http://www.w3.org/1999/xhtml">application</b>.] This specification describes
the required behavior of an XML processor in terms of how it must read XML
data and the information it must provide to the application.</p><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-origin-goals" id="sec-origin-goals"></a>1.1 Origin and Goals</h3><p xmlns="http://www.w3.org/1999/xhtml">XML was developed by an XML Working Group (originally known as the SGML
Editorial Review Board) formed under the auspices of the World Wide Web Consortium
(W3C) in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active
participation of an XML Special Interest Group (previously known as the SGML
Working Group) also organized by the W3C. The membership of the XML Working
Group is given in an appendix. Dan Connolly served as the Working Group's contact with
the W3C.</p><p xmlns="http://www.w3.org/1999/xhtml">The design goals for XML are:</p><ol xmlns="http://www.w3.org/1999/xhtml" class="enumar"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">XML shall be straightforwardly usable over the Internet.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">XML shall support a wide variety of applications.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">XML shall be compatible with SGML.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">It shall be easy to write programs which process XML documents.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The number of optional features in XML is to be kept to the absolute
minimum, ideally zero.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">XML documents should be human-legible and reasonably clear.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The XML design should be prepared quickly.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The design of XML shall be formal and concise.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">XML documents shall be easy to create.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">Terseness in XML markup is of minimal importance.</p></li></ol><p xmlns="http://www.w3.org/1999/xhtml">This specification, together with associated standards (Unicode <a xmlns="http://www.w3.org/1999/xhtml" href="#Unicode">[Unicode]</a>
and ISO/IEC 10646 <a xmlns="http://www.w3.org/1999/xhtml" href="#ISO10646">[ISO/IEC 10646]</a> for characters, Internet <span xmlns="http://www.w3.org/1999/xhtml">BCP 47</span>
<a xmlns="http://www.w3.org/1999/xhtml" href="#RFC1766">[IETF BCP 47]</a> <span xmlns="http://www.w3.org/1999/xhtml">and the Language Subtag Registry <a xmlns="http://www.w3.org/1999/xhtml" href="#IANA-LANGCODES">[IANA-LANGCODES]</a></span> for language
identification tags), provides
all the information necessary to understand XML Version 1.0 and
construct computer programs to process it.</p><p xmlns="http://www.w3.org/1999/xhtml">This version of the XML specification may be distributed freely, as long as
all text and legal notices remain intact.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-terminology" id="sec-terminology"></a>1.2 Terminology</h3><p xmlns="http://www.w3.org/1999/xhtml">The terminology used to describe XML documents is defined in the body of
this specification. The key words <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em>,
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">REQUIRED</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHALL</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHALL NOT</em>,
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD NOT</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">RECOMMENDED</em>,
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em>, and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">OPTIONAL</em>, when <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">EMPHASIZED</em>,
are to be interpreted as described in <a xmlns="http://www.w3.org/1999/xhtml" href="#rfc2119">[IETF RFC 2119]</a>. In addition, the terms defined
in the following list are used in building
those definitions and in describing the actions of an XML processor:</p><dl xmlns="http://www.w3.org/1999/xhtml"><dt xmlns="http://www.w3.org/1999/xhtml" class="label">error</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-error" id="dt-error" title="Error">Definition</a>: A violation of the rules of this specification;
results are undefined. Unless otherwise specified, failure to observe a prescription of this specification indicated by one of the keywords <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">REQUIRED</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em>, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHALL</em> and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHALL NOT</em> is an error. Conforming software <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> detect and report an error
and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> recover from it.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">fatal error</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-fatal" id="dt-fatal" title="Fatal Error">Definition</a>: An error which a conforming <a xmlns="http://www.w3.org/1999/xhtml" title="XML Processor" href="#dt-xml-proc">XML processor</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> detect and report to the application.
After encountering a fatal error, the processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> continue processing the
data to search for further errors and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> report such errors to the application.
In order to support correction of errors, the processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> make unprocessed
data from the document (with intermingled character data and markup) available
to the application. Once a fatal error is detected, however, the processor
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> continue normal processing (i.e., it <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> continue to pass character
data and information about the document's logical structure to the application
in the normal way).]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">at user option</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-atuseroption" id="dt-atuseroption" title="At user option">Definition</a>: Conforming software
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> or <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> (depending on the modal verb in the sentence) behave as described;
if it does, it <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> provide users a means to enable or disable the behavior
described.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">validity constraint</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-vc" id="dt-vc" title="Validity constraint">Definition</a>: A rule which applies to
all <a xmlns="http://www.w3.org/1999/xhtml" title="Validity" href="#dt-valid">valid</a> XML documents. Violations of validity
constraints are errors; they <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>, at user option, be reported by <a xmlns="http://www.w3.org/1999/xhtml" title="Validating Processor" href="#dt-validating">validating XML processors</a>.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">well-formedness constraint</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-wfc" id="dt-wfc" title="Well-formedness constraint">Definition</a>: A rule which applies
to all <a xmlns="http://www.w3.org/1999/xhtml" title="Well-Formed" href="#dt-wellformed">well-formed</a> XML documents. Violations
of well-formedness constraints are <a xmlns="http://www.w3.org/1999/xhtml" title="Fatal Error" href="#dt-fatal">fatal errors</a>.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">match</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-match" id="dt-match" title="match">Definition</a>: (Of strings or names:) Two strings
or names being compared are identical. Characters with multiple possible
representations in ISO/IEC 10646 (e.g. characters with both precomposed and
base+diacritic forms) match only if they have the same representation in both
strings. No
case folding is performed. (Of strings and rules in the grammar:) A string
matches a grammatical production if it belongs to the language generated by
that production. (Of content and content models:) An element matches its declaration
when it conforms in the fashion described in the constraint <b xmlns="http://www.w3.org/1999/xhtml">[VC: <a href="#elementvalid">Element Valid</a>]</b>.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">for compatibility</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-compat" id="dt-compat" title="For Compatibility">Definition</a>: Marks
a sentence describing a feature of XML included solely to ensure
that XML remains compatible with SGML.]
</p></dd><dt xmlns="http://www.w3.org/1999/xhtml" class="label">for interoperability</dt><dd xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-interop" id="dt-interop" title="For interoperability">Definition</a>: Marks
a sentence describing a non-binding recommendation included to increase
the chances that XML documents can be processed by the existing installed
base of SGML processors which predate the WebSGML Adaptations Annex to ISO 8879.]
</p></dd></dl><p>
</p></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div1">
<h2 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-documents" id="sec-documents"></a>2 Documents</h2><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-xml-doc" id="dt-xml-doc" title="XML Document">Definition</a>: A data object is an <b xmlns="http://www.w3.org/1999/xhtml">XML
document</b> if it is <a xmlns="http://www.w3.org/1999/xhtml" title="Well-Formed" href="#dt-wellformed">well-formed</a>,
as defined in this specification. In addition, the XML document is
<a xmlns="http://www.w3.org/1999/xhtml" title="Validity" href="#dt-valid">valid</a> if it meets certain further constraints.]
</p><p xmlns="http://www.w3.org/1999/xhtml">Each XML document has both a logical and a physical structure. Physically,
the document is composed of units called <a xmlns="http://www.w3.org/1999/xhtml" title="Entity" href="#dt-entity">entities</a>.
An entity may
<a xmlns="http://www.w3.org/1999/xhtml" title="Entity Reference" href="#dt-entref">refer</a> to other entities to
cause their inclusion in the document. A document begins in a "root"
or <a xmlns="http://www.w3.org/1999/xhtml" title="Document Entity" href="#dt-docent">document entity</a>. Logically, the document
is composed of declarations, elements, comments, character references, and
processing instructions, all of which are indicated in the document by explicit
markup. The logical and physical structures <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> nest properly, as described
in <a xmlns="http://www.w3.org/1999/xhtml" href="#wf-entities"><b>4.3.2 Well-Formed Parsed Entities</b></a>.</p><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-well-formed" id="sec-well-formed"></a>2.1 Well-Formed XML Documents</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-wellformed" id="dt-wellformed" title="Well-Formed">Definition</a>: A textual object is a <b xmlns="http://www.w3.org/1999/xhtml">well-formed</b>
XML document if:]
</p><ol xmlns="http://www.w3.org/1999/xhtml" class="enumar"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">Taken as a whole, it matches the production labeled <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-document">document</a>.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">It meets all the well-formedness constraints given in this specification.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">Each of the <a xmlns="http://www.w3.org/1999/xhtml" title="Text Entity" href="#dt-parsedent">parsed entities</a>
which is referenced directly or indirectly within the document is <a xmlns="http://www.w3.org/1999/xhtml" title="Well-Formed" href="#dt-wellformed">well-formed</a>.</p></li></ol>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="document" id="document"></a>Document</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-document" id="NT-document"></a>[1] </td><td><code>document</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-prolog">prolog</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-element">element</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Misc">Misc</a>*</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">Matching the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-document">document</a> production implies that:</p><ol xmlns="http://www.w3.org/1999/xhtml" class="enumar"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">It contains one or more <a xmlns="http://www.w3.org/1999/xhtml" title="Element" href="#dt-element">elements</a>.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-root" id="dt-root" title="Root Element">Definition</a>: There is exactly one element,
called the <b xmlns="http://www.w3.org/1999/xhtml">root</b>, or document element, no part of which appears
in the <a xmlns="http://www.w3.org/1999/xhtml" title="Content" href="#dt-content">content</a> of any other element.] For
all other elements, if the <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">start-tag</a> is in
the content of another element, the <a xmlns="http://www.w3.org/1999/xhtml" title="End Tag" href="#dt-etag">end-tag</a>
is in the content of the same element. More simply stated, the elements,
delimited by start- and end-tags, nest properly within each other.</p></li></ol><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-parentchild" id="dt-parentchild" title="Parent/Child">Definition</a>: As a consequence of this,
for each non-root element <code xmlns="http://www.w3.org/1999/xhtml">C</code> in the document, there is one other element <code xmlns="http://www.w3.org/1999/xhtml">P</code>
in the document such that <code xmlns="http://www.w3.org/1999/xhtml">C</code> is in the content of <code xmlns="http://www.w3.org/1999/xhtml">P</code>, but
is not in the content of any other element that is in the content of <code xmlns="http://www.w3.org/1999/xhtml">P</code>. <code xmlns="http://www.w3.org/1999/xhtml">P</code>
is referred to as the <b xmlns="http://www.w3.org/1999/xhtml">parent</b> of <code xmlns="http://www.w3.org/1999/xhtml">C</code>, and <code xmlns="http://www.w3.org/1999/xhtml">C</code> as
a <b xmlns="http://www.w3.org/1999/xhtml">child</b> of <code xmlns="http://www.w3.org/1999/xhtml">P</code>.]
</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="charsets" id="charsets"></a>2.2 Characters</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-text" id="dt-text" title="Text">Definition</a>: A parsed entity contains <b xmlns="http://www.w3.org/1999/xhtml">text</b>,
a sequence of <a xmlns="http://www.w3.org/1999/xhtml" title="Character" href="#dt-character">characters</a>, which may
represent markup or character data.]
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-character" id="dt-character" title="Character">Definition</a>: A <b xmlns="http://www.w3.org/1999/xhtml">character</b>
is an atomic unit of text as specified by ISO/IEC 10646:2000 <a xmlns="http://www.w3.org/1999/xhtml" href="#ISO10646">[ISO/IEC 10646]</a>. Legal characters are tab, carriage
return, line feed, and the legal characters
of Unicode and ISO/IEC 10646. The
versions of these standards cited in <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-existing-stds"><b>A.1 Normative References</b></a> were
current at the time this document was prepared. New characters may be added
to these standards by amendments or new editions. Consequently, XML processors
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> accept any character in the range specified for <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>.
]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="char32" id="char32"></a>Character Range</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Char" id="NT-Char"></a>[2] </td><td><code>Char</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</code></td><td xmlns="http://www.w3.org/1999/xhtml"><i>/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */</i></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">The mechanism for encoding character code points into bit patterns may
vary from entity to entity. All XML processors <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> accept the UTF-8 and UTF-16
encodings of Unicode <span xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" href="#Unicode">[Unicode]</a></span>;
the mechanisms for signaling which of the two is in use,
or for bringing other encodings into play, are discussed later, in <a xmlns="http://www.w3.org/1999/xhtml" href="#charencoding"><b>4.3.3 Character Encoding in Entities</b></a>.</p><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">Document authors are encouraged to avoid
"compatibility characters", as defined
in section <span xmlns="http://www.w3.org/1999/xhtml">2.3</span> of <a xmlns="http://www.w3.org/1999/xhtml" href="#Unicode">[Unicode]</a>. The characters defined in the following ranges are also
discouraged. They are either control characters or permanently undefined Unicode
characters:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml">[#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFD<span xmlns="http://www.w3.org/1999/xhtml">E</span>F],
[#x1FFFE-#x1FFFF], [#x2FFFE-#x2FFFF], [#x3FFFE-#x3FFFF],
[#x4FFFE-#x4FFFF], [#x5FFFE-#x5FFFF], [#x6FFFE-#x6FFFF],
[#x7FFFE-#x7FFFF], [#x8FFFE-#x8FFFF], [#x9FFFE-#x9FFFF],
[#xAFFFE-#xAFFFF], [#xBFFFE-#xBFFFF], [#xCFFFE-#xCFFFF],
[#xDFFFE-#xDFFFF], [#xEFFFE-#xEFFFF], [#xFFFFE-#xFFFFF],
[#x10FFFE-#x10FFFF].</pre></div></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-common-syn" id="sec-common-syn"></a>2.3 Common Syntactic Constructs</h3><p xmlns="http://www.w3.org/1999/xhtml">This section defines some symbols used widely in the grammar.</p><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a> (white space) consists of one or more space (#x20)
characters, carriage returns, line feeds, or tabs.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="white" id="white"></a>White Space</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-S" id="NT-S"></a>[3] </td><td><code>S</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(#x20 | #x9 | #xD | #xA)+</code></td></tr></tbody></table><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">The presence of #xD in the above production is
maintained purely for backward compatibility with the
<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/1998/REC-xml-19980210">First Edition</a>.
As explained in <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-line-ends"><b>2.11 End-of-Line Handling</b></a>,
all #xD characters literally present in an XML document
are either removed or replaced by #xA characters before
any other processing is done. The only way to get a #xD character to match this production is to
use a character reference in an entity value literal.</p></div><p xmlns="http://www.w3.org/1999/xhtml">An <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> (name token) is any mixture of name
characters.</p><p xmlns="http://www.w3.org/1999/xhtml">[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-name" id="dt-name" title="Name">Definition</a>: A <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> is an <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> with a restricted set of initial characters.] Disallowed initial characters for <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Names</a> include digits, diacritics, the full stop and the hyphen.</p><p xmlns="http://www.w3.org/1999/xhtml">Names beginning with the string "<code xmlns="http://www.w3.org/1999/xhtml">xml</code>",
or with any string which would match <code xmlns="http://www.w3.org/1999/xhtml">(('X'|'x') ('M'|'m') ('L'|'l'))</code>,
are reserved for standardization in this or future versions of this specification.</p><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">The
Namespaces in XML Recommendation <a xmlns="http://www.w3.org/1999/xhtml" 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
accept the colon as a name character.</p></div><p xmlns="http://www.w3.org/1999/xhtml">The first character of a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameStartChar">NameStartChar</a>, and any
other characters <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameChar">NameChars</a>; this mechanism is used to
prevent names from beginning with European (ASCII) digits or with
basic combining characters. Almost all characters are permitted in
names, except those which either are or reasonably could be used as
delimiters. The intention is to be inclusive rather than exclusive,
so that writing systems not yet encoded in Unicode can be used in
XML names. See <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-suggested-names"><b>J Suggestions for XML Names</b></a> for suggestions on the creation of
names.</p><p xmlns="http://www.w3.org/1999/xhtml">Document authors are encouraged to use names which are
meaningful words or combinations of words in natural languages, and
to avoid symbolic or white space characters in names. Note that
COLON, HYPHEN-MINUS, FULL STOP (period), LOW LINE (underscore), and
MIDDLE DOT are explicitly permitted.</p><p xmlns="http://www.w3.org/1999/xhtml">The ASCII symbols and punctuation marks, along with a fairly
large group of Unicode symbol characters, are excluded from names
because they are more useful as delimiters in contexts where XML
names are used outside XML documents; providing this group gives
those contexts hard guarantees about what <em xmlns="http://www.w3.org/1999/xhtml">cannot</em> be part of
an XML name. The character #x037E, GREEK QUESTION MARK, is excluded
because when normalized it becomes a semicolon, which could change
the meaning of entity references.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd39e080" id="id0xd39e080"></a>Names and Tokens</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-NameStartChar" id="NT-NameStartChar"></a>[4] </td><td><code>NameStartChar</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-NameChar" id="NT-NameChar"></a>[4a] </td><td><code>NameChar</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code><a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameStartChar">NameStartChar</a> | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Name" id="NT-Name"></a>[5] </td><td><code>Name</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code><a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameStartChar">NameStartChar</a> (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameChar">NameChar</a>)*</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Names" id="NT-Names"></a>[6] </td><td><code>Names</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code><a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> (#x20 <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>)*</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Nmtoken" id="NT-Nmtoken"></a>[7] </td><td><code>Nmtoken</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NameChar">NameChar</a>)+</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Nmtokens" id="NT-Nmtokens"></a>[8] </td><td><code>Nmtokens</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code><a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> (#x20 <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a>)*</code></td></tr></tbody></table><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Names">Names</a>
and <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtokens">Nmtokens</a> productions are used to define the validity
of tokenized attribute values after normalization (see <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-attribute-types"><b>3.3.1 Attribute Types</b></a>).</p></div><p xmlns="http://www.w3.org/1999/xhtml">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 xmlns="http://www.w3.org/1999/xhtml" href="#NT-EntityValue">EntityValue</a>), the values
of attributes (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a>), and external identifiers
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-SystemLiteral">SystemLiteral</a>). Note that a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-SystemLiteral">SystemLiteral</a>
can be parsed without scanning for markup.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3a1c80" id="id0xd3a1c80"></a>Literals</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-EntityValue" id="NT-EntityValue"></a>[9] </td><td><code>EntityValue</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'"' ([^%&"] | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PEReference">PEReference</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Reference">Reference</a>)* '"' </code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^%&'] | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PEReference">PEReference</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Reference">Reference</a>)* "'"</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-AttValue" id="NT-AttValue"></a>[10] </td><td><code>AttValue</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'"' ([^<&"] | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Reference">Reference</a>)*
'"' </code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| "'" ([^<&'] | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Reference">Reference</a>)*
"'"</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-SystemLiteral" id="NT-SystemLiteral"></a>[11] </td><td><code>SystemLiteral</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>('"' [^"]* '"') | ("'" [^']* "'") </code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-PubidLiteral" id="NT-PubidLiteral"></a>[12] </td><td><code>PubidLiteral</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'"' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PubidChar">PubidChar</a>* '"'
| "'" (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PubidChar">PubidChar</a> - "'")* "'"</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-PubidChar" id="NT-PubidChar"></a>[13] </td><td><code>PubidChar</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>#x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</code></td></tr></tbody></table><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">Although
the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EntityValue">EntityValue</a> production allows the definition
of a general entity consisting of a single explicit <code xmlns="http://www.w3.org/1999/xhtml"><</code> in the literal
(e.g., <code xmlns="http://www.w3.org/1999/xhtml"><!ENTITY mylt "<"></code>), it is strongly advised to avoid
this practice since any reference to that entity will cause a well-formedness
error.</p></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="syntax" id="syntax"></a>2.4 Character Data and Markup</h3><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" title="Text" href="#dt-text">Text</a> consists of intermingled <a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character data</a> and markup. [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-markup" id="dt-markup" title="Markup">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">Markup</b> takes the form of <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">start-tags</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="End Tag" href="#dt-etag">end-tags</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Empty" href="#dt-empty">empty-element tags</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Entity Reference" href="#dt-entref">entity references</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Character Reference" href="#dt-charref">character
references</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Comment" href="#dt-comment">comments</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="CDATA Section" href="#dt-cdsection">CDATA section</a> delimiters, <a xmlns="http://www.w3.org/1999/xhtml" title="Document Type Declaration" href="#dt-doctype">document
type declarations</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Processing instruction" href="#dt-pi">processing instructions</a>, <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-XMLDecl">XML declarations</a>, <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-TextDecl">text declarations</a>,
and any white space that is at the top level of the document entity (that
is, outside the document element and not inside any other markup).]
</p><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-chardata" id="dt-chardata" title="Character Data">Definition</a>: All text that is not markup
constitutes the <b xmlns="http://www.w3.org/1999/xhtml">character data</b> of the document.]
</p><p xmlns="http://www.w3.org/1999/xhtml">The ampersand character (&) and the left angle bracket (<) <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear
in their literal form, except when used as markup delimiters, or
within a <a xmlns="http://www.w3.org/1999/xhtml" title="Comment" href="#dt-comment">comment</a>, a <a xmlns="http://www.w3.org/1999/xhtml" title="Processing instruction" href="#dt-pi">processing
instruction</a>, or a <a xmlns="http://www.w3.org/1999/xhtml" title="CDATA Section" href="#dt-cdsection">CDATA section</a>.
If they are needed elsewhere, they <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be <a xmlns="http://www.w3.org/1999/xhtml" title="escape" href="#dt-escape">escaped</a>
using either <a xmlns="http://www.w3.org/1999/xhtml" title="Character Reference" href="#dt-charref">numeric character references</a>
or the strings "
<code xmlns="http://www.w3.org/1999/xhtml">&amp;</code>
" and "
<code xmlns="http://www.w3.org/1999/xhtml">&lt;</code>
"
respectively. The right angle bracket (>) may be represented using the string "
<code xmlns="http://www.w3.org/1999/xhtml">&gt;</code>
",
and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>, <a xmlns="http://www.w3.org/1999/xhtml" title="For Compatibility" href="#dt-compat">for compatibility</a>, be escaped
using either "
<code xmlns="http://www.w3.org/1999/xhtml">&gt;</code>
" or a character reference when it
appears in the string "
<code xmlns="http://www.w3.org/1999/xhtml">]]></code>
" in content, when
that string is not marking the end of a <a xmlns="http://www.w3.org/1999/xhtml" title="CDATA Section" href="#dt-cdsection">CDATA
section</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">In the content of elements, character data is any string of characters
which does not contain the start-delimiter of any markup and does not include the CDATA-section-close
delimiter, "
<code xmlns="http://www.w3.org/1999/xhtml">]]></code>
". In a CDATA section,
character data is any string of characters not including the CDATA-section-close
delimiter, "
<code xmlns="http://www.w3.org/1999/xhtml">]]></code>
".</p><p xmlns="http://www.w3.org/1999/xhtml">To allow attribute values to contain both single and double quotes, the
apostrophe or single-quote character (') may be represented as "
<code xmlns="http://www.w3.org/1999/xhtml">&apos;</code>
",
and the double-quote character (") as "
<code xmlns="http://www.w3.org/1999/xhtml">&quot;</code>
".</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3a9e00" id="id0xd3a9e00"></a>Character Data</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-CharData" id="NT-CharData"></a>[14] </td><td><code>CharData</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>[^<&]* - ([^<&]* ']]>' [^<&]*)</code></td></tr></tbody></table></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-comments" id="sec-comments"></a>2.5 Comments</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-comment" id="dt-comment" title="Comment">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">Comments</b> may appear
anywhere in a document outside other <a xmlns="http://www.w3.org/1999/xhtml" title="Markup" href="#dt-markup">markup</a>;
in addition, they may appear within the document type declaration at places
allowed by the grammar. They are not part of the document's <a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character
data</a>; an XML processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em>, but need not, make it possible for an
application to retrieve the text of comments. <a xmlns="http://www.w3.org/1999/xhtml" title="For Compatibility" href="#dt-compat">For
compatibility</a>, the string "
<code xmlns="http://www.w3.org/1999/xhtml">--</code>
" (double-hyphen)
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> occur within comments.] Parameter
entity references <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> be recognized within comments.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3ab900" id="id0xd3ab900"></a>Comments</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Comment" id="NT-Comment"></a>[15] </td><td><code>Comment</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<!--' ((<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a> - '-') | ('-'
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a> - '-')))* '-->'</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">An example of a comment:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!-- declarations for <head> & <body> --></pre></div><p xmlns="http://www.w3.org/1999/xhtml">Note
that the grammar does not allow a comment ending in <code xmlns="http://www.w3.org/1999/xhtml">---></code>. The
following example is <em xmlns="http://www.w3.org/1999/xhtml">not</em> well-formed.</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!-- B+, B, or B---></pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-pi" id="sec-pi"></a>2.6 Processing Instructions</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-pi" id="dt-pi" title="Processing instruction">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">Processing instructions</b>
(PIs) allow documents to contain instructions for applications.]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3ad480" id="id0xd3ad480"></a>Processing Instructions</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-PI" id="NT-PI"></a>[16] </td><td><code>PI</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<?' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PITarget">PITarget</a> (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>* - (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>* '?>' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>*)))? '?>'</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-PITarget" id="NT-PITarget"></a>[17] </td><td><code>PITarget</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> - (('X' | 'x') ('M' |
'm') ('L' | 'l'))</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">PIs are not part of the document's <a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character
data</a>, but <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be passed through to the application. The PI begins
with a target (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PITarget">PITarget</a>) used to identify the application
to which the instruction is directed. The target names "
<code xmlns="http://www.w3.org/1999/xhtml">XML</code>
", "
<code xmlns="http://www.w3.org/1999/xhtml">xml</code>
",
and so on are reserved for standardization in this or future versions of this
specification. The XML <a xmlns="http://www.w3.org/1999/xhtml" title="Notation" href="#dt-notation">Notation</a> mechanism
may be used for formal declaration of PI targets. Parameter
entity references <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> be recognized within processing instructions.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-cdata-sect" id="sec-cdata-sect"></a>2.7 CDATA Sections</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-cdsection" id="dt-cdsection" title="CDATA Section">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">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 xmlns="http://www.w3.org/1999/xhtml"><![CDATA[</code>
"
and end with the string "
<code xmlns="http://www.w3.org/1999/xhtml">]]></code>
":]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3b0700" id="id0xd3b0700"></a>CDATA Sections</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-CDSect" id="NT-CDSect"></a>[18] </td><td><code>CDSect</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CDStart">CDStart</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CData">CData</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CDEnd">CDEnd</a>
</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-CDStart" id="NT-CDStart"></a>[19] </td><td><code>CDStart</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<![CDATA['</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-CData" id="NT-CData"></a>[20] </td><td><code>CData</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>* - (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>*
']]>' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Char">Char</a>*)) </code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-CDEnd" id="NT-CDEnd"></a>[21] </td><td><code>CDEnd</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>']]>'</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">Within a CDATA section, only the <a xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml">&lt;</code>
"
and "
<code xmlns="http://www.w3.org/1999/xhtml">&amp;</code>
". CDATA sections cannot nest.</p><p xmlns="http://www.w3.org/1999/xhtml">An example of a CDATA section, in which "
<code xmlns="http://www.w3.org/1999/xhtml"><greeting></code>
"
and "
<code xmlns="http://www.w3.org/1999/xhtml"></greeting></code>
" are recognized as <a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character data</a>, not <a xmlns="http://www.w3.org/1999/xhtml" title="Markup" href="#dt-markup">markup</a>:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><![CDATA[<greeting>Hello, world!</greeting>]]> </pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-prolog-dtd" id="sec-prolog-dtd"></a>2.8 Prolog and Document Type Declaration</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-xmldecl" id="dt-xmldecl" title="XML Declaration">Definition</a>: XML documents <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em>
begin with an <b xmlns="http://www.w3.org/1999/xhtml">XML declaration</b> which specifies the version of
XML being used.] For example, the following is a complete XML document, <a xmlns="http://www.w3.org/1999/xhtml" title="Well-Formed" href="#dt-wellformed">well-formed</a> but not <a xmlns="http://www.w3.org/1999/xhtml" title="Validity" href="#dt-valid">valid</a>:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><?xml version="1.0"?>
<greeting>Hello, world!</greeting> </pre></div><p xmlns="http://www.w3.org/1999/xhtml">and so is this:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><greeting>Hello, world!</greeting></pre></div><p xmlns="http://www.w3.org/1999/xhtml">The function of the markup in an XML document is to describe its storage and
logical structure and to associate attribute
name-value pairs with its logical structures. XML provides a mechanism, the
<a xmlns="http://www.w3.org/1999/xhtml" title="Document Type Declaration" href="#dt-doctype">document
type declaration</a>, to define constraints on the logical structure
and to support the use of predefined storage units. [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-valid" id="dt-valid" title="Validity">Definition</a>: An XML document is <b xmlns="http://www.w3.org/1999/xhtml">valid</b> if it has an associated
document type declaration and if the document complies with the constraints
expressed in it.]
</p><p xmlns="http://www.w3.org/1999/xhtml">The document type declaration <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> appear before the first <a xmlns="http://www.w3.org/1999/xhtml" title="Element" href="#dt-element">element</a>
in the document.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="xmldoc" id="xmldoc"></a>Prolog</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-prolog" id="NT-prolog"></a>[22] </td><td><code>prolog</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-XMLDecl">XMLDecl</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Misc">Misc</a>*
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-doctypedecl">doctypedecl</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Misc">Misc</a>*)?</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-XMLDecl" id="NT-XMLDecl"></a>[23] </td><td><code>XMLDecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<?xml' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-VersionInfo">VersionInfo</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EncodingDecl">EncodingDecl</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-SDDecl">SDDecl</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '?>'</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-VersionInfo" id="NT-VersionInfo"></a>[24] </td><td><code>VersionInfo</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a> 'version' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Eq">Eq</a>
("'" <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-VersionNum">VersionNum</a> "'" | '"' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-VersionNum">VersionNum</a>
'"')</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Eq" id="NT-Eq"></a>[25] </td><td><code>Eq</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '=' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-VersionNum" id="NT-VersionNum"></a>[26] </td><td><code>VersionNum</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'1.' [0-9]+</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Misc" id="NT-Misc"></a>[27] </td><td><code>Misc</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Comment">Comment</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PI">PI</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">Even though the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-VersionNum">VersionNum</a> production matches
any version number of the form '1.x', XML 1.0 documents <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD NOT</em> specify a version number other than '1.0'.</p><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">When an XML 1.0 processor encounters a document that specifies
a 1.x version number other than '1.0', it will process it as
a 1.0 document. This means that an XML 1.0 processor will accept
1.x documents provided they do not use any non-1.0 features.</p></div><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-doctype" id="dt-doctype" title="Document Type Declaration">Definition</a>: The XML <b xmlns="http://www.w3.org/1999/xhtml">document
type declaration</b> contains or points to <a xmlns="http://www.w3.org/1999/xhtml" title="markup declaration" href="#dt-markupdecl">markup
declarations</a> that provide a grammar for a class of documents. This
grammar is known as a document type definition, or <b xmlns="http://www.w3.org/1999/xhtml">DTD</b>. The document
type declaration can point to an external subset (a special kind of <a xmlns="http://www.w3.org/1999/xhtml" title="External Entity" href="#dt-extent">external entity</a>) containing markup declarations,
or can contain the markup declarations directly in an internal subset, or
can do both. The DTD for a document consists of both subsets taken together.]
</p><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-markupdecl" id="dt-markupdecl" title="markup declaration">Definition</a>: A <b xmlns="http://www.w3.org/1999/xhtml">markup declaration</b>
is an <a xmlns="http://www.w3.org/1999/xhtml" title="Element Type declaration" href="#dt-eldecl">element type declaration</a>, an <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute-List Declaration" href="#dt-attdecl">attribute-list declaration</a>, an <a xmlns="http://www.w3.org/1999/xhtml" title="entity declaration" href="#dt-entdecl">entity
declaration</a>, or a <a xmlns="http://www.w3.org/1999/xhtml" title="Notation Declaration" href="#dt-notdecl">notation declaration</a>.]
These declarations may be contained in whole or in part within <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter entity" href="#dt-PE">parameter
entities</a>, as described in the well-formedness and validity constraints
below. For further
information, see <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-physical-struct"><b>4 Physical Structures</b></a>.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="dtd" id="dtd"></a>Document Type Definition</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-doctypedecl" id="NT-doctypedecl"></a>[28] </td><td><code>doctypedecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<!DOCTYPE' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-ExternalID">ExternalID</a>)? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?
('[' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-intSubset">intSubset</a> ']' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?)? '>'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-roottype">[VC: Root Element Type]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#ExtSubset">[WFC: External Subset]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-DeclSep" id="NT-DeclSep"></a>[28a] </td><td><code>DeclSep</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PEReference">PEReference</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#PE-between-Decls">[WFC: PE Between Declarations]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-intSubset" id="NT-intSubset"></a>[28b] </td><td><code>intSubset</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-markupdecl">markupdecl</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-DeclSep">DeclSep</a>)*</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-markupdecl" id="NT-markupdecl"></a>[29] </td><td><code>markupdecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-elementdecl">elementdecl</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttlistDecl">AttlistDecl</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EntityDecl">EntityDecl</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NotationDecl">NotationDecl</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PI">PI</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Comment">Comment</a>
</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-PEinMarkupDecl">[VC: Proper Declaration/PE Nesting]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml">Note
that it is possible to construct a well-formed document containing a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-doctypedecl">doctypedecl</a>
that neither points to an external subset nor contains an internal subset.</p><p xmlns="http://www.w3.org/1999/xhtml">The markup declarations may be made up in whole or in part of the <a xmlns="http://www.w3.org/1999/xhtml" title="Replacement Text" href="#dt-repltext">replacement text</a> of <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter entity" href="#dt-PE">parameter
entities</a>. The productions later in this specification for individual
nonterminals (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-elementdecl">elementdecl</a>, <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttlistDecl">AttlistDecl</a>,
and so on) describe the declarations <em xmlns="http://www.w3.org/1999/xhtml">after</em> all the parameter
entities have been <a xmlns="http://www.w3.org/1999/xhtml" title="Include" href="#dt-include">included</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">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 xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="vc-roottype" id="vc-roottype"></a><b>Validity constraint: Root Element Type</b></p><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
in the document type declaration <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the element type of the <a xmlns="http://www.w3.org/1999/xhtml" title="Root Element" href="#dt-root">root element</a>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="vc-PEinMarkupDecl" id="vc-PEinMarkupDecl"></a><b>Validity constraint: Proper Declaration/PE Nesting</b></p><p xmlns="http://www.w3.org/1999/xhtml">Parameter-entity <a xmlns="http://www.w3.org/1999/xhtml" title="Replacement Text" href="#dt-repltext">replacement text</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be properly nested with markup declarations. That is to say, if either
the first character or the last character of a markup declaration (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-markupdecl">markupdecl</a>
above) is contained in the replacement text for a <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter-entity reference" href="#dt-PERef">parameter-entity
reference</a>, both <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be contained in the same replacement text.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="wfc-PEinInternalSubset" id="wfc-PEinInternalSubset"></a><b>Well-formedness constraint: PEs in Internal Subset</b></p><p xmlns="http://www.w3.org/1999/xhtml">In
the internal DTD subset, <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter-entity reference" href="#dt-PERef">parameter-entity references</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> occur within markup declarations; they may occur where markup declarations can occur.
(This does not apply to references that occur in external parameter entities
or to the external subset.)</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="ExtSubset" id="ExtSubset"></a><b>Well-formedness constraint: External Subset</b></p><p xmlns="http://www.w3.org/1999/xhtml">The external subset, if any, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the production for <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-extSubset">extSubset</a>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="PE-between-Decls" id="PE-between-Decls"></a><b>Well-formedness constraint: PE Between Declarations</b></p><p xmlns="http://www.w3.org/1999/xhtml">The replacement text of a parameter entity reference
in a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-DeclSep">DeclSep</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the production <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-extSubsetDecl">extSubsetDecl</a>.</p></div><p xmlns="http://www.w3.org/1999/xhtml">Like the internal subset, the external subset and any external parameter
entities referenced
in a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-DeclSep">DeclSep</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> consist of a series of
complete markup declarations of the types allowed by the non-terminal symbol <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-markupdecl">markupdecl</a>, interspersed with white space or <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter-entity reference" href="#dt-PERef">parameter-entity references</a>. However, portions of
the contents of the external subset or of these
external parameter entities may conditionally be ignored by using the <a xmlns="http://www.w3.org/1999/xhtml" title="conditional section" href="#dt-cond-section">conditional section</a> construct; this is not
allowed in the internal subset but is
allowed in external parameter entities referenced in the internal subset.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="ext-Subset" id="ext-Subset"></a>External Subset</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-extSubset" id="NT-extSubset"></a>[30] </td><td><code>extSubset</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-TextDecl">TextDecl</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-extSubsetDecl">extSubsetDecl</a>
</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-extSubsetDecl" id="NT-extSubsetDecl"></a>[31] </td><td><code>extSubsetDecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>( <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-markupdecl">markupdecl</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-conditionalSect">conditionalSect</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-DeclSep">DeclSep</a>)*</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">The external subset and external parameter entities also differ from the
internal subset in that in them, <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter-entity reference" href="#dt-PERef">parameter-entity
references</a> are permitted <em xmlns="http://www.w3.org/1999/xhtml">within</em> markup declarations,
not only <em xmlns="http://www.w3.org/1999/xhtml">between</em> markup declarations.</p><p xmlns="http://www.w3.org/1999/xhtml">An example of an XML document with a document type declaration:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><?xml version="1.0"?>
<!DOCTYPE greeting SYSTEM "hello.dtd">
<greeting>Hello, world!</greeting> </pre></div><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" title="System Identifier" href="#dt-sysid">system identifier</a>
"
<code xmlns="http://www.w3.org/1999/xhtml">hello.dtd</code>
"
gives the address (a URI reference) of a DTD for the document.</p><p xmlns="http://www.w3.org/1999/xhtml">The declarations can also be given locally, as in this example:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE greeting [
<!ELEMENT greeting (#PCDATA)>
]>
<greeting>Hello, world!</greeting></pre></div><p xmlns="http://www.w3.org/1999/xhtml">If both the external and internal subsets are used, the internal subset
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be considered to occur before the external subset.
This has the effect that entity and attribute-list declarations in the internal
subset take precedence over those in the external subset.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-rmd" id="sec-rmd"></a>2.9 Standalone Document Declaration</h3><p xmlns="http://www.w3.org/1999/xhtml">Markup declarations can affect the content of the document, as passed from
an <a xmlns="http://www.w3.org/1999/xhtml" title="XML Processor" href="#dt-xml-proc">XML processor</a> to an application; examples
are attribute defaults and entity declarations. The standalone document declaration,
which may appear as a component of the XML declaration, signals whether or
not there are such declarations which appear external to the <a xmlns="http://www.w3.org/1999/xhtml" title="Document Entity" href="#dt-docent">document
entity</a>
or in parameter entities. [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-extmkpdecl" id="dt-extmkpdecl" title="External Markup Declaration">Definition</a>: An <b xmlns="http://www.w3.org/1999/xhtml">external
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).]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="fulldtd" id="fulldtd"></a>Standalone Document Declaration</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-SDDecl" id="NT-SDDecl"></a>[32] </td><td><code>SDDecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a> 'standalone' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Eq">Eq</a>
(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-check-rmd">[VC: Standalone Document Declaration]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">In a standalone document declaration, the value "yes" indicates
that there are no <a xmlns="http://www.w3.org/1999/xhtml" title="External Markup Declaration" href="#dt-extmkpdecl">external markup declarations</a> which
affect the information passed from the XML processor to the application. The
value "no" indicates that there are or may be such external
markup declarations. Note that the standalone document declaration only denotes
the presence of external <em xmlns="http://www.w3.org/1999/xhtml">declarations</em>; the presence, in a document,
of references to external <em xmlns="http://www.w3.org/1999/xhtml">entities</em>, when those entities are internally
declared, does not change its standalone status.</p><p xmlns="http://www.w3.org/1999/xhtml">If there are no external markup declarations, the standalone document declaration
has no meaning. If there are external markup declarations but there is no
standalone document declaration, the value "no" is assumed.</p><p xmlns="http://www.w3.org/1999/xhtml">Any XML document for which <code xmlns="http://www.w3.org/1999/xhtml">standalone="no"</code> holds can be converted
algorithmically to a standalone document, which may be desirable for some
network delivery applications.</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="vc-check-rmd" id="vc-check-rmd"></a><b>Validity constraint: Standalone Document Declaration</b></p><p xmlns="http://www.w3.org/1999/xhtml">The
standalone document declaration <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> have the value "no" if
any external markup declarations contain declarations of:</p><ul xmlns="http://www.w3.org/1999/xhtml"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">attributes with <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute Default" href="#dt-default">default</a> values,
if elements to which these attributes apply appear in the document without
specifications of values for these attributes, or</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">entities (other than <code xmlns="http://www.w3.org/1999/xhtml">amp</code>,
<code xmlns="http://www.w3.org/1999/xhtml">lt</code>,
<code xmlns="http://www.w3.org/1999/xhtml">gt</code>,
<code xmlns="http://www.w3.org/1999/xhtml">apos</code>,
<code xmlns="http://www.w3.org/1999/xhtml">quot</code>), if <a xmlns="http://www.w3.org/1999/xhtml" title="Entity Reference" href="#dt-entref">references</a>
to those entities appear in the document, or</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">attributes with
tokenized types, where the
attribute appears in the document with a value such that
<a xmlns="http://www.w3.org/1999/xhtml" href="#AVNormalize"><cite>normalization</cite></a>
will produce a different value from that which would be produced
in the absence of the declaration, or</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">element types with <a xmlns="http://www.w3.org/1999/xhtml" title="Element content" href="#dt-elemcontent">element content</a>,
if white space occurs directly within any instance of those types.</p></li></ul></div><p xmlns="http://www.w3.org/1999/xhtml">An example XML declaration with a standalone document declaration:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><?xml version="1.0" standalone='yes'?></pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-white-space" id="sec-white-space"></a>2.10 White Space Handling</h3><p xmlns="http://www.w3.org/1999/xhtml">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
not intended for inclusion in the delivered version of the document. On the
other hand, "significant" white space that should be preserved
in the delivered version is common, for example in poetry and source code.</p><p xmlns="http://www.w3.org/1999/xhtml">An <a xmlns="http://www.w3.org/1999/xhtml" title="XML Processor" href="#dt-xml-proc">XML processor</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> always pass
all characters in a document that are not markup through to the application.
A <a xmlns="http://www.w3.org/1999/xhtml" title="Validating Processor" href="#dt-validating"> validating XML processor</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> also
inform the application which of these characters constitute white space appearing
in <a xmlns="http://www.w3.org/1999/xhtml" title="Element content" href="#dt-elemcontent">element content</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">A special <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute" href="#dt-attr">attribute</a> named <code xmlns="http://www.w3.org/1999/xhtml">xml:space</code> may be attached to an element to signal an intention that in that element,
white space should be preserved by applications. In valid documents, this
attribute, like any other, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute-List Declaration" href="#dt-attdecl">declared</a>
if it is used. When declared, it <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be given as an <a xmlns="http://www.w3.org/1999/xhtml" title="Enumerated Attribute Values" href="#dt-enumerated">enumerated
type</a> whose values
are one or both of "default" and "preserve".
For example:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ATTLIST poem xml:space (default|preserve) 'preserve'>
<!ATTLIST pre xml:space (preserve) #FIXED 'preserve'></pre></div><p xmlns="http://www.w3.org/1999/xhtml">The value "default" signals that applications' default white-space
processing modes are acceptable for this element; the value "preserve"
indicates the intent that applications preserve all the white space. This
declared intent is considered to apply to all elements within the content
of the element where it is specified, unless overridden with
another instance of the <code xmlns="http://www.w3.org/1999/xhtml">xml:space</code> attribute. This specification does not give meaning to any value of <code xmlns="http://www.w3.org/1999/xhtml">xml:space</code> other than "default" and "preserve". It is an error for other values to be specified; the XML processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> report the error or <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> recover by ignoring the attribute specification or by reporting the (erroneous) value to the application. Applications may ignore or reject erroneous values.</p><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" title="Root Element" href="#dt-root">root element</a> of any document is considered
to have signaled no intentions as regards application space handling, unless
it provides a value for this attribute or the attribute is declared with a
default value.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-line-ends" id="sec-line-ends"></a>2.11 End-of-Line Handling</h3><p xmlns="http://www.w3.org/1999/xhtml">XML <a xmlns="http://www.w3.org/1999/xhtml" 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
CARRIAGE RETURN (#xD) and LINE FEED (#xA).</p><p xmlns="http://www.w3.org/1999/xhtml">To
simplify the tasks of <a xmlns="http://www.w3.org/1999/xhtml" title="Application" href="#dt-app">applications</a>, the
<a xmlns="http://www.w3.org/1999/xhtml" title="XML Processor" href="#dt-xml-proc">XML
processor</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> behave as if it normalized all line breaks in external parsed
entities (including the document entity) on input, before parsing, by translating
both the two-character sequence #xD #xA and any #xD that is not followed by
#xA to a single #xA character.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-lang-tag" id="sec-lang-tag"></a>2.12 Language Identification</h3><p xmlns="http://www.w3.org/1999/xhtml">In document processing, it is often useful to identify the natural or formal
language in which the content is written. A special <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute" href="#dt-attr">attribute</a>
named <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> may be inserted in documents to specify the language
used in the contents and attribute values of any element in an XML document.
In valid documents, this attribute, like any other, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute-List Declaration" href="#dt-attdecl">declared</a>
if it is used. The
values of the attribute are language identifiers as defined by <a xmlns="http://www.w3.org/1999/xhtml" href="#RFC1766">[IETF BCP 47]</a>, <cite xmlns="http://www.w3.org/1999/xhtml">Tags
for the Identification of Languages</cite>; in addition, the empty string may be specified.</p><p xmlns="http://www.w3.org/1999/xhtml">(Productions 33 through 38 have been removed.)</p><p xmlns="http://www.w3.org/1999/xhtml">For example:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
<p xml:lang="en-GB">What colour is it?</p>
<p xml:lang="en-US">What color is it?</p>
<sp who="Faust" desc='leise' xml:lang="de">
<l>Habe nun, ach! Philosophie,</l>
<l>Juristerei, und Medizin</l>
<l>und leider auch Theologie</l>
<l>durchaus studiert mit heißem Bemüh'n.</l>
</sp></pre></div><p xmlns="http://www.w3.org/1999/xhtml">The language specified by <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> applies to the element where it is specified
(including the values of its attributes), and to all elements in its content unless
overridden with another instance of <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code>. In particular, the empty value of <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> is used on an element B to override
a specification of <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> on an enclosing element A, without specifying another language. Within B,
it is considered that there is no language information available, just as if <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> had not been specified
on B or any of its ancestors. Applications determine which of an element's attribute values
and which parts of its character content, if any, are treated as language-dependent values described by <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code>. </p><div xmlns="http://www.w3.org/1999/xhtml" class="note"><p class="prefix"><b>Note:</b></p><p xmlns="http://www.w3.org/1999/xhtml">Language information may also be provided by external transport protocols (e.g. HTTP or
MIME). When available, this information may be used by XML applications, but the more local
information provided by <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> should be considered to override it.
</p></div><p xmlns="http://www.w3.org/1999/xhtml">A simple declaration for <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code> might take the form</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml">xml:lang CDATA #IMPLIED</pre></div><p xmlns="http://www.w3.org/1999/xhtml">but specific default values may also be given, if appropriate. In a collection
of French poems for English students, with glosses and notes in English, the <code xmlns="http://www.w3.org/1999/xhtml">xml:lang</code>
attribute might be declared this way:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ATTLIST poem xml:lang CDATA 'fr'>
<!ATTLIST gloss xml:lang CDATA 'en'>
<!ATTLIST note xml:lang CDATA 'en'></pre></div></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div1">
<h2 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-logical-struct" id="sec-logical-struct"></a>3 Logical Structures</h2><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-element" id="dt-element" title="Element">Definition</a>: Each <a xmlns="http://www.w3.org/1999/xhtml" title="XML Document" href="#dt-xml-doc">XML
document</a> contains one or more <b xmlns="http://www.w3.org/1999/xhtml">elements</b>, the boundaries
of which are either delimited by <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">start-tags</a>
and <a xmlns="http://www.w3.org/1999/xhtml" title="End Tag" href="#dt-etag">end-tags</a>, or, for <a xmlns="http://www.w3.org/1999/xhtml" title="Empty" href="#dt-empty">empty</a>
elements, by an <a xmlns="http://www.w3.org/1999/xhtml" title="empty-element tag" href="#dt-eetag">empty-element tag</a>. Each
element has a type, identified by name, sometimes called its "generic
identifier" (GI), and may have a set of attribute specifications.]
Each attribute specification has a <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute Name" href="#dt-attrname">name</a>
and a <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute Value" href="#dt-attrval">value</a>.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3d2680" id="id0xd3d2680"></a>Element</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-element" id="NT-element"></a>[39] </td><td><code>element</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EmptyElemTag">EmptyElemTag</a>
</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-STag">STag</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-content">content</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-ETag">ETag</a>
</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#GIMatch">[WFC: Element Type Match]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#elementvalid">[VC: Element Valid]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">This specification does not constrain the
application semantics, use, or (beyond syntax)
names of the element types and attributes, except that names beginning with
a match to <code xmlns="http://www.w3.org/1999/xhtml">(('X'|'x')('M'|'m')('L'|'l'))</code> are reserved for standardization
in this or future versions of this specification.</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="GIMatch" id="GIMatch"></a><b>Well-formedness constraint: Element Type Match</b></p><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
in an element's end-tag <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the element type in the start-tag.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="elementvalid" id="elementvalid"></a><b>Validity constraint: Element Valid</b></p><p xmlns="http://www.w3.org/1999/xhtml">An element is valid
if there is a declaration matching <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-elementdecl">elementdecl</a>
where the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> matches the element type, and one of
the following holds:</p><ol xmlns="http://www.w3.org/1999/xhtml" class="enumar"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The declaration matches <b xmlns="http://www.w3.org/1999/xhtml">EMPTY</b> and the element has no <a xmlns="http://www.w3.org/1999/xhtml" title="Content" href="#dt-content">content</a> (not even entity
references, comments, PIs or white space).</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The declaration matches <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-children">children</a> and the
sequence of <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">child elements</a> belongs
to the language generated by the regular expression in the content model,
with optional white space, comments and
PIs (i.e. markup matching production [27] <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Misc">Misc</a>) between the
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 or a reference
to an entity whose replacement text is character references expanding to white
space do not
match the nonterminal <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>, and
hence cannot appear in these positions; however, a
reference to an internal entity with a literal value consisting of character
references expanding to white space does match <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>, since its
replacement text is the white space resulting from expansion of the character
references.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The declaration matches <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Mixed">Mixed</a>, and the content
(after replacing
any entity references with their replacement text) consists of
<a xmlns="http://www.w3.org/1999/xhtml" title="Character Data" href="#dt-chardata">character data</a>
(including <a xmlns="http://www.w3.org/1999/xhtml" title="CDATA Section" href="#dt-cdsection">CDATA sections</a>),
<a xmlns="http://www.w3.org/1999/xhtml" title="Comment" href="#dt-comment">comments</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Processing instruction" href="#dt-pi">PIs</a> and <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">child elements</a> whose types match names in the
content model.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">The declaration matches <b xmlns="http://www.w3.org/1999/xhtml">ANY</b>, and the content (after replacing
any entity references with their replacement text)
consists of character data, <a xmlns="http://www.w3.org/1999/xhtml" title="CDATA Section" href="#dt-cdsection">CDATA
sections</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Comment" href="#dt-comment">comments</a>, <a xmlns="http://www.w3.org/1999/xhtml" title="Processing instruction" href="#dt-pi">PIs</a>
and <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">child elements</a>
whose types have been declared.</p></li></ol></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-starttags" id="sec-starttags"></a>3.1 Start-Tags, End-Tags, and Empty-Element Tags</h3><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-stag" id="dt-stag" title="Start-Tag">Definition</a>: The beginning of every non-empty
XML element is marked by a <b xmlns="http://www.w3.org/1999/xhtml">start-tag</b>.]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3d7a00" id="id0xd3d7a00"></a>Start-tag</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-STag" id="NT-STag"></a>[40] </td><td><code>STag</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Attribute">Attribute</a>)* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '>'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Attribute" id="NT-Attribute"></a>[41] </td><td><code>Attribute</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Eq">Eq</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a>
</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#ValueType">[VC: Attribute Value Type]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> in the start- and end-tags gives the element's <b xmlns="http://www.w3.org/1999/xhtml">type</b>. [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-attr" id="dt-attr" title="Attribute">Definition</a>: The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>-<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a>
pairs are referred to as the <b xmlns="http://www.w3.org/1999/xhtml">attribute specifications</b> of the
element], [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-attrname" id="dt-attrname" title="Attribute Name">Definition</a>: with the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> in each pair referred to as the <b xmlns="http://www.w3.org/1999/xhtml">attribute name</b>
]
and [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-attrval" id="dt-attrval" title="Attribute Value">Definition</a>: the content of the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a> (the text between the <code xmlns="http://www.w3.org/1999/xhtml">'</code> or <code xmlns="http://www.w3.org/1999/xhtml">"</code>
delimiters) as the <b xmlns="http://www.w3.org/1999/xhtml">attribute value</b>.] Note
that the order of attribute specifications in a start-tag or empty-element
tag is not significant.</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="uniqattspec" id="uniqattspec"></a><b>Well-formedness constraint: Unique Att Spec</b></p><p xmlns="http://www.w3.org/1999/xhtml">An attribute name
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear more than once in the same start-tag or empty-element tag.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="ValueType" id="ValueType"></a><b>Validity constraint: Attribute Value Type</b></p><p xmlns="http://www.w3.org/1999/xhtml">The attribute <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>
have been declared; the value <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be of the type declared for it. (For attribute
types, see <a xmlns="http://www.w3.org/1999/xhtml" href="#attdecls"><b>3.3 Attribute-List Declarations</b></a>.)</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="NoExternalRefs" id="NoExternalRefs"></a><b>Well-formedness constraint: No External Entity References</b></p><p xmlns="http://www.w3.org/1999/xhtml">Attribute
values <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> contain direct or indirect entity references to external entities.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="CleanAttrVals" id="CleanAttrVals"></a><b>Well-formedness constraint: No <code xmlns="http://www.w3.org/1999/xhtml"><</code> in Attribute Values</b></p><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" title="Replacement Text" href="#dt-repltext">replacement text</a> of any entity
referred to directly or indirectly in an attribute value <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> contain a <code xmlns="http://www.w3.org/1999/xhtml"><</code>.</p></div><p xmlns="http://www.w3.org/1999/xhtml">An example of a start-tag:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><termdef id="dt-dog" term="dog"></pre></div><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-etag" id="dt-etag" title="End Tag">Definition</a>: The end of every element that begins
with a start-tag <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be marked by an <b xmlns="http://www.w3.org/1999/xhtml">end-tag</b> containing a name
that echoes the element's type as given in the start-tag:]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3dd600" id="id0xd3dd600"></a>End-tag</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-ETag" id="NT-ETag"></a>[42] </td><td><code>ETag</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'</' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?
'>'</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">An example of an end-tag:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"></termdef></pre></div><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-content" id="dt-content" title="Content">Definition</a>: The <a xmlns="http://www.w3.org/1999/xhtml" title="Text" href="#dt-text">text</a>
between the start-tag and end-tag is called the element's <b xmlns="http://www.w3.org/1999/xhtml">content</b>:]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3deb80" id="id0xd3deb80"></a>Content of Elements</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-content" id="NT-content"></a>[43] </td><td><code>content</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CharData">CharData</a>? ((<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-element">element</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Reference">Reference</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CDSect">CDSect</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-PI">PI</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Comment">Comment</a>) <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-CharData">CharData</a>?)*</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-empty" id="dt-empty" title="Empty">Definition</a>: An element
with no <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-content">content</a> is said to be <b xmlns="http://www.w3.org/1999/xhtml">empty</b>.] The representation
of an empty element is either a start-tag immediately followed by an end-tag,
or an empty-element tag. [<a xmlns="http://www.w3.org/1999/xhtml" name="dt-eetag" id="dt-eetag" title="empty-element tag">Definition</a>: An <b xmlns="http://www.w3.org/1999/xhtml">empty-element
tag</b> takes a special form:]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3e0880" id="id0xd3e0880"></a>Tags for Empty Elements</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-EmptyElemTag" id="NT-EmptyElemTag"></a>[44] </td><td><code>EmptyElemTag</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Attribute">Attribute</a>)* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '/>'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#uniqattspec">[WFC: Unique Att Spec]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">Empty-element tags may be used for any element which has no content, whether
or not it is declared using the keyword <b xmlns="http://www.w3.org/1999/xhtml">EMPTY</b>. <a xmlns="http://www.w3.org/1999/xhtml" title="For interoperability" href="#dt-interop">For
interoperability</a>, the empty-element tag <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em>
be used, and <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> only be used, for elements which are declared
EMPTY.</p><p xmlns="http://www.w3.org/1999/xhtml">Examples of empty elements:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><IMG align="left"
src="http://www.w3.org/Icons/WWW/w3c_home" />
<br></br>
<br/></pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="elemdecls" id="elemdecls"></a>3.2 Element Type Declarations</h3><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" title="Element" href="#dt-element">element</a> structure of an <a xmlns="http://www.w3.org/1999/xhtml" title="XML Document" href="#dt-xml-doc">XML document</a> may, for <a xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml" title="Content" href="#dt-content">content</a>.</p><p xmlns="http://www.w3.org/1999/xhtml">Element type declarations often constrain which element types can appear
as <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">children</a> of the element. At user
option, an XML processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> issue a warning when a declaration mentions an
element type for which no declaration is provided, but this is not an error.</p><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-eldecl" id="dt-eldecl" title="Element Type declaration">Definition</a>: An <b xmlns="http://www.w3.org/1999/xhtml">element
type declaration</b> takes the form:]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3e3700" id="id0xd3e3700"></a>Element Type Declaration</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-elementdecl" id="NT-elementdecl"></a>[45] </td><td><code>elementdecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<!ELEMENT' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-contentspec">contentspec</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?
'>'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#EDUnique">[VC: Unique Element Type Declaration]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-contentspec" id="NT-contentspec"></a>[46] </td><td><code>contentspec</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'EMPTY' | 'ANY' | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Mixed">Mixed</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-children">children</a>
</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">where the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> gives the element type being declared.</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="EDUnique" id="EDUnique"></a><b>Validity constraint: Unique Element Type Declaration</b></p><p xmlns="http://www.w3.org/1999/xhtml">An element type <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> be declared more than once.</p></div><p xmlns="http://www.w3.org/1999/xhtml">Examples of element type declarations:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ELEMENT br EMPTY>
<!ELEMENT p (#PCDATA|emph)* >
<!ELEMENT %name.para; %content.para; >
<!ELEMENT container ANY></pre></div><div xmlns="http://www.w3.org/1999/xhtml" class="div3">
<h4 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-element-content" id="sec-element-content"></a>3.2.1 Element Content</h4><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-elemcontent" id="dt-elemcontent" title="Element content">Definition</a>: An element <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">type</a> has <b xmlns="http://www.w3.org/1999/xhtml">element content</b> when elements
of that type <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> contain only <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">child</a>
elements (no character data), optionally separated by white space (characters
matching the nonterminal <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>).]
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-content-model" id="dt-content-model" title="Content model">Definition</a>: In this case, the constraint includes a <b xmlns="http://www.w3.org/1999/xhtml">content
model</b>, a simple grammar governing the allowed types of the
child elements and the order in which they are allowed to appear.]
The grammar is built on content particles (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-cp">cp</a>s), which
consist of names, choice lists of content particles, or sequence lists of
content particles:</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3e6e80" id="id0xd3e6e80"></a>Element-content Models</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-children" id="NT-children"></a>[47] </td><td><code>children</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-choice">choice</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-seq">seq</a>)
('?' | '*' | '+')?</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-cp" id="NT-cp"></a>[48] </td><td><code>cp</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-choice">choice</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-seq">seq</a>) ('?' | '*' | '+')?</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-choice" id="NT-choice"></a>[49] </td><td><code>choice</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-cp">cp</a> ( <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '|' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-cp">cp</a> )+ <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ')'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-seq" id="NT-seq"></a>[50] </td><td><code>seq</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-cp">cp</a> ( <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ',' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-cp">cp</a> )* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ')'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">where each <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> is the type of an element which
may appear as a <a xmlns="http://www.w3.org/1999/xhtml" title="Parent/Child" href="#dt-parentchild">child</a>. Any content
particle in a choice list may appear in the <a xmlns="http://www.w3.org/1999/xhtml" title="Element content" href="#dt-elemcontent">element
content</a> at the location where the choice list appears in the grammar;
content particles occurring in a sequence list <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> each appear in the <a xmlns="http://www.w3.org/1999/xhtml" title="Element content" href="#dt-elemcontent">element content</a> in the order given in the list.
The optional character following a name or list governs whether the element
or the content particles in the list may occur one or more (<code xmlns="http://www.w3.org/1999/xhtml">+</code>),
zero or more (<code xmlns="http://www.w3.org/1999/xhtml">*</code>), or zero or one times (<code xmlns="http://www.w3.org/1999/xhtml">?</code>). The
absence of such an operator means that the element or content particle <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>
appear exactly once. This syntax and meaning are identical to those used in
the productions in this specification.</p><p xmlns="http://www.w3.org/1999/xhtml">The content of an element matches a content model if and only if it is
possible to trace out a path through the content model, obeying the sequence,
choice, and repetition operators and matching each element in the content
against an element type in the content model. <a xmlns="http://www.w3.org/1999/xhtml" title="For Compatibility" href="#dt-compat">For
compatibility</a>, it is an error if the content model
allows an element to match more than one occurrence of an element type in the
content model. For more information, see <a xmlns="http://www.w3.org/1999/xhtml" href="#determinism"><b>E Deterministic Content Models</b></a>.</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="vc-PEinGroup" id="vc-PEinGroup"></a><b>Validity constraint: Proper Group/PE Nesting</b></p><p xmlns="http://www.w3.org/1999/xhtml">Parameter-entity <a xmlns="http://www.w3.org/1999/xhtml" title="Replacement Text" href="#dt-repltext">replacement text</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be properly nested with parenthesized
groups. That is to say, if either of the opening or closing parentheses in
a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-choice">choice</a>, <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-seq">seq</a>, or <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Mixed">Mixed</a>
construct is contained in the replacement text for a <a xmlns="http://www.w3.org/1999/xhtml" title="Parameter-entity reference" href="#dt-PERef">parameter
entity</a>, both <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be contained in the same replacement text.</p><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" title="For interoperability" href="#dt-interop">For interoperability</a>, if a parameter-entity reference
appears in a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-choice">choice</a>, <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-seq">seq</a>, or <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Mixed">Mixed</a> construct, its replacement text <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> contain at
least one non-blank character, and neither the first nor last non-blank character
of the replacement text <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> be a connector (<code xmlns="http://www.w3.org/1999/xhtml">|</code> or <code xmlns="http://www.w3.org/1999/xhtml">,</code>).</p></div><p xmlns="http://www.w3.org/1999/xhtml">Examples of element-content models:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ELEMENT spec (front, body, back?)>
<!ELEMENT div1 (head, (p | list | note)*, div2*)>
<!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div3">
<h4 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-mixed-content" id="sec-mixed-content"></a>3.2.2 Mixed Content</h4><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-mixed" id="dt-mixed" title="Mixed Content">Definition</a>: An element <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">type</a>
has <b xmlns="http://www.w3.org/1999/xhtml">mixed content</b> when elements of that type may contain character
data, optionally interspersed with <a xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3ee180" id="id0xd3ee180"></a>Mixed-content Declaration</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Mixed" id="NT-Mixed"></a>[51] </td><td><code>Mixed</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '#PCDATA' (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?
'|' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>)* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>?
')*' </code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| '(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '#PCDATA' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ')' </code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#vc-PEinGroup">[VC: Proper Group/PE Nesting]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml">where the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>s give the types of elements that
may appear as children. The
keyword <b xmlns="http://www.w3.org/1999/xhtml">#PCDATA</b> derives historically from the term "parsed
character data."
</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="vc-MixedChildrenUnique" id="vc-MixedChildrenUnique"></a><b>Validity constraint: No Duplicate Types</b></p><p xmlns="http://www.w3.org/1999/xhtml">The
same name <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear more than once in a single mixed-content declaration.</p></div><p xmlns="http://www.w3.org/1999/xhtml">Examples of mixed content declarations:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
<!ELEMENT b (#PCDATA)></pre></div></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div2">
<h3 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="attdecls" id="attdecls"></a>3.3 Attribute-List Declarations</h3><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" title="Attribute" href="#dt-attr">Attributes</a> are used to associate name-value
pairs with <a xmlns="http://www.w3.org/1999/xhtml" title="Element" href="#dt-element">elements</a>. Attribute specifications
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear outside of <a xmlns="http://www.w3.org/1999/xhtml" title="Start-Tag" href="#dt-stag">start-tags</a> and <a xmlns="http://www.w3.org/1999/xhtml" title="empty-element tag" href="#dt-eetag">empty-element tags</a>; thus, the productions used to
recognize them appear in <a xmlns="http://www.w3.org/1999/xhtml" href="#sec-starttags"><b>3.1 Start-Tags, End-Tags, and Empty-Element Tags</b></a>. Attribute-list declarations
may be used:</p><ul xmlns="http://www.w3.org/1999/xhtml"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">To define the set of attributes pertaining to a given element type.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">To establish type constraints for these attributes.</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">To provide <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute Default" href="#dt-default">default values</a> for
attributes.</p></li></ul><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-attdecl" id="dt-attdecl" title="Attribute-List Declaration">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">Attribute-list
declarations</b> specify the name, data type, and default value (if any)
of each attribute associated with a given element type:]
</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3f2680" id="id0xd3f2680"></a>Attribute-list Declaration</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-AttlistDecl" id="NT-AttlistDecl"></a>[52] </td><td><code>AttlistDecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'<!ATTLIST' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttDef">AttDef</a>* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '>'</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-AttDef" id="NT-AttDef"></a>[53] </td><td><code>AttDef</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttType">AttType</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-DefaultDecl">DefaultDecl</a>
</code></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> in the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttlistDecl">AttlistDecl</a>
rule is the type of an element. At user option, an XML processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> issue
a warning if attributes are declared for an element type not itself declared,
but this is not an error. The <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> in the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttDef">AttDef</a>
rule is the name of the attribute.</p><p xmlns="http://www.w3.org/1999/xhtml">When more than one <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttlistDecl">AttlistDecl</a> is provided
for a given element type, the contents of all those provided are merged. When
more than one definition is provided for the same attribute of a given element
type, the first declaration is binding and later declarations are ignored. <a xmlns="http://www.w3.org/1999/xhtml" title="For interoperability" href="#dt-interop">For interoperability,</a> writers of DTDs may choose
to provide at most one attribute-list declaration for a given element type,
at most one attribute definition for a given attribute name in an attribute-list
declaration, and at least one attribute definition in each attribute-list
declaration. For interoperability, an XML processor <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> at user option
issue a warning when more than one attribute-list declaration is provided
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 xmlns="http://www.w3.org/1999/xhtml" class="div3">
<h4 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-attribute-types" id="sec-attribute-types"></a>3.3.1 Attribute Types</h4><p xmlns="http://www.w3.org/1999/xhtml">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 are more constrained.
The validity constraints noted in the grammar are applied after the attribute
value has been normalized as described in <a xmlns="http://www.w3.org/1999/xhtml" href="#AVNormalize"><b>3.3.3 Attribute-Value Normalization</b></a>.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3f5600" id="id0xd3f5600"></a>Attribute Types</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-AttType" id="NT-AttType"></a>[54] </td><td><code>AttType</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-StringType">StringType</a> | <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-TokenizedType">TokenizedType</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EnumeratedType">EnumeratedType</a>
</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-StringType" id="NT-StringType"></a>[55] </td><td><code>StringType</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'CDATA'</code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-TokenizedType" id="NT-TokenizedType"></a>[56] </td><td><code>TokenizedType</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'ID'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#id">[VC: ID]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#id-default">[VC: ID Attribute Default]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREF'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#idref">[VC: IDREF]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'IDREFS'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#idref">[VC: IDREF]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITY'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#entname">[VC: Entity Name]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'ENTITIES'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#entname">[VC: Entity Name]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKEN'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#nmtok">[VC: Name Token]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| 'NMTOKENS'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#nmtok">[VC: Name Token]</a></td></tr></tbody></table><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="id" id="id"></a><b>Validity constraint: ID</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of type <b xmlns="http://www.w3.org/1999/xhtml">ID</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> production. A name <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear more than once
in an XML document as a value of this type; i.e., ID values <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> uniquely
identify the elements which bear them.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="one-id-per-el" id="one-id-per-el"></a><b>Validity constraint: One ID per Element Type</b></p><p xmlns="http://www.w3.org/1999/xhtml">An element type <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> have more than one ID attribute specified.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="id-default" id="id-default"></a><b>Validity constraint: ID Attribute Default</b></p><p xmlns="http://www.w3.org/1999/xhtml">An ID attribute
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> have a declared default of <b xmlns="http://www.w3.org/1999/xhtml">#IMPLIED</b> or <b xmlns="http://www.w3.org/1999/xhtml">#REQUIRED</b>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="idref" id="idref"></a><b>Validity constraint: IDREF</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of type <b xmlns="http://www.w3.org/1999/xhtml">IDREF</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>
match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> production, and values of type <b xmlns="http://www.w3.org/1999/xhtml">IDREFS</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Names">Names</a>; each <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the value of an ID attribute on some element in the XML document;
i.e. <b xmlns="http://www.w3.org/1999/xhtml">IDREF</b> values <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the value of some ID attribute.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="entname" id="entname"></a><b>Validity constraint: Entity Name</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of type <b xmlns="http://www.w3.org/1999/xhtml">ENTITY</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> production, values of type <b xmlns="http://www.w3.org/1999/xhtml">ENTITIES</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Names">Names</a>; each <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the name of an <a xmlns="http://www.w3.org/1999/xhtml" title="Unparsed Entity" href="#dt-unparsed">unparsed entity</a>
declared in the <a xmlns="http://www.w3.org/1999/xhtml" title="Document Type Declaration" href="#dt-doctype">DTD</a>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="nmtok" id="nmtok"></a><b>Validity constraint: Name Token</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of type <b xmlns="http://www.w3.org/1999/xhtml">NMTOKEN</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> production; values of type <b xmlns="http://www.w3.org/1999/xhtml">NMTOKENS</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtokens">Nmtokens</a>.</p></div><p xmlns="http://www.w3.org/1999/xhtml">
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-enumerated" id="dt-enumerated" title="Enumerated Attribute Values">Definition</a>:
<b xmlns="http://www.w3.org/1999/xhtml">Enumerated attributes</b>
have a list of allowed values in their declaration
]. They <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> take one of those values. There are two kinds of enumerated attribute types:</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd3fd700" id="id0xd3fd700"></a>Enumerated Attribute Types</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-EnumeratedType" id="NT-EnumeratedType"></a>[57] </td><td><code>EnumeratedType</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NotationType">NotationType</a>
| <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Enumeration">Enumeration</a>
</code></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-NotationType" id="NT-NotationType"></a>[58] </td><td><code>NotationType</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'NOTATION' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a> '(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> (<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '|' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a>)* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ')' </code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#notatn">[VC: Notation Attributes]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#OneNotationPer">[VC: One Notation Per Element Type]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoNotationEmpty">[VC: No Notation on Empty Element]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoDuplicateTokens">[VC: No Duplicate Tokens]</a></td></tr></tbody><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-Enumeration" id="NT-Enumeration"></a>[59] </td><td><code>Enumeration</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'(' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a>
(<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? '|' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a>)* <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>? ')'</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#enum">[VC: Enumeration]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoDuplicateTokens">[VC: No Duplicate Tokens]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">A <b xmlns="http://www.w3.org/1999/xhtml">NOTATION</b> attribute identifies a <a xmlns="http://www.w3.org/1999/xhtml" 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 xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="notatn" id="notatn"></a><b>Validity constraint: Notation Attributes</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of this type
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match one of the <a xmlns="http://www.w3.org/1999/xhtml" href="#Notations"><cite>notation</cite></a> names
included in the declaration; all notation names in the declaration <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be
declared.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="OneNotationPer" id="OneNotationPer"></a><b>Validity constraint: One Notation Per Element Type</b></p><p xmlns="http://www.w3.org/1999/xhtml">An element type <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> have more than one <b xmlns="http://www.w3.org/1999/xhtml">NOTATION</b>
attribute specified.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="NoNotationEmpty" id="NoNotationEmpty"></a><b>Validity constraint: No Notation on Empty Element</b></p><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" title="For Compatibility" href="#dt-compat">For compatibility</a>,
an attribute of type <b xmlns="http://www.w3.org/1999/xhtml">NOTATION</b>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> be declared on an element
declared <b xmlns="http://www.w3.org/1999/xhtml">EMPTY</b>.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="NoDuplicateTokens" id="NoDuplicateTokens"></a><b>Validity constraint: No Duplicate Tokens</b></p><p xmlns="http://www.w3.org/1999/xhtml">The notation names in a single <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NotationType">NotationType</a>
attribute declaration, as well as the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">NmToken</a>s in a single
<a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Enumeration">Enumeration</a> attribute declaration, <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> all be distinct.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="enum" id="enum"></a><b>Validity constraint: Enumeration</b></p><p xmlns="http://www.w3.org/1999/xhtml">Values of this type <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match
one of the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> tokens in the declaration.</p></div><p xmlns="http://www.w3.org/1999/xhtml">
<a xmlns="http://www.w3.org/1999/xhtml" title="For interoperability" href="#dt-interop">For interoperability,</a> the same <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a>
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">SHOULD NOT</em> occur more than once in the enumerated
attribute types of a single element type.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="div3">
<h4 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="sec-attr-defaults" id="sec-attr-defaults"></a>3.3.2 Attribute Defaults</h4><p xmlns="http://www.w3.org/1999/xhtml">An <a xmlns="http://www.w3.org/1999/xhtml" title="Attribute-List Declaration" href="#dt-attdecl">attribute declaration</a> provides information
on whether the attribute's presence is <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">REQUIRED</em>, and if not, how an XML processor
is to react if a declared attribute is absent in a document.</p>
<h5 xmlns="http://www.w3.org/1999/xhtml"><a xmlns="http://www.w3.org/1999/xhtml" name="id0xd404500" id="id0xd404500"></a>Attribute Defaults</h5><table xmlns="http://www.w3.org/1999/xhtml" class="scrap" summary="Scrap"><tbody xmlns="http://www.w3.org/1999/xhtml"><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td><a name="NT-DefaultDecl" id="NT-DefaultDecl"></a>[60] </td><td><code>DefaultDecl</code></td><td> ::= </td><td xmlns="http://www.w3.org/1999/xhtml"><code>'#REQUIRED' | '#IMPLIED' </code></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td><code>| (('#FIXED' <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-S">S</a>)? <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a>)</code></td><td xmlns="http://www.w3.org/1999/xhtml"><a href="#RequiredAttr">[VC: Required Attribute]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#defattrvalid">[VC: Attribute Default Value Syntactically Correct]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#CleanAttrVals">[WFC: No < in Attribute Values]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#FixedAttr">[VC: Fixed Attribute Default]</a></td></tr><tr xmlns="http://www.w3.org/1999/xhtml" valign="baseline"><td></td><td></td><td></td><td></td><td><a href="#NoExternalRefs">[WFC: No External Entity References]</a></td></tr></tbody></table><p xmlns="http://www.w3.org/1999/xhtml">In an attribute declaration, <b xmlns="http://www.w3.org/1999/xhtml">#REQUIRED</b> means that the attribute
<em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> always be provided, <b xmlns="http://www.w3.org/1999/xhtml">#IMPLIED</b> that no default value is provided.
[<a xmlns="http://www.w3.org/1999/xhtml" name="dt-default" id="dt-default" title="Attribute Default">Definition</a>: If
the declaration is neither <b xmlns="http://www.w3.org/1999/xhtml">#REQUIRED</b> nor <b xmlns="http://www.w3.org/1999/xhtml">#IMPLIED</b>, then
the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-AttValue">AttValue</a> value contains the declared <b xmlns="http://www.w3.org/1999/xhtml">default</b>
value; the <b xmlns="http://www.w3.org/1999/xhtml">#FIXED</b> keyword states that the attribute <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> always have
the default value.
When an XML processor encounters
an element
without a specification for an attribute for which it has read a default
value declaration, it <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> report the attribute with the declared default
value to the application.]
</p><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="RequiredAttr" id="RequiredAttr"></a><b>Validity constraint: Required Attribute</b></p><p xmlns="http://www.w3.org/1999/xhtml">If the default
declaration is the keyword <b xmlns="http://www.w3.org/1999/xhtml">#REQUIRED</b>, then the attribute <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be
specified for all elements of the type in the attribute-list declaration.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="defattrvalid" id="defattrvalid"></a><b>Validity constraint: Attribute Default Value Syntactically Correct</b></p><p xmlns="http://www.w3.org/1999/xhtml">The declared default value <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> meet the syntactic
constraints of the declared attribute type. That is, the default value of an attribute:
</p><ul xmlns="http://www.w3.org/1999/xhtml"><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
of type IDREF or ENTITY must match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Name">Name</a> production;</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
of type IDREFS or ENTITIES must match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Names">Names</a> production;</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
of type NMTOKEN must match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtoken">Nmtoken</a> production;</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
of type NMTOKENS must match the <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Nmtokens">Nmtokens</a> production;</p></li><li xmlns="http://www.w3.org/1999/xhtml"><p xmlns="http://www.w3.org/1999/xhtml">
of an <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-EnumeratedType">enumerated type</a> (either a <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-NotationType">NOTATION</a> type or an <a xmlns="http://www.w3.org/1999/xhtml" href="#NT-Enumeration">enumeration</a>) must match one of the enumerated values.</p></li></ul><p xmlns="http://www.w3.org/1999/xhtml">Note that only the
syntactic constraints of the type are required here; other constraints (e.g.
that the value be the name of a declared unparsed entity, for an attribute of
type ENTITY) will be reported by a validating
parser only if an element without a specification for this attribute
actually occurs.</p></div><div xmlns="http://www.w3.org/1999/xhtml" class="constraint"><p xmlns="http://www.w3.org/1999/xhtml" class="prefix"><a name="FixedAttr" id="FixedAttr"></a><b>Validity constraint: Fixed Attribute Default</b></p><p xmlns="http://www.w3.org/1999/xhtml">If an attribute
has a default value declared with the <b xmlns="http://www.w3.org/1999/xhtml">#FIXED</b> keyword, instances of
that attribute <em xmlns="http://www.w3.org/1999/xhtml" class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match the default value.</p></div><p xmlns="http://www.w3.org/1999/xhtml">Examples of attribute-list declarations:</p><div xmlns="http://www.w3.org/1999/xhtml" class="exampleInner"><pre xmlns="http://www.w3.org/1999/xhtml"><!ATTLIST termdef
id ID #REQUIRED
name CDATA #IMPLIED>
<!ATTLIST list
type (bullets|ordered|glossary) "ordered">
<!ATTLIST form
method CDATA #FIXED "POST"></pre></div></div><div xmlns="http://www.w3.org/1999/xhtml" class="div3">