File: ch01.html

package info (click to toggle)
xae 1.0beta6-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,184 kB
  • ctags: 12,210
  • sloc: java: 27,149; xml: 20,864; lisp: 12,921; perl: 1,054; sh: 237; makefile: 169
file content (2686 lines) | stat: -rw-r--r-- 52,256 bytes parent folder | download | duplicates (2)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
<HTML
><HEAD
><TITLE
>Getting Startedwith SGML/XML</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.45"><LINK
REL="HOME"
TITLE="DocBook"
HREF="docbook.html"><LINK
REL="UP"
TITLE="Introduction"
HREF="part1.html"><LINK
REL="PREVIOUS"
TITLE="Introduction"
HREF="part1.html"><LINK
REL="NEXT"
TITLE="Creating DocBook Documents"
HREF="ch02.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="dbtdg.css"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DocBook: The Definitive Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="part1.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="ch02.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="CH-GSSGML"
>Chapter 1. Getting Startedwith <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
></A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1.1. <A
HREF="ch01.html#AEN280"
><SPAN
CLASS="ACRONYM"
>HTML</SPAN
> and <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> vs. <SPAN
CLASS="ACRONYM"
>XML</SPAN
></A
></DT
><DT
>1.2. <A
HREF="ch01.html#S1-BASIC-CONCEPTS"
>Basic <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> Concepts</A
></DT
><DT
>1.3. <A
HREF="ch01.html#AEN642"
>Elements and Attributes</A
></DT
><DT
>1.4. <A
HREF="ch01.html#S-ENTITIES"
>Entities</A
></DT
><DT
>1.5. <A
HREF="ch01.html#AEN958"
>How Does DocBook Fit In?</A
></DT
></DL
></DIV
><P
><A
NAME="GETSTARTSGML"
></A
>
<A
NAME="XMLGETSTART"
></A
>

This chapter is intended to provide a quick introduction to structured
markup (<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
>). If you're already familiar with <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> or
<SPAN
CLASS="ACRONYM"
>XML</SPAN
>, you only need to skim this chapter.</P
><P
>To work with DocBook, you need to understand a few basic concepts of
structured editing in general, and DocBook, in particular. That's
covered here. You also need some concrete experience with the way a
DocBook document is structured. That's covered in the next chapter.</P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN280"
>1.1. <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> and <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> vs. <SPAN
CLASS="ACRONYM"
>XML</SPAN
></A
></H1
><P
><A
NAME="AEN286"
></A
>
<A
NAME="AEN289"
></A
>
<A
NAME="AEN292"
></A
>

This chapter doesn't assume that you know what <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> is, but if you
do, you have a starting point for understanding structured
markup. <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> (Hypertext Markup Language) is a way of marking up text
and graphics so that the most popular web browsers can interpret
them. <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> consists of a set of markup tags with specific
meanings. Moreover, <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> is a very basic type of <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> markup that
is easy to learn and easy for computer applications to generate. But
the simplicity of <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> is both its virtue and its weakness. Because
of <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>'s limitations, web users and programmers have had to extend
and enhance it by a series of customizations and revisions that still
fall short of accommodating current, to say nothing of future, needs.</P
><P
>&#13;
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, on the other hand, is an international standard that describes
how markup languages are defined. <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> does not consist of
particular tags or the rules for their usage. <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> is an example of
a markup language defined in <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>.</P
><P
><A
NAME="AEN308"
></A
>

<SPAN
CLASS="ACRONYM"
>XML</SPAN
> promises an intelligent improvement over <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>, and
compatibility with it is already being built into the most popular web
browsers. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> is not a new markup language designed to compete with
<SPAN
CLASS="ACRONYM"
>HTML</SPAN
>, and it's not designed to create conversion headaches for people
with tons of <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> documents. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> is intended to alleviate
compatibility problems with browser software; it's a new, easier
version of the standard rules that govern the markup itself, or, in
other words, a new version of <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>. The rules of <SPAN
CLASS="ACRONYM"
>XML</SPAN
> are designed
to make it easier to write both applications that interpret its type
of markup and applications that generate its markup. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> was
developed by a team of <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> experts who understood and sought to
correct the problems of learning and implementing <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> is
also <I
CLASS="EMPHASIS"
>extensible</I
> markup, which means that it is
customizable. A browser or word processor that is <SPAN
CLASS="ACRONYM"
>XML</SPAN
>-capable will
be able to read any <SPAN
CLASS="ACRONYM"
>XML</SPAN
>-based markup language that an individual
user defines.</P
><P
>In this book, we tend to describe things in terms of <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, but where
there are differences between <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
> (and there are only a
few), we point them out. For our purposes, it doesn't really matter
whether you use <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> or <SPAN
CLASS="ACRONYM"
>XML</SPAN
>.</P
><P
>During the coming months, we anticipate that <SPAN
CLASS="ACRONYM"
>XML</SPAN
>-aware web browsers
and other tools will become available. Nevertheless, it's not
unreasonable to do your authoring in <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and your online publishing
in <SPAN
CLASS="ACRONYM"
>XML</SPAN
> or <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>. By the same token, it's not unreasonable to do
your authoring in <SPAN
CLASS="ACRONYM"
>XML</SPAN
>.</P
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="S1-BASIC-CONCEPTS"
>1.2. Basic <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> Concepts</A
></H1
><P
><A
NAME="SGMLBASICCONCEPTCH01"
></A
>
<A
NAME="XMLBASICCONCEPTCH01"
></A
>

<A
NAME="AEN349"
></A
>
<A
NAME="AEN352"
></A
>

Here are the basic <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> concepts you need to grasp:</P
><P
></P
><UL
><LI
><P
>structured, semantic markup</P
></LI
><LI
><P
>elements</P
></LI
><LI
><P
>attributes</P
></LI
><LI
><P
>entities</P
></LI
></UL
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN366"
>1.2.1. Structured and Semantic Markup</A
></H2
><P
><A
NAME="AEN369"
></A
>
<A
NAME="AEN372"
></A
>
<A
NAME="AEN374"
></A
>

An essential characteristic of structured markup is that it explicitly
distinguishes (and accordingly "marks up" within a
document) the structure and semantic content of a document. It does
not mark up the way in which the document will appear to the reader,
in print or otherwise.</P
><P
>In the days before word processors it was common for a typed
manuscript to be submitted to a publisher. The manuscript identified
the logical structures of the documents (chapters, section titles, and
so on), but said nothing about its appearance. Working independently
of the author, a designer then developed a specification for the
appearance of the document, and a typesetter marked up and applied the
designer's format to the document.</P
><P
><A
NAME="AEN378"
></A
>
<A
NAME="AEN381"
></A
>

Because presentation or appearance is usually based on structure and
content, <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> markup logically precedes and generally determines the
way a document will look to a reader. If you are familiar with strict,
simple <SPAN
CLASS="ACRONYM"
>HTML</SPAN
> markup, you know that a given document that is
structurally the same can also look different on different
computers. That's because the markup does not specify many aspects of
a document's appearance, although it does specify many aspects of a
document's structure.</P
><P
><A
NAME="AEN387"
></A
>
<A
NAME="AEN390"
></A
>
Many writers type their text into a word processor, line-by-line and
word-for-word, italicizing technical terms, underlining words for
emphasis, or setting section headers in a font complementary to the
body text, and finally, setting the headers off with a few carriage
returns fore and aft. The format such a writer imposes on the words on
the screen imparts structure to the document by changing its
appearance in ways that a reader can more or less reliably decode.
The reliability depends on how consistently and unambiguously the
changes in type and layout are made. By contrast, an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
>
markup of a section header explicitly specifies that a specific piece
of text is a section header. This assertion does not specify the
presentation or appearance of the section header, but it makes the
fact that the text is a section header completely unambiguous.</P
><P
><A
NAME="AEN395"
></A
>
<A
NAME="AEN398"
></A
>
<A
NAME="AEN401"
></A
>
<A
NAME="AEN403"
></A
>
<A
NAME="AEN407"
></A
>
<A
NAME="AEN409"
></A
>
<A
NAME="AEN412"
></A
>

<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
> use named elements, delimited by angle brackets
("&lt;" and "&#62;") to identify the markup in a
document. In DocBook, a top-level section is <TT
CLASS="SGMLTAG"
><NOBR
>&#60;sect1&#62;</NOBR
></TT
>, so the title of a top-level section
named <I
CLASS="EMPHASIS"
>My First-Level Header</I
> would be identified
like this:</P
><PRE
CLASS="SCREEN"
>&lt;sect1&#62;&lt;title&#62;My First-Level Header&lt;/title&#62; </PRE
><P
>Note the following features of this markup:</P
><P
></P
><DL
><DT
><B
>Clarity</B
></DT
><DD
><P
>A title begins with <TT
CLASS="SGMLTAG"
><NOBR
>&#60;title&#62;</NOBR
></TT
> and ends with <TT
CLASS="SGMLTAG"
>&#60;/title&#62;</TT
>. The <A
HREF="sect1.html"
><TT
CLASS="SGMLTAG"
>sect1</TT
></A
> also has
an ending <TT
CLASS="SGMLTAG"
>&#60;/sect1&#62;</TT
>, but we haven't
shown the whole section so it's not visible.</P
></DD
><DT
><B
>Hierarchy</B
></DT
><DD
><P
>"My First-Level
Header" is the title of a top-level section because it occurs
inside a title in a <A
HREF="sect1.html"
><TT
CLASS="SGMLTAG"
>sect1</TT
></A
>. A
<A
HREF="title.html"
><TT
CLASS="SGMLTAG"
>title</TT
></A
> element occurring somewhere else, say in a
<A
HREF="chapter.html"
><TT
CLASS="SGMLTAG"
>Chapter</TT
></A
> element, would be the title of the
chapter.</P
></DD
><DT
><B
>Plain text</B
></DT
><DD
><P
><SPAN
CLASS="ACRONYM"
>SGML</SPAN
> documents can have varying character sets, but
most are <SPAN
CLASS="ACRONYM"
>ASCII</SPAN
>. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> documents use the Unicode
character set. This makes <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
> documents highly portable
across systems and tools.</P
></DD
></DL
><P
><A
NAME="AEN447"
></A
>
<A
NAME="AEN450"
></A
>
<A
NAME="AEN453"
></A
>
<A
NAME="AEN456"
></A
>

In an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> document, there is no obligatory difference between the
size or face of the type in a first-level section header and the title
of a book in a footnote or the first sentence of a body paragraph. All
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> files are simple text files without font changes or special
characters.<A
NAME="AEN460"
HREF="#FTN.AEN460"
>[1]</A
> Similarly, an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> document
does not specify the words in a text that are to be set in italic,
bold, or roman type. Instead, <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> marks certain kinds of texts for
their semantic content. For example, if a particular word is the name
of a file, then the tags around it should specify that it is a
filename:</P
><PRE
CLASS="SCREEN"
>Many mail programs read configuration information from the
users <TT
CLASS="SGMLTAG"
><NOBR
>&#60;filename&#62;</NOBR
></TT
>.mailrc<TT
CLASS="SGMLTAG"
>&#60;/filename&#62;</TT
> file.</PRE
><P
><A
NAME="AEN470"
></A
>
<A
NAME="AEN473"
></A
>
<A
NAME="AEN476"
></A
>
<A
NAME="AEN478"
></A
>
<A
NAME="AEN480"
></A
>
<A
NAME="AEN483"
></A
>
<A
NAME="AEN485"
></A
>

If the meaning of a phrase is particularly audacious, it might get
tagged for boldness of thought instead of appearance. An <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>
document contains all the information that a typesetter needs to lay
out and typeset a printed page in the most effective and consistent
way, but it does not specify the layout or the
type.<A
NAME="AEN489"
HREF="#FTN.AEN489"
>[2]</A
></P
><P
><A
NAME="AEN499"
></A
>
<A
NAME="AEN502"
></A
>
<A
NAME="AEN505"
></A
>
<A
NAME="AEN508"
></A
>
<A
NAME="AEN512"
></A
>
<A
NAME="AEN514"
></A
>
<A
NAME="AEN516"
></A
>


Not only is the structure of an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> document explicit, but it
is also carefully controlled. An <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> document makes reference to a
set of declarations--a document type definition
(<SPAN
CLASS="ACRONYM"
>DTD</SPAN
>)--that contains an inventory of tag names and specifies
the combination rules for the various structural and semantic features
that make up a document. What the distinctive features are and how
they should be combined is "arbitrary" in the sense that
almost any selection of features and rules of composition is
theoretically possible. The DocBook <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> chooses a particular set of
features and rules for its users.</P
><P
><A
NAME="AEN526"
></A
>
Here is a specific example of how the DocBook <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> works. DocBook
specifies that a third-level section can follow a second-level section
but cannot follow a first-level section without an intervening
second-level section.</P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="240"
ALIGN="LEFT"
VALIGN="TOP"
><P
>This is valid:</P
><PRE
CLASS="SCREEN"
>&lt;sect1&#62;&lt;title&#62;...&lt;/title&#62;
  &lt;sect2&#62;&lt;title&#62;...&lt;/title&#62;
    &lt;sect3&#62;&lt;title&#62;...&lt;/title&#62;
      ...
    &lt;/sect3&#62;
  &lt;/sect2&#62;
&lt;/sect1&#62;</PRE
></TD
><TD
WIDTH="240"
ALIGN="LEFT"
VALIGN="TOP"
><P
>This is not:</P
><PRE
CLASS="SCREEN"
>&lt;sect1&#62;&lt;title&#62;...&lt;/title&#62;
  &lt;sect3&#62;&lt;title&#62;...&lt;/title&#62;
    ...
  &lt;/sect3&#62;
&lt;/sect1&#62;</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><P
><A
NAME="AEN543"
></A
>
<A
NAME="AEN546"
></A
>
<A
NAME="AEN549"
></A
>
<A
NAME="AEN552"
></A
>

Because an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> document has an associated <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> that
describes the valid, logical structures of the document, you can test
the logical structure of any particular document against the
<SPAN
CLASS="ACRONYM"
>DTD</SPAN
>. This process is performed by a <I
CLASS="FIRSTTERM"
>parser</I
>. An
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> processor must begin by parsing the document and determining if
it is valid, that is, if it conforms to the rules specified in the
<SPAN
CLASS="ACRONYM"
>DTD</SPAN
>. <SPAN
CLASS="ACRONYM"
>XML</SPAN
> processors are not required to
check for validity, but it's always a good idea to check for validity
when authoring. Because you can test and validate the
structure of an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> document with software, a DocBook
document containing a first-level section followed immediately by a
third-level section will be identified as invalid, meaning that it's
not a valid <I
CLASS="FIRSTTERM"
>instance</I
> or example of a document
defined by the DocBook <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>. Presumably, a document with a logical
structure won't normally jump from a first- to a third-level section,
so the rule is a safeguard--but not a guarantee--of good
writing, or at the very least, reasonable structure. A parser also
verifies that the names of the tags are correct and that tags
requiring an ending tag have them. This means that a valid document is
also one that should format correctly, without runs of paragraphs
incorrectly appearing in bold type or similar monstrosities that
everyone has seen in print at one time or another. For more
information about <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> parsers, see <A
HREF="ch03.html"
>Chapter 3</A
>.</P
><P
>In general, adherence to the explicit rules of structure and markup in
a <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> is a useful and reassuring guarantee of consistency and
reliability within documents, across document sets, and over
time. This makes <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> markup particularly desirable to
corporations or governments that have large sets of documents to
manage, but it is a boon to the individual writer as well.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN573"
>1.2.1.1. How can this markup help you?</A
></H3
><P
><A
NAME="AEN576"
></A
>
Semantic markup makes your documents more amenable to interpretation
by software, especially publishing software. You can publish a white
paper, authored as a DocBook <A
HREF="article.html"
><TT
CLASS="SGMLTAG"
>Article</TT
></A
>, in the
following formats:
<A
NAME="AEN580"
></A
>
<A
NAME="AEN583"
></A
>&#13;</P
><P
></P
><UL
><LI
><P
>On the Web in <SPAN
CLASS="ACRONYM"
>HTML</SPAN
></P
></LI
><LI
><P
>As a standalone document on 8&frac12;&times;11 paper</P
></LI
><LI
><P
>As part of a quarterly journal, in a 6&times;9 format</P
></LI
><LI
><P
>In Braille</P
></LI
><LI
><P
>In audio</P
></LI
></UL
><P
>You can produce each of these publications from exactly the same
source document using the presentational techniques best suited to
both the content of the document and the presentation medium. This
versatility also frees the author to concentrate on the document
content. For example, as we write this book, we don't know exactly how
O'Reilly will choose to present chapter headings, bulleted lists,
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> terms, or any of the other semantic features. And we don't
care. It's irrelevant; whatever presentation is chosen, the <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>
sources will be transformed automatically into that style.</P
><P
>Semantic markup can relieve the author of other, more significant
burdens as well (after all, careful use of paragraph and character
styles in a word processor document theoretically allows us to change
the presentation independently from the document). Using semantic
markup opens up your documents to a world of possibilities. Documents
become, in a loose sense, databases of information. Programs can
compile, retrieve, and otherwise manipulate the documents in
predictable, useful ways.</P
><P
><A
NAME="AEN602"
></A
>
<A
NAME="AEN605"
></A
>

Consider the online version of this book: almost every element name
(<A
HREF="article.html"
><TT
CLASS="SGMLTAG"
>Article</TT
></A
>, <A
HREF="book.html"
><TT
CLASS="SGMLTAG"
>Book</TT
></A
>, and so on) is a
hyperlink to the reference page that describes that
element. Maintaining these links by hand would be tedious and might be
unreliable, as well. Instead, every element name is marked as an
element using <A
HREF="sgmltag.html"
><TT
CLASS="SGMLTAG"
>SGMLTag</TT
></A
>: a <A
HREF="book.html"
><TT
CLASS="SGMLTAG"
>Book</TT
></A
> is
a <TT
CLASS="LITERAL"
><TT
CLASS="SGMLTAG"
><NOBR
>&#60;sgmltag&#62;</NOBR
></TT
>Book<TT
CLASS="SGMLTAG"
>&#60;/sgmltag&#62;</TT
></TT
>.</P
><P
>Because each element name in this book is tagged semantically, the
program that produces the online version can determine which
occurrences of the word "book" in the text are actually
references to the <A
HREF="book.html"
><TT
CLASS="SGMLTAG"
>Book</TT
></A
> element. The program can
then automatically generate the appropriate hyperlink when it should.</P
><P
>There's one last point to make about the versatility of <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>
documents: how much you have depends on the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>. If you take a good
photo with a high resolution lens, you can print it and copy it and
scan it and put it on the Web, and it will look good. If you start
with a low-resolution picture it will not survive those
transformations so well. DocBook <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> has this advantage over,
say, <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>: DocBook has specific and unambiguous semantic and
structural markup, because you can convert its documents with ease
into other presentational forms, and search them more precisely. If
you start with <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>, whose markup is at a lower resolution than
DocBook's, your versatility and searchability is substantially
restricted and cannot be improved.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN624"
>1.2.1.2. What are the shortcomings to structural authoring?</A
></H3
><P
>There are a few significant shortcomings to structured authoring:</P
><P
></P
><UL
><LI
><P
>It requires a significant change in the authoring
process. Writing structured documents is very different from writing
with a typical word processor, and change is difficult. In particular,
authors don't like giving up control over the appearance of their
words especially now that they have acquired it with the advent of
word processors. But many publishing companies need authors to
relinquish that control, because book design and production remains
their job, not their authors'.</P
></LI
><LI
><P
>Because semantics are separate from appearance, in
order to publish an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> document, a stylesheet or other tool
must create the presentational form from the structural form. Writing
stylesheets is a skill in its own right, and though not every author
among a group of authors has to learn how to write them, someone has
to.</P
></LI
><LI
><P
>Authoring tools for <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> documents can generally be
pretty expensive. While it's not entirely unreasonable to edit
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> documents with a simple text editor, it's a bit tedious
to do so. However, there are a few free tools that are
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
>-aware. The widespread interest in <SPAN
CLASS="ACRONYM"
>XML</SPAN
> may well produce new,
clever, and less expensive <SPAN
CLASS="ACRONYM"
>XML</SPAN
> editing tools.</P
></LI
></UL
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN642"
>1.3. Elements and Attributes</A
></H1
><P
><A
NAME="AEN645"
></A
>
<A
NAME="AEN648"
></A
>
<A
NAME="AEN651"
></A
>
<A
NAME="AEN655"
></A
>
<A
NAME="AEN657"
></A
>
<A
NAME="AEN660"
></A
>
<A
NAME="AEN662"
></A
>

<SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> markup consists primarily of
<I
CLASS="FIRSTTERM"
>elements</I
>, <I
CLASS="FIRSTTERM"
>attributes</I
>,
and <I
CLASS="FIRSTTERM"
>entities</I
>. Elements are the terms we have
been speaking about most, like <A
HREF="sect1.html"
><TT
CLASS="SGMLTAG"
>sect1</TT
></A
>, that describe
a document's content and structure. Most elements come in pairs and
mark the start and end of the construct they surround--for
example, the <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> source for this particular paragraph begins with a
<TT
CLASS="SGMLTAG"
><NOBR
>&#60;para&#62;</NOBR
></TT
> tag and ends with a <TT
CLASS="SGMLTAG"
>&#60;/para&#62;</TT
> tag. Some elements are
"empty" (such as DocBook's cross-reference element,
<TT
CLASS="SGMLTAG"
><NOBR
>&#60;xref&#62;</NOBR
></TT
>) and require no end
tag.<A
NAME="AEN675"
HREF="#FTN.AEN675"
>[3]</A
></P
><P
><A
NAME="AEN681"
></A
>
<A
NAME="AEN684"
></A
>
<A
NAME="AEN687"
></A
>
<A
NAME="AEN690"
></A
>

Elements can, but don't necessarily, include one or more attributes,
which are additional terms that extend the function or refine the
content of a given element. For instance, in DocBook a <TT
CLASS="SGMLTAG"
><NOBR
>&#60;sect1&#62;</NOBR
></TT
> start tag can contain an
identifier--an <SPAN
CLASS="SGMLTAG"
>id</SPAN
>
attribute--that will ultimately allow the writer to
cross-reference it or enable a reader to retrieve it. End tags cannot
contain attributes. A <TT
CLASS="SGMLTAG"
><NOBR
>&#60;sect1&#62;</NOBR
></TT
>
element with an <SPAN
CLASS="SGMLTAG"
>id</SPAN
> attribute
looks like this:</P
><PRE
CLASS="SCREEN"
>&lt;sect1 id="<TT
CLASS="REPLACEABLE"
><I
>idvalue</I
></TT
>"&gt;</PRE
><P
><A
NAME="AEN700"
></A
>
<A
NAME="AEN703"
></A
>
<A
NAME="AEN706"
></A
>
<A
NAME="AEN709"
></A
>

In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, the catalog of attributes that can occur on an element is
predefined. You cannot add arbitrary attribute names to an
element. Similarly, the values allowed for each attribute are
predefined. In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, the use of <A
HREF="http://www.w3.org/TR/REC-xml-names/"
TARGET="_top"
>namespaces</A
> may allow you
to add additional attributes to an element, but as of this writing,
there's no way to perform validation on those attributes.</P
><P
><A
NAME="AEN716"
></A
>
<A
NAME="AEN719"
></A
>

The <SPAN
CLASS="SGMLTAG"
>id</SPAN
> attribute is one half of a
cross reference. An <SPAN
CLASS="SGMLTAG"
>idref</SPAN
>
attribute on another element, for example <TT
CLASS="SGMLTAG"
><NOBR
>&#60;xref linkend="idvalue"&#62;</NOBR
></TT
>, provides the other half. These attributes provide whatever
application might process the <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> source with the data needed
either to make a hypertext link or to substitute a named and/or numbered cross
reference in place of the <TT
CLASS="SGMLTAG"
><NOBR
>&#60;xref&#62;</NOBR
></TT
>. Another use for attributes is to specify subclasses of
certain elements. For instance, you can subdivide DocBook's <TT
CLASS="SGMLTAG"
><NOBR
>&#60;systemitem&#62;</NOBR
></TT
> into <SPAN
CLASS="ACRONYM"
>URL</SPAN
>s and
email addresses by making the content of the <SPAN
CLASS="SGMLTAG"
>role</SPAN
> attribute the distinction between
them, as in <TT
CLASS="SGMLTAG"
><NOBR
>&#60;systemitem role="URL"&#62;</NOBR
></TT
>
versus <TT
CLASS="SGMLTAG"
><NOBR
>&#60;systemitem
role="emailaddr"&#62;</NOBR
></TT
>.</P
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="S-ENTITIES"
>1.4. Entities</A
></H1
><P
><A
NAME="AEN735"
></A
>
<A
NAME="AEN738"
></A
>
<A
NAME="AEN740"
></A
>
<A
NAME="AEN742"
></A
>

Entities are a fundamental concept in <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, and can be
somewhat daunting at first. They serve a number of related, but
slightly different functions, and this makes them a little bit
complicated.</P
><P
>In the most general terms, entities allow you to assign a name to some
chunk of data, and use that name to refer to that data. The complexity
arises because there are two different contexts in which you can use
entities (in the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> and in your documents), two types of entities
(parsed and unparsed), and two or three different ways in which the
entities can point to the chunk of data that they name.</P
><P
>In the rest of this section, we'll describe each of the commonly
encountered entity types. If you find the material in this section
confusing, feel free to skip over it now and come back to it later.
We'll refer to the different types of entities as the need arises in
our discussion of DocBook. Come back to this section when you're
looking for more detail.</P
><P
>Entities can be divided into two broad categories, <I
CLASS="FIRSTTERM"
>general
entities</I
> and <I
CLASS="FIRSTTERM"
>parameter entities</I
>.
Parameter entities are most often used in the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>, not in documents,
so we'll describe them last. Before you can use any type of entity, it
must be formally declared. This is typically done in the document
prologue, as we'll explain in <A
HREF="ch02.html"
>Chapter 2</A
>, but we will
show you how to declare each of the entities discussed here.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN755"
>1.4.1. General Entities</A
></H2
><P
><A
NAME="AEN758"
></A
>
<A
NAME="AEN761"
></A
>
In use, general entities are introduced with an ampersand (&amp;) and end with
a semicolon (;). Within the category of general entities, there are
two types: <I
CLASS="FIRSTTERM"
>internal general entities</I
> and
<I
CLASS="FIRSTTERM"
>external general entities</I
>.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN766"
>1.4.1.1. Internal general entities</A
></H3
><P
><A
NAME="AEN769"
></A
>
<A
NAME="AEN771"
></A
>
<A
NAME="AEN774"
></A
>

With internal entities, you can associate an essentially arbitrary
piece of text (which may have other markup, including references to
other entities) with a name. You can then include that text by
referring to its name. For example, if your document frequently refers
to, say, "O'Reilly &amp; Associates," you might declare it
as an entity:</P
><PRE
CLASS="SCREEN"
>&#60;!ENTITY ora "O'Reilly &#38;amp; Associates"&#62;</PRE
><P
>Then, instead of typing it out each time, you can insert it as needed
in your document with the entity reference <TT
CLASS="SGMLTAG"
>&#38;ora;</TT
>, simply to save time. Note that this
entity declaration includes another entity reference within it.
That's perfectly valid as long as the reference isn't directly or
indirectly recursive.</P
><P
><A
NAME="AEN781"
></A
>

If you find that you use a number of entities across many documents,
you can add them directly to the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> and avoid having to include the
declarations in each document. See the discussion of
<TT
CLASS="FILENAME"
>dbgenent.mod</TT
> in <A
HREF="ch05.html"
>Chapter 5</A
>.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="S-EGENENT"
>1.4.1.2. External general entities</A
></H3
><P
><A
NAME="AEN790"
></A
>
<A
NAME="AEN792"
></A
>
<A
NAME="AEN795"
></A
>
<A
NAME="AEN798"
></A
>

With external entities, you can reference other documents from within
your document. If these entities contain document text (<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> or
<SPAN
CLASS="ACRONYM"
>XML</SPAN
>), then references to them cause the parser to insert the text of
the external file directly into your document (these are called parsed
entities). In this way, you can use entities to divide your single,
logical document into physically distinct chunks. For example, you
might break your document into four chapters and store them in
separate files. At the top of your document, you would include entity
declarations to reference the four files:</P
><PRE
CLASS="SCREEN"
>&#60;!ENTITY ch01 SYSTEM "ch01.sgm"&#62;
&#60;!ENTITY ch02 SYSTEM "ch02.sgm"&#62;
&#60;!ENTITY ch03 SYSTEM "ch03.sgm"&#62;
&#60;!ENTITY ch04 SYSTEM "ch04.sgm"&#62;</PRE
><P
>Your <A
HREF="book.html"
><TT
CLASS="SGMLTAG"
>Book</TT
></A
> now consists simply of references to the
entities:</P
><PRE
CLASS="SCREEN"
>&lt;book&gt;
&amp;ch01;
&amp;ch02;
&amp;ch03;
&amp;ch04;
&lt;/book&gt;</PRE
><P
><A
NAME="AEN808"
></A
>
<A
NAME="AEN810"
></A
>

Sometimes it's useful to reference external files that don't contain
document text. For example, you might want to reference an external
graphic. You can do this with entities by declaring the type of data
that's in the entity using a notation (these are called unparsed
entities). For example, the following declaration declares the entity
<TT
CLASS="LITERAL"
>tree</TT
> as an encapsulated PostScript image:</P
><PRE
CLASS="SCREEN"
>&#60;!ENTITY tree SYSTEM "tree.eps" NDATA EPS&#62;</PRE
><P
><A
NAME="AEN815"
></A
>

Entities declared this way cannot be inserted directly into your
document. Instead, they must be used as entity attributes to elements:</P
><PRE
CLASS="SCREEN"
>&#60;graphic entityref="tree"&#62;&#60;/graphic&#62;</PRE
><P
>Conversely, you cannot use entities declared without a notation as the
value of an entity attribute.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="S-SPECCHAR"
>1.4.1.3. Special characters</A
></H3
><P
><A
NAME="AEN823"
></A
>
<A
NAME="AEN826"
></A
>
<A
NAME="AEN829"
></A
>
In order for the parser to recognize markup in your document, it must
be able to distinguish markup from content. It does this with two
special characters: "&lt;," which identifies the beginning
of a start or end tag, and "&amp;," which identifies the
beginning of an entity reference.<A
NAME="AEN832"
HREF="#FTN.AEN832"
>[4]</A
>
If you want these characters to have their literal value, they must be
encoded as entity references in your document. The entity reference
<TT
CLASS="SGMLTAG"
>&#38;lt;</TT
> produces a left angle bracket;
<TT
CLASS="SGMLTAG"
>&#38;amp;</TT
> produces the
ampersand.<A
NAME="AEN854"
HREF="#FTN.AEN854"
>[5]</A
></P
><P
><A
NAME="AEN862"
></A
>

If you do not encode each of these as their respective entity
references, then an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> parser or application is likely to
interpret them as characters introducing elements or entities (an
<SPAN
CLASS="ACRONYM"
>XML</SPAN
> parser will always interpret them this way); consequently, they
won't appear as you intended. If you wish to cite text that contains
literal ampersands and less-than signs, you need to transform these
two characters into entity references before they are included in a
DocBook document. The only other alternative is to incorporate text
that includes them in your document through some process that avoids
the parser.</P
><P
><A
NAME="AEN868"
></A
>
<A
NAME="AEN870"
></A
>

In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, character entities are frequently declared using a third
entity category (one that we deliberately chose to overlook), called
<I
CLASS="FIRSTTERM"
>data entities</I
>. In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, these are declared using
numeric character references. Numeric character references resemble
entity references, but technically aren't the same. They have the form
<TT
CLASS="LITERAL"
>&amp;#<TT
CLASS="REPLACEABLE"
><I
>999</I
></TT
>;</TT
>, in which
"999" is the numeric character number.</P
><P
><A
NAME="AEN878"
></A
>
<A
NAME="AEN881"
></A
>

In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, the numeric character number is always the Unicode character
number. In addition, <SPAN
CLASS="ACRONYM"
>XML</SPAN
> allows hexadecimal numeric character
references of the form
<TT
CLASS="LITERAL"
>&amp;#x<TT
CLASS="REPLACEABLE"
><I
>hhhh</I
></TT
>;</TT
>. In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, the
numeric character number is a number from the document character set
that's declared in the <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> declaration.</P
><P
><A
NAME="AEN890"
></A
>

Character entities are also used to give a name to special characters
that can't otherwise be typed or are not portable across applications
and operating systems. You can then include these characters in your
document by refering to their entity name. Instead of using the often
obscure and inconsistent key combinations of your particular word
processor to type, say, an uppercase letter U with an umlaut (&Uuml;),
you type in an entity for it instead. For instance, the entity for an
uppercase letter U with an umlaut has been defined as the entity
<TT
CLASS="LITERAL"
>Uuml</TT
>, so you would type in <TT
CLASS="SGMLTAG"
>&#38;Uuml;</TT
> to reference it instead of the actual
character. The <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> application that eventually processes your
document for presentation will match the entity to your platform's
handling of special characters in order to render it
appropriately.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN895"
>1.4.2. Parameter Entities</A
></H2
><P
><A
NAME="AEN898"
></A
>
<A
NAME="AEN902"
></A
>

Parameter entities are only recognized in markup declarations (in the
<SPAN
CLASS="ACRONYM"
>DTD</SPAN
>, for example). Instead of beginning with an ampersand, they
begin with a percent sign.  Parameter entities are most frequently
used to customize the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>. For a detailed discussion of this topic,
see <A
HREF="ch05.html"
>Chapter 5</A
>. Following are some other uses for
them.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="S-MS"
>1.4.2.1. Marked sections</A
></H3
><P
><A
NAME="AEN910"
></A
>
<A
NAME="AEN912"
></A
>
<A
NAME="AEN915"
></A
>

You might use a parameter entity reference in an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> document in a
marked section. Marking sections is a mechanism for indicating that
special processing should apply to a particular block of text.  Marked
sections are introduced by the special sequence
<TT
CLASS="LITERAL"
>&lt;![<TT
CLASS="REPLACEABLE"
><I
>keyword</I
></TT
>[</TT
> and end
with <TT
CLASS="LITERAL"
>]]&gt;</TT
>.  In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, marked sections can appear
in both <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>s and document instances.  In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, they're only allowed
in the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
>.<A
NAME="AEN926"
HREF="#FTN.AEN926"
>[6]</A
></P
><P
><A
NAME="AEN933"
></A
>
<A
NAME="AEN936"
></A
>
<A
NAME="AEN938"
></A
>

The most common keywords are <TT
CLASS="LITERAL"
>INCLUDE</TT
>, which
indicates that the text in the marked section should be included in
the document; <TT
CLASS="LITERAL"
>IGNORE</TT
>, which indicates that the text
in the marked section should be ignored (it completely disappears from
the parsed document); and <TT
CLASS="LITERAL"
>CDATA</TT
>, which indicates
that all markup characters within that section should be ignored
except for the closing characters <TT
CLASS="LITERAL"
>]]&gt;</TT
>.</P
><P
><A
NAME="AEN945"
></A
>
In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, these keywords can be parameter entities. For example, you
might declare the following parameter entity in your document:</P
><PRE
CLASS="SCREEN"
>&#60;!ENTITY % draft "INCLUDE"&#62;</PRE
><P
>Then you could put the sections of the document that are only applicable
in a draft within marked sections:</P
><PRE
CLASS="SCREEN"
>&lt;![%draft;[
&lt;para&#62;
This paragraph only appears in the draft version.
&lt;/para&#62;
]]&gt;</PRE
><P
>When you're ready to print the final version, simply change the 
<TT
CLASS="LITERAL"
>draft</TT
> parameter entity declaration:</P
><PRE
CLASS="SCREEN"
>&#60;!ENTITY % draft "IGNORE"&#62;</PRE
><P
>and publish the document. None of the draft sections will appear.
<A
NAME="AEN956"
></A
>&#62;
<A
NAME="AEN957"
></A
>&#62;</P
></DIV
></DIV
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN958"
>1.5. How Does DocBook Fit In?</A
></H1
><P
><A
NAME="AEN961"
></A
>

DocBook is a very popular set of tags for describing books, articles,
and other prose documents, particularly technical
documentation. DocBook is defined using the native <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> syntax of
<SPAN
CLASS="ACRONYM"
>SGML</SPAN
> and <SPAN
CLASS="ACRONYM"
>XML</SPAN
>. Like <SPAN
CLASS="ACRONYM"
>HTML</SPAN
>, DocBook is an example of a markup
language defined in <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
>.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN970"
>1.5.1. A Short DocBook History</A
></H2
><P
>DocBook is almost 10 years old. It began in 1991 as a joint project of
HaL Computer Systems and O'Reilly. Its popularity grew, and eventually
it spawned its own maintainance organization, the Davenport Group. In
mid-1998, it became a Technical Committee (<SPAN
CLASS="ACRONYM"
>TC</SPAN
>) of
the Organization for the Advancement of Structured Information
Standards (<SPAN
CLASS="ACRONYM"
>OASIS</SPAN
>).</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN975"
>1.5.1.1. The HaL and O'Reilly era</A
></H3
><P
><A
NAME="AEN978"
></A
>
<A
NAME="AEN980"
></A
>
<A
NAME="AEN982"
></A
>

The DocBook <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> was originally designed and implemented by HaL
Computer Systems and O'Reilly &amp; Associates around 1991. It was
developed primarily to facilitate the exchange of <SPAN
CLASS="ACRONYM"
>UNIX</SPAN
> documentation
originally marked up in <I
CLASS="COMMAND"
>troff</I
>. Its design appears
to have been based partly on input from <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> interchange projects
conducted by the Unix International and Open Software Foundation
consortia.</P
><P
><A
NAME="AEN990"
></A
>
When DocBook <SPAN
CLASS="ACRONYM"
>V1.1</SPAN
> was published, discussion about
its revision and maintenance began in earnest in the Davenport Group,
a forum created by O'Reilly for computer documentation
producers. Version 1.2 was influenced strongly by
Novell and Digital.</P
><P
>In 1994, the Davenport Group became an officially chartered entity
responsible for DocBook's maintenance. DocBook
<SPAN
CLASS="ACRONYM"
>V1.2.2</SPAN
> was published simultaneously. The founding
sponsors of this incarnation of Davenport include the following
people:
<P
></P
><UL
><LI
><P
>Jon Bosak, Novell</P
></LI
><LI
><P
>Dale Dougherty, O'Reilly &amp; Associates</P
></LI
><LI
><P
>Ralph Ferris, Fujitsu <SPAN
CLASS="ACRONYM"
>OSSI</SPAN
></P
></LI
><LI
><P
>Dave Hollander, Hewlett-Packard</P
></LI
><LI
><P
>Eve Maler, Digital Equipment Corporation</P
></LI
><LI
><P
>Murray Maloney, <SPAN
CLASS="ACRONYM"
>SCO</SPAN
></P
></LI
><LI
><P
>Conleth O'Connell, HaL Computer Systems</P
></LI
><LI
><P
>Nancy Paisner, Hitachi Computer Products</P
></LI
><LI
><P
>Mike Rogers, SunSoft</P
></LI
><LI
><P
>Jean Tappan, Unisys</P
></LI
></UL
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1018"
>1.5.1.2. The Davenport era</A
></H3
><P
>Under the auspices of the Davenport Group, the DocBook <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> began to
widen its scope. It was now being used by a much wider audience, and
for new purposes, such as direct authoring with <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>-aware tools,
and publishing directly to paper. As the largest users of DocBook,
Novell and Sun had a heavy influence on its design.</P
><P
><A
NAME="AEN1024"
></A
>

In order to help users manage change, the new Davenport charter established
the following rules for DocBook releases:
<P
></P
><UL
><LI
><P
>Minor versions (<SPAN
CLASS="QUOTE"
>"point releases"</SPAN
> such as
<SPAN
CLASS="ACRONYM"
>V2.2</SPAN
>) could add to the markup model, but could not
change it in a backward-incompatible way. For example, a new kind of
list element could be added, but it would not be acceptable for the
existing itemized-list model to start requiring two list items inside
it instead of only one. Thus, any document conforming to version
<TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
>.0 would also conform to
<TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
>.<TT
CLASS="REPLACEABLE"
><I
>m</I
></TT
>.</P
></LI
><LI
><P
>Major versions (such as <SPAN
CLASS="ACRONYM"
>V3.0</SPAN
>) could
both add to the markup model and make backward-incompatible
changes. However, the changes would have to be announced in the last
major release.</P
></LI
><LI
><P
>Major-version introductions must be separated by at
least a year.</P
></LI
></UL
></P
><P
><A
NAME="AEN1041"
></A
>
<A
NAME="AEN1045"
></A
>

<SPAN
CLASS="ACRONYM"
>V3.0</SPAN
> was released in January 1997. After that time,
although DocBook's audience continued to grow, many of the Davenport
Group stalwarts became involved in the <SPAN
CLASS="ACRONYM"
>XML</SPAN
> effort, and development
slowed dramatically. The idea of creating an official <SPAN
CLASS="ACRONYM"
>XML</SPAN
>-compliant
version of DocBook was discussed, but not implemented. (For more
detailed information about DocBook <SPAN
CLASS="ACRONYM"
>V3.0</SPAN
> and plans
for subsequent versions, see <A
HREF="appc.html"
>Appendix C</A
>.)</P
><P
><A
NAME="AEN1054"
></A
>

The sponsors wanted to close out Davenport in an orderly way to ensure
that DocBook users would be supported. It was suggested that
<SPAN
CLASS="ACRONYM"
>OASIS</SPAN
> become DocBook's new home. An
<SPAN
CLASS="ACRONYM"
>OASIS</SPAN
> DocBook Technical Committee was formed in
July, 1998, with Eduardo Gutentag of Sun Microsystems as chair.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1059"
>1.5.1.3. The <SPAN
CLASS="ACRONYM"
>OASIS</SPAN
> era</A
></H3
><P
>The DocBook Technical commitee is continuing the work started by the
Davenport Group. The transition from Davenport to
<SPAN
CLASS="ACRONYM"
>OASIS</SPAN
> has been very smooth, in part because the
core design team consists of essentially the same individuals (we all
just changed hats).</P
><P
>DocBook <SPAN
CLASS="ACRONYM"
>V3.1</SPAN
>, published in February 1999, was the
first <SPAN
CLASS="ACRONYM"
>OASIS</SPAN
> release.  It integrated a number of
changes that had been <SPAN
CLASS="QUOTE"
>"in the wings"</SPAN
> for some time.</P
><P
>The committee is undertaking new DocBook development to ensure
that the <SPAN
CLASS="ACRONYM"
>DTD</SPAN
> continues to meet the needs of its users, and that it has
concrete plans to publish an <SPAN
CLASS="ACRONYM"
>XML</SPAN
>-compliant version.
<A
NAME="AEN1071"
></A
>&#62;
<A
NAME="AEN1072"
></A
>&#62;&#13;</P
></DIV
></DIV
></DIV
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN460"
HREF="ch01.html#AEN460"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>Some structured editors apply style to the
document while it's being edited, using fonts and color to make the
editing task easier, but this stylistic information is not stored in
the actual <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>/<SPAN
CLASS="ACRONYM"
>XML</SPAN
> document. Instead, it is provided by the
editing application.</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN489"
HREF="ch01.html#AEN489"
>[2]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>The distinction between appearance or
presentation and structure or content is essential to <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, but
there is a way to specify the appearance of an <SPAN
CLASS="ACRONYM"
>SGML</SPAN
> document: attach
a stylesheet to it. There are several standards for such stylesheets:
<SPAN
CLASS="ACRONYM"
>CSS</SPAN
>, <SPAN
CLASS="ACRONYM"
>XSL</SPAN
>, <SPAN
CLASS="ACRONYM"
>FOSI</SPAN
>s,
and <SPAN
CLASS="ACRONYM"
>DSSSL</SPAN
>.
See <A
HREF="ch04.html"
>Chapter 4</A
>.</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN675"
HREF="ch01.html#AEN675"
>[3]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, this is written as
<TT
CLASS="LITERAL"
>&lt;xref/&#62;</TT
>, as we'll see in the section <A
HREF="ch02.html#CH02-TYPEXML"
>Section 2.1.5</A
>.</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN832"
HREF="ch01.html#AEN832"
>[4]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
><A
NAME="AEN834"
></A
>
In <SPAN
CLASS="ACRONYM"
>XML</SPAN
>, these characters are fixed. In <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, it is possible to
change the markup start characters, but we won't consider that case
here. If you change the markup start characters, you know what you're
doing. While we're on the subject, in <SPAN
CLASS="ACRONYM"
>SGML</SPAN
>, these characters only
have their special meaning if they are followed by a name character.
It is, in fact, valid in an <I
CLASS="EMPHASIS"
><SPAN
CLASS="ACRONYM"
>SGML</SPAN
></I
> (but not an <SPAN
CLASS="ACRONYM"
>XML</SPAN
>)
document to write "O'Reilly &#38; Associates" because the
ampersand is not followed by a name character. Don't do this, however.
<A
NAME="AEN842"
></A
>
<A
NAME="AEN846"
></A
>
<A
NAME="AEN849"
></A
></P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN854"
HREF="ch01.html#AEN854"
>[5]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
><A
NAME="AEN856"
></A
>

The sequence of characters that end a marked section (see <A
HREF="ch01.html#S-MS"
>Section 1.4.2.1</A
>), such as ]]&gt; must also be encoded with at least
one entity reference if it is not being used to end a marked section.
For this purpose, you can use the entity reference <TT
CLASS="SGMLTAG"
>&#38;gt;</TT
> for the final right angle bracket.</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN926"
HREF="ch01.html#AEN926"
>[6]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
><A
NAME="AEN928"
></A
>
Actually, CDATA marked sections are allowed in an <SPAN
CLASS="ACRONYM"
>XML</SPAN
> document, but
the keyword cannot be a parameter entity, and it must be typed
literally. See the examples on this page.</P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="part1.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="docbook.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="ch02.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Introduction</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="part1.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Creating DocBook Documents</TD
></TR
></TABLE
></DIV
><P
><A
HREF="ln41.html"
>Copyright</A
> &copy; 1999 O'Reilly &amp; Associates, Inc. All rights reserved.</P
></BODY
></HTML
>