index.html
401 KB
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
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
<!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">
<head>
<meta name="generator"
content="HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org" />
<title>RDF Primer</title>
<style type="text/css">
/*<![CDATA[*/
.new { color: #FF0000 }
.example {font-family: monospace; }
.figure {
font-weight: bold;
text-align: center; }
.newstuff { }
.primative {
padding: 1em;
margin: 0.1em 3.5em 0.1em 0.1em;
background-color: #eddddd;
border: 1px solid #cfcfcf; }
.ptriple {
padding: 1em;
margin: 0.1em 3.5em 0.1em 0.1em;
background-color: #eedddd;
border: 1px solid #cfcfcf; }
.caveat {
padding: 1em;
margin: 0.1em 3.5em 0.1em 0.1em;
border: 1px solid #cfcfcf; }
.principle { background: #f7ebd7; color: black; border: solid black thin; padding: .1em; margin-left: 5%; margin-right: 5%}
div.example {
padding: 1em;
margin: 0.1em 3.5em 0.1em 0.1em;
background-color: #efeff5;
border: 1px solid #cfcfcf; }
div.exampleOuter {
/*
border: 4px double gray;
*/
margin: 0em;
padding: 0em;
}
div.exampleInner {
color: black;
/* tan */
/* background-color: #d2b48c; */
/* cyan */
/* background-color: #99ffff; */
/* mauve */
background-color: #efeff5;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-width: 1px;
border-bottom-style: double;
border-bottom-color: #d3d3d3;
padding: 4px;
margin: 0em;
}
div.exampleInner pre {
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
font-family: monospace;
/* font-size: smaller */
}
body {
background-color: #FFFFFF;
}
div.c1 {text-align:center}
/*]]>*/
</style>
<style type="text/css" xml:space="preserve">
.PrePublicationWarning {
font-weight: bold;
margin: 1em 0em;
border: medium double black;
background: yellow;
padding: 1em;
}
</style>
<link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-REC" />
</head>
<body>
<div class="head">
<a href="http://www.w3.org/"><img height="48" width="72"
alt="W3C" src="http://www.w3.org/Icons/w3c_home" /></a>
<h1 id="title">RDF Primer</h1>
<h2 id="hstatus">W3C Recommendation 10 February 2004</h2>
<dl>
<dt>This version:</dt>
<dd><a
href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/">http://www.w3.org/TR/2004/REC-rdf-primer-20040210/</a></dd>
<dt>Latest version:</dt>
<dd><a
href="http://www.w3.org/TR/rdf-primer/">http://www.w3.org/TR/rdf-primer/</a></dd>
<dt>Previous version:</dt>
<dd><a
href="http://www.w3.org/TR/2003/PR-rdf-primer-20031215/">http://www.w3.org/TR/2003/PR-rdf-primer-20031215/</a></dd>
<dt>Editors:</dt>
<dd>Frank Manola, <a
href="mailto:fmanola@acm.org">fmanola@acm.org</a></dd>
<dd>Eric Miller, W3C, <a
href="mailto:em@w3.org">em@w3.org</a></dd>
<dt>Series Editor:</dt>
<dd>Brian McBride, Hewlett-Packard Laboratories, <a
href="mailto:bwm@hplb.hpl.hp.com">bwm@hplb.hpl.hp.com</a></dd>
</dl>
<p>Please refer to the <a href="http://www.w3.org/2001/sw/RDFCore/errata#rdf-primer"><strong>errata</strong></a> for this document, which may include some normative corrections.</p>
<p>See also <a href="http://www.w3.org/2001/sw/RDFCore/translation/rdf-primer">translations</a>.</p>
<p class="copyright"><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
© 2004 <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>, <a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> and <a
href="http://www.w3.org/Consortium/Legal/copyright-software">software
licensing</a> rules apply.</p>
<hr title="Separator for header" />
</div>
<h2><a id="abstract" name="abstract">Abstract</a></h2>
<p>The Resource Description Framework (RDF) is a language for
representing information about resources in the World Wide Web.
This Primer is designed to provide the reader with the basic
knowledge required to effectively use RDF. It introduces the basic
concepts of RDF and describes its XML syntax. It describes how to
define RDF vocabularies using the RDF Vocabulary Description
Language, and gives an overview of some deployed RDF applications.
It also describes the content and purpose of other RDF
specification documents.</p>
<div class="status">
<h2 class="nonum">
<a id="status" name="status">Status of this Document</a>
</h2>
<!-- Start Status-Of-This-Document Text -->
<p>This document has been reviewed by W3C Members and other interested
parties, and it has been endorsed by the Director as a <a
href="http://www.w3.org/2003/06/Process-20030618/tr.html#RecsW3C">W3C
Recommendation</a>. W3C's role in making the Recommendation is to
draw attention to the specification and to promote its widespread
deployment. This enhances the functionality and interoperability of
the Web.</p>
<p>This is one document in a <a
href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Introduction">set
of six</a> (<a
href="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/">Primer</a>,
<a
href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/">Concepts</a>,
<a
href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/">Syntax</a>,
<a
href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/">Semantics</a>,
<a
href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210/">Vocabulary</a>,
and <a
href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/">Test
Cases</a>) intended to jointly replace the original Resource
Description Framework specifications, <a
href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">RDF Model and Syntax (1999
Recommendation)</a> and <a
href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/">RDF Schema
(2000 Candidate Recommendation)</a>. It has been developed by the <a
href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
as part of the <a href="http://www.w3.org/2001/sw/">W3C Semantic Web
Activity</a> (<a href="http://www.w3.org/2001/sw/Activity">Activity
Statement</a>, <a
href="http://www.w3.org/2002/11/swv2/charters/RDFCoreWGCharter">Group
Charter</a>) for publication on 10 February 2004.
</p>
<p>Changes to this document since the <a
href="http://www.w3.org/TR/2003/PR-rdf-primer-20031215/"
shape="rect">Proposed Recommendation Working Draft</a> are detailed in
the <a href="#changes" shape="rect">change log</a>. </p>
<p> The public is invited to send comments to <a
href="mailto:www-rdf-comments@w3.org">www-rdf-comments@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-rdf-comments/">archive</a>)
and to participate in general discussion of related technology on <a
href="mailto:www-rdf-interest@w3.org"
shape="rect">www-rdf-interest@w3.org</a> (<a
href="http://lists.w3.org/Archives/Public/www-rdf-interest/"
shape="rect">archive</a>). </p>
<p>A list of <a href="http://www.w3.org/2001/sw/RDFCore/impls">
implementations</a> is available.</p>
<p>The W3C maintains a list of <a href="http://www.w3.org/2001/sw/RDFCore/ipr-statements"
rel="disclosure">any patent disclosures related to this work</a>.</p>
<p><em>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 href="http://www.w3.org/TR/">W3C technical reports index</a> at
http://www.w3.org/TR/.</em></p>
<!-- End Status-Of-This-Document Text -->
</div>
<h2><a id="toc" name="toc">Table of Contents</a></h2>
<p class="toc"> 1. <a
href="#intro">Introduction</a><br />
2. <a href="#statements">Making Statements About
Resources</a><br />
2.1 <a
href="#basicconcepts">Basic Concepts</a><br />
2.2 <a href="#rdfmodel">The
RDF Model</a><br />
2.3 <a
href="#structuredproperties">Structured Property Values and Blank
Nodes</a><br />
2.4 <a
href="#typedliterals">Typed Literals</a><br />
2.5 <a
href="#conceptsummary">Concepts Summary</a><br />
3. <a href="#rdfxml">An XML Syntax for RDF:
RDF/XML</a><br />
3.1 <a
href="#basicprinciples">Basic Principles</a><br />
3.2 <a
href="#newresources">Abbreviating and Organizing RDF
URIrefs</a><br />
3.3 <a
href="#rdfxmlsummary">RDF/XML Summary</a><br />
4. <a href="#othercapabilities">Other RDF
Capabilities</a><br />
4.1 <a href="#containers">RDF
Containers</a><br />
4.2 <a href="#collections">RDF
Collections</a><br />
4.3 <a href="#reification">RDF
Reification</a><br />
4.4 <a href="#rdfvalue">More
on Structured Values: rdf:value</a><br />
4.5 <a href="#xmlliterals">XML
Literals</a><br />
5. <a href="#rdfschema">Defining RDF Vocabularies: RDF
Schema</a><br />
5.1 <a
href="#schemaclasses">Describing Classes</a><br />
5.2 <a
href="#properties">Describing Properties</a><br />
5.3 <a
href="#interpretingschema">Interpreting RDF Schema
Declarations</a><br />
5.4 <a
href="#otherschema">Other Schema Information</a><br />
5.5 <a
href="#richerschemas">Richer Schema Languages</a><br />
6. <a href="#applications">Some RDF Applications: RDF
in the Field</a><br />
6.1 <a
href="#dublincore">Dublin Core Metadata Initiative</a><br />
6.2 <a
href="#prism">PRISM</a><br />
6.3 <a
href="#xpackage">XPackage</a><br />
6.4 <a href="#rss">RSS 1.0:
RDF Site Summary</a><br />
6.5 <a
href="#cimxml">CIM/XML</a><br />
6.6 <a href="#geneont">Gene
Ontology Consortium</a><br />
6.7 <a
href="#devcap">Describing Device Capabilities and User
Preferences</a><br />
7. <a href="#otherparts">Other Parts of the RDF
Specification</a><br />
7.1 <a href="#semantics">RDF
Semantics</a><br />
7.2 <a href="#testcases">Test
Cases</a><br />
8. <a href="#references">References</a><br />
8.1 <a
href="#normative-references">Normative References</a><br />
8.2 <a
href="#informational-references">Informational References</a><br />
9. <a href="#acknowledgements">Acknowledgments</a></p>
<h3><a id="appendices" name="appendices">Appendices</a></h3>
<p class="appendix"> A. <a href="#identifiers">More on
Uniform Resource Identifiers (URIs)</a><br />
B. <a href="#documents">More on the Extensible Markup
Language (XML)</a><br />
C. <a href="#changes">Changes</a><br />
</p>
<hr />
<div class="section">
<h2 id="introduction"><a id="intro" name="intro"></a>1.
Introduction</h2>
<p>The Resource Description Framework (RDF) is a language for
representing information about resources in the World Wide Web.
It is particularly intended for representing metadata about Web
resources, such as the title, author, and modification date of a
Web page, copyright and licensing information about a Web
document, or the availability schedule for some shared resource.
However, by generalizing the concept of a "Web resource", RDF can
also be used to represent information about things that can be
<em>identified</em> on the Web, even when they cannot be directly
<em>retrieved</em> on the Web. Examples include information about
items available from on-line shopping facilities (e.g.,
information about specifications, prices, and availability), or
the description of a Web user's preferences for information
delivery.</p>
<p>RDF is intended for situations in which this information
needs to be processed by applications, rather than being
only displayed to people.
RDF provides a common framework for expressing this
information so it can be exchanged between applications without
loss of meaning. Since it is a common framework, application
designers can leverage the availability of common RDF parsers and
processing tools. The ability to exchange information between
different applications means that the information may be made
available to applications other than those for which it was
originally created.</p>
<p>RDF is based on the idea of identifying things using Web
identifiers (called <em>Uniform Resource Identifiers</em>,
or <em>URIs</em>), and describing resources in terms of simple
properties and property values. This enables RDF to represent
simple statements about resources as a <em>graph</em> of nodes
and arcs representing the resources, and their properties and
values. To make this discussion somewhat more concrete as soon as
possible, the group of statements "there is <span class="newstuff">
<a name="LCC-007" id="LCC-007">a Person
identified by <code>http://www.w3.org/People/EM/contact#me</code></a>,</span> whose name is
Eric Miller, whose email address is em@w3.org, and whose title is
Dr." could be represented as the RDF graph in <a
href="#figure1">Figure 1</a>:</p>
<div class="figure">
<img src="fig1dec16.png"
alt="An RDF Graph Describing Eric Miller" /><br />
<a id="figure1" name="figure1">Figure 1: An RDF Graph
Describing Eric Miller</a>
</div>
<p><a href="#figure1">Figure 1</a> illustrates that RDF uses URIs
to identify:</p>
<ul>
<li>individuals, e.g., Eric Miller, identified by
<code>http://www.w3.org/People/EM/contact#me</code></li>
<li>kinds of things, e.g., Person, identified by
<code>http://www.w3.org/2000/10/swap/pim/contact#Person</code></li>
<li>properties of those things, e.g., mailbox, identified by
<code>http://www.w3.org/2000/10/swap/pim/contact#mailbox</code></li>
<li>values of those properties, e.g. <code>mailto:em@w3.org</code>
as the value of the mailbox property (RDF also uses character
strings such as "Eric Miller", and values from other datatypes
such as integers and dates, as the values of properties)</li>
</ul>
<p>RDF also provides an XML-based syntax (called <em>RDF/XML</em>) for
recording and exchanging these graphs. <a
href="#example1">Example 1</a> is a small chunk of RDF in RDF/XML
corresponding to the graph in <a href="#figure1">Figure
1</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example1" name="example1">Example 1: RDF/XML
Describing Eric Miller</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
<contact:Person rdf:about="http://www.w3.org/People/EM/contact#me">
<contact:fullName>Eric Miller</contact:fullName>
<contact:mailbox rdf:resource="mailto:em@w3.org"/>
<contact:personalTitle>Dr.</contact:personalTitle>
</contact:Person>
</rdf:RDF>
</pre>
</div>
</div>
<p>Note that this RDF/XML also contains URIs, as well as
properties like <code>mailbox</code> and <code>fullName</code> (in an
abbreviated form), and their respective values
<code>em@w3.org</code>, and <code>Eric Miller</code>.</p>
<p>Like HTML, this RDF/XML is machine processable and, using
URIs, can link pieces of information across the Web. However,
unlike conventional hypertext, RDF URIs can refer to any
identifiable thing, including things that may not be directly
retrievable on the Web (such as the person Eric Miller). The
result is that in addition to describing such things as Web
pages, RDF can also describe cars, businesses, people, news
events, etc. In addition, RDF properties themselves have URIs, to
precisely identify the relationships that exist between
the linked items.</p>
<p>The following documents contribute to the specification of
RDF:</p>
<ul>
<li><a href="http://www.w3.org/TR/rdf-concepts/">RDF Concepts
and Abstract Syntax</a> <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML
Syntax Specification</a> <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a></li>
<li><a href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary
Description Language 1.0: RDF Schema</a> <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a></li>
<li><a href="http://www.w3.org/TR/rdf-mt/">RDF Semantics</a> <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-testcases/">RDF Test
Cases</a> <a href="#ref-rdf-tests">[RDF-TESTS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-primer/">RDF Primer</a>
(this document)</li>
</ul>
<p>This Primer is intended to provide an introduction to RDF and
describe some existing RDF applications, to help information
system designers and application developers understand the
features of RDF and how to use them. In particular, the Primer is
intended to answer such questions as:</p>
<ul>
<li>What does RDF look like?</li>
<li>What information can RDF represent?</li>
<li>How is RDF information created, accessed, and
processed?</li>
<li>How can existing information be combined with RDF?</li>
</ul>
<p>The Primer is a <em>non-normative</em> document, which means
that it does not provide a definitive specification of RDF. The
examples and other explanatory material in the Primer are
provided to help readers understand RDF, but they may not always
provide definitive or fully-complete answers. In such cases, the
relevant normative parts of the RDF specification should be consulted.
To help in doing this, the Primer describes the roles these other
documents play in the complete specification of RDF, and provides
links pointing to the relevant parts of the normative specifications,
at appropriate places in the discussion.</p>
<p class="newstuff">It should also be noted that these RDF documents update and clarify
<a name="LCC-022" id="LCC-022">previously-published RDF specifications</a>, the <a
href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">Resource
Description Framework (RDF) Model and Syntax Specification</a> <a
href="#ref-rdfms">[RDF-MS]</a> and the
<a href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/">
Resource Description Framework (RDF) Schema Specification 1.0</a>
<a href="#ref-rdf-s">[RDF-S]</a>.
As a result, there have been some changes in terminology, syntax, and concepts.
This Primer reflects the newer set of RDF specifications given in the
bulleted list of RDF documents cited above. Hence, readers
familiar with the older specifications, and with earlier tutorial and
introductory articles based on them, should be aware that there may be
differences between the current specifications and those previous documents.
The <a href="http://www.w3.org/2000/03/rdf-tracking/">RDF Issue
Tracking</a> document <a href="#ref-rdf-issue">[RDFISSUE]</a>
can be consulted for a list of issues
raised concerning the previous RDF specifications, and their resolution in
the current specifications.</p>
</div>
<div class="section">
<h2><a id="statements" name="statements"></a>2. Making Statements
About Resources</h2>
<p>RDF is intended to provide a simple way to make statements
about Web resources, e.g., Web pages. This section
describes the basic ideas behind the way RDF provides these
capabilities (the normative specification describing these
concepts is <a href="http://www.w3.org/TR/rdf-concepts/">RDF
Concepts and Abstract Syntax</a> <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>).</p>
<div class="section">
<h3><a id="basicconcepts" name="basicconcepts"></a>2.1 Basic
Concepts</h3>
<p>Imagine trying to state that someone named
John Smith created a particular Web page. A straightforward way
to state this in a natural language such as English would be in the form of a simple
statement such as:</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creator</strong> whose value is <strong>John Smith</strong></code></p>
<p>Parts of this statement are emphasized to illustrate that,
in order to describe the properties of something, there need to be ways
to name, or identify, a number of things:</p>
<ul>
<li>the thing the statement describes
(the Web page, in this case)</li>
<li>a specific property (creator,
in this case) of the thing the statement describes</li>
<li>the thing the statement says is
the value of this property (who the creator is), for the
thing the statement describes</li>
</ul>
<p>In this statement, the Web page's URL (Uniform
Resource Locator) is used to identify it. In addition, the
word "creator" is used to identify the property,
and the two words "John Smith" to identify the thing (a person)
that is the value of this property.</p>
<p>Other properties of this Web page could be described by writing
additional English statements of the same general form, using
the URL to identify the page, and words (or other expressions)
to identify the properties and their values. For example, the
date the page was created, and the language in
which the page is written, could be described using the additional
statements:</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creation-date</strong> whose value is <strong>August 16,
1999</strong></code><br />
<code><strong>http://www.example.org/index.html</strong> has a
<strong>language</strong> whose value is <strong>English</strong></code></p>
<p>RDF is based on the idea that the things being described
have <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-property">properties</a>
which have values, and that resources can be described by
making statements, similar to those above, that specify those
properties and values. RDF uses a particular terminology for
talking about the various parts of statements. Specifically,
the part that identifies the thing the statement is about (the
Web page in this example) is called the <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-subject">subject</a>.
The part that identifies the property or characteristic of the
subject that the statement specifies (creator, creation-date,
or language in these examples) is called the <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-predicate">predicate</a>,
and the part that identifies the value of that property is
called the <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-object">object</a>.
So, taking the English statement</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creator</strong> whose value is <strong>John Smith</strong></code></p>
<p>the RDF terms for the various parts of the statement
are:</p>
<ul>
<li>the <dfn>subject</dfn> is the URL
<code>http://www.example.org/index.html</code></li>
<li>the <dfn>predicate</dfn> is the word "creator"</li>
<li>the <dfn>object</dfn> is the phrase "John Smith"</li>
</ul>
<p>However, while English is good for communicating between
(English-speaking) humans, RDF is about making
<em>machine-processable</em> statements. To make these kinds of
statements suitable for processing by machines, two
things are needed:</p>
<ul>
<li>a system of machine-processable identifiers
for identifying a subject, predicate, or object in a statement
without any possibility of confusion with a similar-looking
identifier that might be used by someone else on the
Web.</li>
<li>a machine-processable language for representing these
statements and exchanging them between machines.</li>
</ul>
<p>Fortunately, the existing Web architecture provides both
these necessary facilities.</p>
<p>As illustrated earlier, the Web already provides one form of
identifier, the <dfn>Uniform Resource Locator</dfn> (URL).
A URL was used in the original example to identify the Web page
that John Smith created. A URL is a character string that
identifies a Web resource by representing its primary access
mechanism (essentially, its network "location"). However, it
is also important to be able to record information about many
things that, unlike Web pages, do not have network locations or
URLs.</p>
<p>The Web provides a more general form of identifier for these
purposes, called the <a
href="http://www.isi.edu/in-notes/rfc2396.txt">Uniform Resource
Identifier</a> (URI). URLs are a particular kind of URI. All
URIs share the property that different persons or organizations
can independently create them, and use them to identify things.
However, URIs are not limited to identifying things that have
network locations, or use other computer access mechanisms. In
fact, a URI can be created to refer to anything that needs
to be referred to in a statement, including</p>
<ul>
<li>network-accessible things, such as an electronic
document, an image, a service (e.g., "today's weather report
for Los Angeles"), or a group of other resources.</li>
<li>things that are not network-accessible, such as human
beings, corporations, and bound books in a library.</li>
<li>abstract concepts that do not physically exist, such as the
concept of a "creator".</li>
</ul>
<p>Because of this generality, RDF uses URIs as the basis of
its mechanism for identifying the subjects, predicates, and
objects in statements. To be more precise, RDF uses <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">URI
references</a> <a href="#ref-uri">[URIS]</a>. A URI reference
(or <em>URIref</em>) is a URI, together with an optional
<em>fragment identifier</em> at the end. For example, the URI
reference <code>http://www.example.org/index.html#section2</code>
consists of the URI <code>http://www.example.org/index.html</code>
and (separated by the "#" character) the fragment identifier
<code>Section2</code>.
RDF URIrefs can contain Unicode <a href="#ref-unicode">[UNICODE]</a> characters (see <a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>), allowing many languages to be reflected in URIrefs.
RDF defines a <em>resource</em> as anything
that is identifiable by a URI reference, so using URIrefs
allows RDF to describe practically anything, and to state
relationships between such things as well. URIrefs and fragment
identifiers are discussed further in <a
href="#identifiers">Appendix A</a>, and in <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>.</p>
<p>To represent RDF statements in a machine-processable way,
RDF uses the <a
href="http://www.w3.org/TR/2000/REC-xml-20001006">Extensible
Markup Language</a> <a href="#ref-xml">[XML]</a>. XML was
designed to allow anyone to design their own document format
and then write a document in that format. RDF defines a
specific XML markup language, referred to as <em>RDF/XML</em>,
for use in representing RDF information, and for exchanging it
between machines. An example of RDF/XML was given in <a
href="#intro">Section 1</a>. That example (<a
href="#example1">Example 1</a>) used tags such as
<code><contact:fullName></code> and
<code><contact:personalTitle></code> to delimit the text
content <code>Eric Miller</code> and <code>Dr.</code>, respectively.
Such tags allow programs written with an understanding of what
the tags mean to properly interpret that content.
Both XML content and (with certain exceptions) tags can contain Unicode <a href="#ref-unicode">[UNICODE]</a> characters, allowing information from many languages to be directly represented.
<a href="#documents">Appendix B</a> provides further background on
XML in general. The specific RDF/XML syntax used for RDF is
described in more detail in <a href="#rdfxml">Section 3</a>,
and is normatively defined in <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a></p>
</div>
<div class="section">
<h3><a id="rdfmodel" name="rdfmodel"></a>2.2 The RDF Model</h3>
<p><a href="#basicconcepts">Section 2.1</a> has introduced
RDF's basic statement concepts, the idea of using
URI references to identify the things referred to
in RDF statements, and RDF/XML as a machine-processable way to
represent RDF statements. With that background, this section
describes how RDF uses URIs to make statements about resources. The
introduction said that RDF was based on the idea of
expressing simple statements about resources, where each
statement consists of a subject, a predicate, and an object.
In RDF, the English statement:</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creator</strong> whose value is <strong>John Smith</strong></code></p>
<p>could be represented by an RDF statement having:</p>
<ul>
<li>a subject <code>http://www.example.org/index.html</code></li>
<li>a predicate
<code>http://purl.org/dc/elements/1.1/creator</code></li>
<li>and an object
<code>http://www.example.org/staffid/85740</code></li>
</ul>
<p>Note how URIrefs are used to identify not only the
subject of the original statement, but also the predicate and
object, instead of using the words "creator" and "John Smith",
respectively (some of the effects of using URIrefs in this
way will be discussed later in this section).</p>
<p>RDF models statements as nodes and arcs in a graph. RDF's <a
href="http://www.w3.org/TR/rdf-concepts/#section-data-model">graph
model</a> is defined in <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>. In this notation,
a statement is represented by:</p>
<ul>
<li>a node for the subject</li>
<li>a node for the object</li>
<li>an arc for the predicate,
directed from the subject node to the object node.</li>
</ul>
<p>So the RDF statement above would be represented by the graph
shown in <a href="#figure2">Figure 2</a>:</p>
<div class="figure">
<img src="fig2dec16.png"
alt="A Simple RDF Statement" /><br />
<a id="figure2" name="figure2">Figure 2: A Simple RDF
Statement</a>
</div>
<p>Groups of statements are represented by corresponding groups
of nodes and arcs. So, to reflect the additional English statements</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creation-date</strong> whose value is <strong>August 16,
1999</strong></code><br />
<code><strong>http://www.example.org/index.html</strong> has a
<strong>language</strong> whose value is <strong>English</strong></code></p>
<p>in the RDF graph, the graph shown in <a
href="#figure3">Figure 3</a> could be used
(using suitable URIrefs to name the properties
"creation-date" and "language"):</p>
<div class="figure">
<img src="fig3nov19.png"
alt="Several Statements About the Same Resource" /><br />
<a id="figure3" name="figure3">Figure 3: Several Statements
About the Same Resource</a>
</div>
<p><a href="#figure3">Figure 3</a> illustrates that objects
in RDF statements may be either URIrefs, or constant values (called <a
href="http://www.w3.org/TR/rdf-concepts/#section-Literals">literals</a>)
represented by character strings, in order to represent certain
kinds of property values.
(In the case of the predicate <code>http://purl.org/dc/elements/1.1/language</code>
the literal is an international standard two-letter code for English.)
Literals may not be used as subjects or
predicates in RDF statements. In drawing RDF
graphs, nodes that are URIrefs are shown as ellipses,
while nodes that are literals are shown as boxes.
(The simple character string
literals used in these examples are called <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-plain-literal">plain
literals</a>, to distinguish them from the <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-typed-literal">typed
literals</a> to be introduced in <a
href="#typedliterals">Section 2.4</a>. The various kinds of
literals that can be used in RDF statements are defined in <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>.
Both plain and typed literals can contain Unicode <a href="#ref-unicode">[UNICODE]</a> characters, allowing information from many languages to be directly represented.) </p>
<p>Sometimes it is not convenient to draw graphs when
discussing them, so an alternative way of writing down the
statements, called <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-rdf-triple">triples</a>,
is also used. In the triples notation, each statement in the
graph is written as a simple triple of subject, predicate, and
object, in that order. For example, the three statements shown in <a
href="#figure3">Figure 3</a> would be written in the triples notation as:</p>
<div class="exampleOuter exampleInner">
<pre>
<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/creator> <http://www.example.org/staffid/85740> .
<http://www.example.org/index.html> <http://www.example.org/terms/creation-date> "August 16, 1999" .
<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/language> "en" .
</pre>
</div>
<p>Each triple corresponds to a single arc in the graph,
complete with the arc's beginning and ending nodes (the subject
and object of the statement). Unlike the drawn graph (but like
the original statements), the triples notation requires that a
node be separately identified for each statement it appears in.
So, for example, <code>http://www.example.org/index.html</code>
appears three times (once in each triple) in the triples
representation of the graph, but only once in the drawn graph.
However, the triples represent exactly the same information as
the drawn graph, and this is a key point: what is fundamental
to RDF is the <em>graph model</em> of the statements. The
notation used to represent or depict the graph is
secondary.</p>
<p>The full triples notation requires that URI references be
written out completely, in angle brackets, which, as the
example above illustrates, can result in very long lines on a page. For
convenience, the Primer uses a shorthand way of writing triples
(the same shorthand is also used in other RDF specifications).
This shorthand substitutes an XML <em>qualified name</em>
(or <em>QName</em>) without angle brackets as an abbreviation
for a full URI reference (QNames are discussed further in <a
href="#documents">Appendix B</a>).
A QName contains a <em>prefix</em> that has
been assigned to a namespace URI, followed by a colon, and then
a <em>local name</em>. The full URIref is formed
from the QName by appending the local name to the
namespace URI assigned to the prefix. So, for example, if the
QName prefix <code>foo</code> is assigned to the namespace URI
<code>http://example.org/somewhere/</code>, then the QName
<code>foo:bar</code> is shorthand for the URIref
<code>http://example.org/somewhere/bar</code>.
Primer examples will also use several "well-known" QName
prefixes (without explicitly specifying them
each time), defined as follows:<br />
<br />
prefix <code>rdf:</code>, namespace URI:
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code><br />
prefix <code>rdfs:</code>, namespace URI:
<code>http://www.w3.org/2000/01/rdf-schema#</code><br />
prefix <code>dc:</code>, namespace URI:
<code>http://purl.org/dc/elements/1.1/</code><br />
prefix <code>owl:</code>, namespace URI:
<code>http://www.w3.org/2002/07/owl#</code><br />
prefix <code>ex:</code>, namespace URI:
<code>http://www.example.org/</code> (or
<code>http://www.example.com/</code>)<br />
prefix <code>xsd:</code>, namespace URI:
<code>http://www.w3.org/2001/XMLSchema#</code></p>
<p>Obvious variations on the "example" prefix
<code>ex:</code> will also be used as needed in the examples, for instance,<br />
<br />
prefix <code>exterms:</code>, namespace URI:
<code>http://www.example.org/terms/</code> (for terms used by an
example organization),<br />
prefix <code>exstaff:</code>, namespace URI:
<code>http://www.example.org/staffid/</code> (for the example
organization's staff identifiers),<br />
prefix <code>ex2:</code>, namespace URI:
<code>http://www.domain2.example.org/</code> (for a second example
organization), and so on.</p>
<p>Using this new shorthand, the previous set of
triples can be written as:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html dc:creator exstaff:85740 .
ex:index.html exterms:creation-date "August 16, 1999" .
ex:index.html dc:language "en" .
</pre>
</div>
<div class="newstuff">
<p><a name="LCC-012b" id="LCC-012b">Since </a>RDF uses URIrefs instead of words to name things in statements, RDF refers to a set of URIrefs (particularly a set intended for a specific purpose) as a <em>vocabulary</em>. Often, the URIrefs in such vocabularies are organized so that they can be represented as a set of QNames using a common prefix. That is, a common namespace URIref will be chosen for all terms in a vocabulary, typically a URIref under the control of whoever is defining the vocabulary. URIrefs that are contained in the vocabulary are formed by appending individual local names to the end of the common URIref. This forms a set of URIrefs with a common prefix. For instance, as illustrated by the previous examples, an organization such as example.org might define a vocabulary consisting of URIrefs starting with the prefix <code>http://www.example.org/terms/</code> for terms it uses in its business, such as "creation-date" or "product", and another vocabulary of URIrefs starting with <code>http://www.example.org/staffid/</code> to identify its employees. RDF uses this same approach to define its own vocabulary of terms with special meanings in RDF. The URIrefs in this RDF vocabulary all begin with <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>, conventionally associated with the QName prefix <code>rdf:</code>.
The RDF Vocabulary Description Language (described in <a href="#rdfschema">Section 5</a>) defines an additional set of terms having URIrefs that begin with <code>http://www.w3.org/2000/01/rdf-schema#</code>, conventionally associated with the QName prefix <code>rdfs:</code>. (Where a specific QName prefix is commonly used in connection with a given set of terms in this way, the QName prefix itself is sometimes used as the name of the vocabulary. For example, someone might refer to "the <code>rdfs:</code> vocabulary".)</p>
<p>Using common URI prefixes provides a convenient way to organize the URIrefs for a related set of terms. However, this is just a convention. The RDF model only recognizes full URIrefs; it does not "look
inside" URIrefs or use any knowledge about their structure. In particular, RDF does not assume there is any relationship between URIrefs just because they have a common leading prefix (see <a href="#identifiers">Appendix A</a> for further discussion). Moreover, there is nothing that says that URIrefs with different leading prefixes cannot be considered part of the same vocabulary. A particular organization, process, tool, etc. can define a vocabulary that is significant for it, using URIrefs from any number of other vocabularies as part of its vocabulary. </p>
<p>In addition, sometimes an organization will use a vocabulary's namespace URIref as the URL of a Web resource that provides further information about that vocabulary. For example, as noted earlier, the QName prefix <code>dc:</code> will be used in Primer examples, associated with the namespace URIref <code>http://purl.org/dc/elements/1.1/</code>. In fact, this refers to the Dublin Core vocabulary described in <a href="#dublincore">Section 6.1</a>. Accessing this namespace URIref in a Web browser will retrieve additional information about the Dublin Core vocabulary (specifically, an RDF schema). However, this is also just a convention. RDF does not assume that a namespace URI identifies a retrievable Web resource (see <a href="#documents">Appendix B</a> for further discussion). </p>
<p>In the rest of the Primer, the term <em>vocabulary</em> will be used when referring to a set of URIrefs defined for some specific purpose, such as the set of URIrefs defined by RDF for its own use, or the set of URIrefs defined by example.org to identify its employees. The term <em>namespace</em> will be used only when referring specifically to the syntactic concept of an XML namespace (or in describing the URI assigned to a prefix in a QName).</p>
<p>URIrefs from different vocabularies can be freely mixed in RDF graphs. For example, the graph in <a href="#figure3">Figure 3</a> uses URIrefs from the <code>exterms:</code>, <code>exstaff:</code>, and <code>dc:</code> vocabularies. Also, RDF imposes no restrictions on <a name="LCC-030" id="LCC-030">how many statements</a> using a given URIref as predicate can appear in a graph to describe the same resource. For example, if the resource <code>ex:index.html</code> had been created by the cooperative efforts of several staff members in addition to John Smith, example.org might have written the statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html dc:creator exstaff:85740 .
ex:index.html dc:creator exstaff:27354 .
ex:index.html dc:creator exstaff:00816 .
</pre>
</div>
</div>
<p>These examples of RDF statements begin to
illustrate some of the advantages of using URIrefs as RDF's
basic way of identifying things. For instance, in the first
statement, instead of
identifying the creator of the Web page by
the character string "John Smith", he has been assigned a URIref,
in this case (using a URIref based on his employee number)
<code>http://www.example.org/staffid/85740</code> . An advantage of
using a URIref in this case is that the identification
of the statement's subject can be more precise.
That is, the creator of the page is not the
character string "John Smith", or any one of the thousands of
people named John Smith, but the particular John Smith
associated with that URIref (whoever created the URIref defines
the association). Moreover, since there is a URIref to refer to
John Smith, he is a full-fledged resource, and
additional information can be recorded about him, simply by adding
additional RDF statements with John's URIref as the subject.
For example, <a href="#figure4">Figure 4</a> shows some additional
statements giving John's name and age.</p>
<div class="figure">
<img src="fig4dec16.png"
alt="More Information About John Smith" /><br />
<a id="figure4" name="figure4">Figure 4: More Information
About John Smith</a>
</div>
<p>These examples also illustrate that RDF uses URIrefs as
<em>predicates</em> in RDF statements. That is, rather than
using character strings (or words) such as "creator" or "name"
to identify properties, RDF uses URIrefs. Using URIrefs to
identify properties is important for a number of reasons.
First, it distinguishes the properties one person may use from
different properties someone else may use that would otherwise be
identified by the same character string. For instance, in the
example in <a href="#figure4">Figure
4</a>, example.org uses "name" to mean someone's full name
written out as a character string literal (e.g., "John Smith"),
but someone else may intend "name" to mean something different
(e.g., the name of a variable in a piece of program text). A
program encountering "name" as a property identifier on the Web
(or merging data from multiple sources) would not necessarily be
able to distinguish these uses. However, if example.org writes
<code>http://www.example.org/terms/name</code> for its "name"
property, and the other person writes
<code>http://www.domain2.example.org/genealogy/terms/name</code>
for hers, it is clear that there are distinct
properties involved (even if a program cannot automatically
determine the distinct meanings). Also, using URIrefs to identify properties
enables the properties to be treated as resources themselves.
Since properties are resources, additional
information can be recorded about them (e.g., the English description of what
example.org means by "name"), simply by adding additional RDF
statements with the property's URIref as the subject.</p>
<p>Using URIrefs as subjects, predicates, and objects in RDF
statements supports the development and use of shared
vocabularies on the Web, since people can discover and begin using
vocabularies already used by others to describe things, reflecting
a shared understanding of those concepts. For example, in
the triple</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html dc:creator exstaff:85740 .
</pre>
</div>
<p>the predicate <code>dc:creator</code>, when fully expanded as a
URIref, is an unambiguous reference to the "creator" attribute
in the Dublin Core metadata attribute set (discussed further in
<a href="#dublincore">Section 6.1</a>), a widely-used set of
attributes (properties) for describing information of all
kinds. The writer of this triple is effectively saying that the
relationship between the Web page (identified by
<code>http://www.example.org/index.html</code> ) and the creator of
the page (a distinct person, identified by
<code>http://www.example.org/staffid/85740</code> ) is exactly the
concept identified by
<code>http://purl.org/dc/elements/1.1/creator</code>.
<span class="newstuff"> <a name="LCC-010" id="LCC-010">Another</a>
person familiar with the Dublin Core vocabulary,
or who finds out what <code>dc:creator</code>
means (say by looking up its definition on the Web)
will know what is meant by this relationship.
In addition, based on this understanding, people can
write programs to behave in accordance with
that meaning when processing triples containing the predicate
<code>dc:creator</code>.</span></p>
<p><span class="newstuff"><a name="LCC-009" id="LCC-009">Of course,</a> this depends on increasing the general use of URIrefs to refer to things instead of using literals; e.g., using URIrefs like <code>exstaff:85740</code> and <code>dc:creator</code> instead of character string literals like <code>John Smith</code> and <code>creator</code>.</span>
Even then, RDF's use of URIrefs does not solve all identification
problems because, for example, people can still use different
URIrefs to refer to the same thing.
For this reason, it is a good idea to try to use terms from existing vocabularies (such as the
Dublin Core) where possible, rather than making up new terms that might overlap with those of
some other vocabulary. Appropriate vocabularies for use in specific application areas are
being developed all the time, as illustrated by the applications described in <a href="#applications">Section 6</a>.
However, even when synonyms are created, the fact that
these different URIrefs are used in the commonly-accessible
"Web space" provides the opportunity both to identify
equivalences among these different references, and to migrate
toward the use of common references.</p>
<div class="newstuff">
<p>In addition, it is important to distinguish between any meaning that <em>RDF itself</em> associates with terms (such as <code>dc:creator</code> in the previous example) used in RDF statements and additional, <em>externally-defined</em> meaning that people (or programs written by those people) might associate with those terms.
As a language, RDF directly defines only the graph syntax of subject, predicate, and object triples, certain meanings associated with URIrefs in the <code>rdf:</code> vocabulary, and certain other concepts to be described later. These things are normatively defined in <a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a> and <a href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>. However, RDF does not define the meanings of terms from other vocabularies, such as <code>dc:creator</code>, that might be used in RDF statements. Specific vocabularies will be created, with specific meanings assigned to the URIrefs defined in them, externally to RDF. RDF statements using URIrefs from these vocabularies may convey the specific meanings associated with those terms to people familiar with these vocabularies, or to RDF applications written to process these vocabularies, without conveying any of these meanings to an arbitrary RDF application <em>not</em> specifically written to process these vocabularies.</p>
<p>For example, people can associate meaning with
a triple such as</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html dc:creator exstaff:85740 .
</pre>
</div>
<p>based on the meaning they associate with the appearance of the
word "creator" as part of the URIref <code>dc:creator</code>, or based on
their understanding of the specific definition of <code>dc:creator</code>
in the Dublin Core vocabulary.
However, as far as an arbitrary RDF application is concerned the triple might as
well be something like</p>
<div class="exampleOuter exampleInner">
<pre>
fy:joefy.iunm ed:dsfbups fytubgg:85740 .
</pre>
</div>
<p>as far as any built-in meaning is concerned. Similarly, any
natural language text describing the meaning of <code>dc:creator</code>
that might be found on the Web provides no
additional meaning that an arbitrary RDF application can directly use.</p>
<p>Of course, URIrefs from a particular vocabulary can be used in RDF statements even though a given application may not be able to associate any special meanings with them.
For example,
generic RDF software would recognize that
the above expression is an RDF statement, that <code>ed:dsfbups</code> is the
predicate, and so on. It will simply not associate with the triple any special meaning that the vocabulary developer might have associated with a URIref like <code>ed:dsfbups</code>. Moreover, based on their understanding of a given vocabulary, people can write RDF applications to behave in accordance with the special meanings assigned to URIrefs from that vocabulary, even though that meaning will not be accessible to RDF applications not written in that way.</p>
</div>
<p>The result of all this is that RDF provides a way to make
statements that applications can more easily process. An
application cannot actually "understand" such statements, as noted
already, <span class="newstuff"> any more than a database system "understands" terms like "employee" or "salary" in processing a query like <code>SELECT NAME FROM EMPLOYEE WHERE SALARY > 35000</code>.
</span>
However, if an application is appropriately written,
it can deal with RDF statements in a way that makes it seem
like it does understand them, <span class="newstuff">just as a database system and its applications can do useful work in processing employee and payroll information without understanding "employee" and "payroll".</span>
For example, a user could search the Web for all
book reviews and create an average rating for each book. Then,
the user could put that information back on the Web. Another
Web site could take that list of book rating averages and
create a "Top Ten Highest Rated Books" page. Here, the
availability and use of a shared vocabulary about ratings, and
a shared group of URIrefs identifying the books they apply to,
allows individuals to build a mutually-understood and
increasingly-powerful (as additional contributions are made)
"information base" about books on the Web. The same principle
applies to the vast amounts of information that people create
about thousands of subjects every day on the Web.</p>
<p>RDF statements are similar to a number of other formats for
recording information, such as:</p>
<ul>
<li>entries in a simple record or catalog listing describing
the resource in a data processing system.</li>
<li>rows in a simple relational database.</li>
<li>simple assertions in formal logic</li>
</ul>
<p>and information in these formats can be treated as RDF
statements, allowing RDF to be used to integrate data from many
sources.</p>
</div>
<div class="section">
<h3><a id="structuredproperties"
name="structuredproperties"></a>2.3 Structured Property Values
and Blank Nodes</h3>
<p>Things would be very simple if the only types of information
to be recorded about things were obviously in the form of the
simple RDF statements illustrated so far. However, most
real-world data involves structures that are more complicated
than that, at least on the surface. For instance, in the
original example, the date the Web page was created is recorded
as a single <code>exterms:creation-date</code> property, with a
plain literal as its value. However, suppose
the value of the <code>exterms:creation-date</code> property
needed to record
the month, day, and year as separate pieces of information? Or,
in the case of John Smith's personal information, suppose
John's address was being described. The whole address could be
written out as a plain literal, as in the triple</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:address "1501 Grant Avenue, Bedford, Massachusetts 01730" .
</pre>
</div>
<p>However, suppose John's address needed to be recorded as a
<em>structure</em> consisting of separate street, city, state,
and postal code values? How would this be done in RDF?</p>
<p>Structured information like this is represented in RDF by
considering the aggregate thing to be described (like
John Smith's address) as a resource, and then making statements
about that new resource. So, in the RDF graph, in order to
break up John Smith's address into its component parts,
a new node is created to represent the concept of John Smith's
address, with a new URIref to identify it,
say <code>http://www.example.org/addressid/85740</code>
(abbreviated as <code>exaddressid:85740</code>).
RDF statements (additional arcs and nodes) can then be
written with that
node as the subject, to represent the additional information,
producing the graph shown in <a href="#figure5">Figure
5</a>:</p>
<div class="figure">
<img src="fig5may19.png"
alt="Breaking Up John's Address" /><br />
<a id="figure5" name="figure5">Figure 5: Breaking Up John's
Address</a>
</div>
<p>or the triples:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:address exaddressid:85740 .
exaddressid:85740 exterms:street "1501 Grant Avenue" .
exaddressid:85740 exterms:city "Bedford" .
exaddressid:85740 exterms:state "Massachusetts" .
exaddressid:85740 exterms:postalCode "01730" .
</pre>
</div>
<p>This way of representing structured information in RDF can
involve generating numerous "intermediate" URIrefs
such as <code>exaddressid:85740</code> to represent aggregate concepts such as
John's address. Such concepts may never need to be referred to
directly from outside a particular graph, and hence may not
require "universal" identifiers. In addition, in the
<em>drawing</em> of the graph representing the group of
statements shown in <a href="#figure5">Figure 5</a>,
the URIref assigned to identify "John Smith's
address" is not really needed, since the graph could just as easily
have been drawn as in <a href="#figure6">Figure 6</a>:</p>
<div class="figure">
<img src="fig6may19.png" alt="Using a Blank Node" /><br />
<a id="figure6" name="figure6">Figure 6: Using a Blank
Node</a>
</div>
<p><a href="#figure6">Figure 6</a>, which is a perfectly
good RDF graph, uses a node without a URIref to stand for
the concept of "John Smith's address". This <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node">blank
node</a> serves its purpose in the drawing without needing a
URIref, since the node itself provides the necessary
connectivity between the various other parts of the graph.
(Blank nodes were called <em>anonymous resources</em> in <a
href="#ref-rdfms">[RDF-MS]</a>.) However, some
form of explicit identifier for that node is needed in order to
represent this graph as triples. To see this, trying to
write the triples corresponding to what is shown in <a
href="#figure6">Figure 6</a> would produce something like:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:address ??? .
??? exterms:street "1501 Grant Avenue" .
??? exterms:city "Bedford" .
??? exterms:state "Massachusetts" .
??? exterms:postalCode "01730" .
</pre>
</div>
<p>where ??? stands for something that indicates the presence
of the blank node. Since a complex graph might contain more
than one blank node, there also needs to be a way to differentiate
between these different blank nodes in a triples representation
of the graph. As a result, triples use <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node-id">blank
node identifiers</a>, having the form <code>_:name</code>, to
indicate the presence of blank nodes. For instance,
in this example a blank node identifier <code>_:johnaddress</code>
might be used to refer to the blank node, in which
case the resulting triples might be:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:address _:johnaddress .
_:johnaddress exterms:street "1501 Grant Avenue" .
_:johnaddress exterms:city "Bedford" .
_:johnaddress exterms:state "Massachusetts" .
_:johnaddress exterms:postalCode "01730" .
</pre>
</div>
<p>In a triples representation of a graph, each distinct blank
node in the graph is given a different blank node identifier.
Unlike URIrefs and literals, blank node identifiers are not
considered to be actual parts of the RDF graph (this can be
seen by looking at the drawn graph in <a href="#figure6">Figure
6</a> and noting that the blank node has no blank node
identifier). Blank node identifiers are just a way of
representing the blank nodes in a graph (and distinguishing one
blank node from another) when the graph is written in triple
form. Blank node identifiers also have significance only within
the triples representing a <em>single</em> graph (two different
graphs with the same number of blank nodes might independently
use the same blank node identifiers to distinguish them, and it
would be incorrect to assume that blank nodes from different
graphs having the same blank node identifiers are the same). If
it is expected that a node in a graph will need to be
referenced from outside the graph, a URIref should be assigned
to identify it. Finally, because blank node identifiers represent
(blank) <em>nodes</em>, rather than arcs, in the triple form of
an RDF graph, blank node identifiers may only appear as subjects or
objects in triples; blank node identifiers may not be used as
predicates in triples.</p>
<p>The beginning of this section noted that aggregate structures,
like John Smith's address, can be represented by
considering the aggregate thing to be described as a separate
resource, and then making statements about that new resource.
This example illustrates an important aspect of RDF: RDF
directly represents only <em>binary</em> relationships, e.g.
the relationship between John Smith and the literal
representing his address. Representing the
relationship between John and the group of separate
<em>components</em> of this address involves dealing with an
<em>n-ary</em> (n-way) relationship (in this case, n=5) between
John and the street, city, state, and postal code components. In order
to represent such structures directly in RDF (e.g., considering
the address as a group of street, city, state, and postal code
components), this n-way relationship must be broken up
into a group of separate binary relationships. Blank nodes provide
one way to do this. For each n-ary relationship,
one of the participants is chosen as the subject of the
relationship (John in this case), and a blank node is created to
represent the rest of the relationship (John's address in this
case). The remaining participants in the
relationship (such as the city in this example) are then
represented as separate
properties of the new resource represented by the blank
node.</p>
<p>Blank nodes also provide a way to more accurately make
statements about resources that may not have URIs, but that are
described in terms of relationships with other resources that
<em>do</em> have URIs. For example, when making statements
about a person, say Jane Smith, it may seem natural to use a
URI based on that person's email address as her URI, e.g.,
<code>mailto:jane@example.org</code>. However, this approach can
cause problems. For example, it may be necessary to record information
both about <em>Jane's mailbox</em> (e.g., the server it is on) as well as
about <em>Jane herself</em> (e.g., her current physical address), and using a
URIref for Jane based on her email address makes it difficult
to know whether it is Jane or her mailbox that is being described.
The same problem exists when a company's Web page URL, say
<code>http://www.example.com/</code>, is used as the URI of the
company itself. Once again, it may be necessary to record information
about the Web page itself (e.g., who created it and when) as well as
about the company, and using <code>http://www.example.com/</code>
as an identifier for both makes it difficult to know which
of these is the actual subject.</p>
<p>The fundamental problem is that using Jane's
<em>mailbox</em> as a stand-in for <em>Jane</em> is not really
accurate: Jane and her mailbox are not the same thing, and
hence they should be identified differently. When Jane herself
does not have a URI, a blank node provides a more accurate way
of modeling this situation. Jane can be represented by a blank
node, and that blank node used as the subject of a statement
with <code>exterms:mailbox</code> as the property
and the URIref <code>mailto:jane@example.org</code> as
its value. The blank node could also be described with an
<code>rdf:type</code> property having a value of
<code>exterms:Person</code> (types are discussed in more detail
in the following sections), an <code>exterms:name</code> property
having a value of <code>"Jane Smith"</code>, and any other
descriptive information that might be useful, as shown in
the following triples:</p>
<div class="exampleOuter exampleInner">
<pre>
_:jane exterms:mailbox <mailto:jane@example.org> .
_:jane rdf:type exterms:Person .
_:jane exterms:name "Jane Smith" .
_:jane exterms:empID "23748" .
_:jane exterms:age "26" .
</pre>
</div>
<p>(Note that <code>mailto:jane@example.org</code>
is written within angle brackets in the first triple. This is because
<code>mailto:jane@example.org</code> is a full URIref in the
<code>mailto</code> URI scheme, rather than a QName abbreviation,
and full URIrefs must be enclosed in angle brackets in the triples
notation.)</p>
<p>This says, accurately, that "there is a resource of type
<code>exterms:Person</code>, whose electronic mailbox is identified
by <code>mailto:jane@example.org</code>, whose name is <code>Jane
Smith</code>, etc." That is, the blank node can be read as "there
is a resource". Statements with that blank node as subject then
provide information about the characteristics of that
resource.</p>
<p>In practice, using blank nodes instead of URIrefs in these
cases does not change the way this kind of
information is handled very much. For example, if it is known
that an email address uniquely identifies someone at
example.org (particularly if the address is unlikely to be
reused), that fact can still be used to associate information
about that person from multiple sources, even though the email
address is not the person's URI. In this case, if some
RDF is found on the Web that describes a book, and
gives the author's contact information as
<code>mailto:jane@example.org</code>, it might be reasonable,
combining this new information with the previous set of
triples, to conclude
that the author's name is Jane Smith. The point is that saying
something like "the author of the book is
<code>mailto:jane@example.org</code>" is typically a shorthand for
"the author of the book is someone whose mailbox is
<code>mailto:jane@example.org</code>". Using a blank node to
represent this "someone" is just a more accurate way to
represent the real world situation. (Incidentally, some
RDF-based schema languages allow specifying that certain
properties are <em>unique identifiers</em> of the resources they
describe. This is discussed further in
<a href="#richerschemas">Section 5.5</a>.)</p>
<div class="newstuff">
<p>Using blank nodes in this way can also help avoid the use of
literals in what might be inappropriate situations. For example,
in describing Jane's book, lacking a URIref to identify the author,
the publisher might have written (using the
publisher's own <code>ex2terms:</code> vocabulary):</p>
<div class="exampleOuter exampleInner">
<pre>
ex2terms:book78354 rdf:type ex2terms:Book .
ex2terms:book78354 ex2terms:author "Jane Smith" .
</pre>
</div>
<p>However, the author of the book is not really the character
string "Jane Smith", but a person whose <em>name</em> is
Jane Smith. The same information might be more accurately
given by the publisher using a blank node, as:</p>
<div class="exampleOuter exampleInner">
<pre>
ex2terms:book78354 rdf:type ex2terms:Book .
ex2terms:book78354 ex2terms:author _:author78354 .
_:author78354 rdf:type ex2terms:Person .
_:author78354 ex2terms:name "Jane Smith" .
</pre>
</div>
<p>This essentially says "resource <code>ex2terms:book78354</code>
is of type <code>ex2terms:Book</code>, and its author is a resource of type
<code>ex2terms:Person</code>, whose name is <code>Jane
Smith</code>." Of course, in this particular case the publisher might instead
have assigned its own URIrefs to its authors instead of using blank nodes to
identify them, in order to encourage external
references to its authors.</p>
<p>Finally, the example above giving Jane's age as 26 illustrates the fact that sometimes the value of a property may appear to be simple, but actually may be more complex. In this case, Jane's age is actually 26 <em>years</em>, but the units information (years) is not explicitly given. Such information is often omitted in contexts where it can be safely assumed that anyone accessing the property value will understand the units being used. However, in the wider context of the Web, it is generally <em>not</em> safe to make this assumption. For example, a U.S. site might give a weight value in pounds, but someone accessing that data from outside the U.S. might assume that weights are given in kilograms. In general, careful consideration should be given to explicitly representing units and similar information. This issue is discussed further in <a href="#rdfvalue">Section 4.4</a>, which describes an RDF feature for representing such information as structured values, as well as some other techniques for representing such information.</p>
</div>
</div>
<div class="section">
<h3><a id="typedliterals" name="typedliterals"></a>2.4 Typed
Literals</h3>
<p>The last section described how to handle situations
in which property values represented by plain
literals had to be broken up into structured values to
represent the individual parts of those literals. Using
this approach, instead of, say, recording the date a Web page
was created as a single <code>exterms:creation-date</code>
property, with a single plain literal as its value,
the value would be represented as a structure consisting of the month,
day, and year as separate pieces of information, using separate
plain literals to represent the corresponding values.
However, so
far, all constant values that serve as objects in RDF statements
have been represented by these plain
(untyped) literals, even when the intent is probably for the value
of the property to be a number (e.g., the value of a
<code>year</code> or <code>age</code> property) or some other kind of
more specialized value.</p>
<p>For example, <a href="#figure4">Figure 4</a>
illustrated an RDF graph recording information about John
Smith. That graph recorded the value of John Smith's
<code>exterms:age</code> property as the plain literal "27", as
shown in <a href="#figure7">Figure 7</a>:</p>
<div class="figure">
<img src="fig7dec16.png"
alt="Representing John Smith's Age" /><br />
<a id="figure7" name="figure7">Figure 7: Representing John
Smith's Age</a>
</div>
<p>In this case, the hypothetical organization example.org
probably intends for "27" to be interpreted as a number, rather
than as the string consisting of the character "2" followed by
the character "7"
<span class="newstuff">(since the literal represents the value of an "age"
property). However, there is no information in Figure 7's graph
that explicitly indicates that "27" should be interpreted as
a number. Similarly, example.org also
probably intends for "27" to be interpreted as a <em>decimal</em>
number, i.e., the value <em>twenty seven</em>, rather than, say,
as an <em>octal</em> number, i.e., the value <em>twenty three</em>.
However, once again there is no information in Figure 7's graph that
explicitly indicates this. Specific applications might be written
with the understanding that they should
interpret values of the <code>exterms:age</code> property as decimal
numbers, but this would mean that proper interpretation of this
RDF would depend on information not explicitly provided
in the RDF graph, and hence on information that would not necessarily
be available to other applications that might need to interpret this RDF.</span></p>
<p>The common practice in
programming languages or database systems is to provide this
additional information about how to interpret a literal
by associating a <em>datatype</em> with the
literal, in this case, a datatype like <code>decimal</code> or
<code>integer</code>. An application that understands the datatype
then knows, for example, whether the literal "10" is intended
to represent the number <em>ten</em>, the number <em>two</em>,
or the string consisting of the character "1" followed by the
character "0", depending on whether the specified datatype is
<code>integer</code>, <code>binary</code>, or <code>string</code>.
(More specialized datatypes could also be used to include the units information mentioned
at the end of <a href="#structuredproperties">Section 2.3</a>, e.g., a datatype
<code>integerYears</code>, although the Primer will not elaborate on this idea.)
In RDF,
<a
href="http://www.w3.org/TR/rdf-concepts/#dfn-typed-literal">typed
literals</a> are used to provide this kind of information.</p>
<p><span class="newstuff">An RDF typed literal is formed by pairing a string
with a URIref that identifies a particular datatype. This
results in a single literal node in the RDF graph with the pair as the literal.
The value represented by the typed literal is the value that
the specified datatype associates with the specified string.</span>
For example, using a typed literal, John Smith's age could be described as
being the integer number <em>27</em> using the triple:</p>
<div class="exampleOuter exampleInner">
<pre>
<http://www.example.org/staffid/85740> <http://www.example.org/terms/age> "27"^^<http://www.w3.org/2001/XMLSchema#integer> .
</pre>
</div>
<p>or, using the QName simplification for writing long
URIs:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:age "27"^^xsd:integer .
</pre>
</div>
<p>or as shown in <a href="#figure8">Figure 8</a>:</p>
<div class="figure">
<img src="fig8jul23.png"
alt="A Typed Literal for John Smith's Age" /><br />
<a id="figure8" name="figure8">Figure 8: A Typed Literal for
John Smith's Age</a>
</div>
<p>Similarly, in the graph shown in <a href="#figure3">Figure
3</a> describing information about a Web page, the
value of the page's <code>exterms:creation-date</code> property
was written as
the plain literal "August 16, 1999". However, using a typed
literal, the creation date of the Web page could be explicitly described as
being the date <em>August 16, 1999</em>, using the triple:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html exterms:creation-date "1999-08-16"^^xsd:date .
</pre>
</div>
<p>or as shown in <a href="#figure9">Figure 9</a>:</p>
<div class="figure">
<img src="fig9jul23.png"
alt="A Typed Literal for a Web Page's Creation Date" /><br />
<a id="figure9" name="figure9">Figure 9: A Typed Literal for
a Web Page's Creation Date</a>
</div>
<p>Unlike typical programming languages and database systems,
RDF has no built-in set of datatypes of its own, such as
datatypes for integers, reals, strings, or dates.
<span class="newstuff">Instead,
RDF typed literals simply provide a way to explicitly
indicate, for a given literal, what datatype should be used to
interpret it. The datatypes used in typed literals are defined
externally to RDF, and identified by their <a
href="http://www.w3.org/TR/rdf-concepts/#dfn-datatype-URI">datatype
URIs</a>.
(There is one exception: RDF defines a built-in datatype with the
URIref <code>rdf:XMLLiteral</code> to represent XML content as a literal
value. This datatype is defined in
<a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>, and its use is
described in <a href="#xmlliterals">Section 4.5</a>.)
</span>
For instance, the examples in <a href="#figure8">Figure 8</a>
and <a href="#figure9">Figure 9</a> use the datatypes <code>integer</code> and
<code>date</code> from the XML Schema datatypes defined in <a
href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2:
Datatypes</a> <a href="#ref-xmlschema2">[XML-SCHEMA2]</a>.
An advantage of this approach is that it
gives RDF the flexibility to directly represent information
coming from different sources without the need to perform type
conversions between these sources and a native set of RDF
datatypes. (Type conversions would still be required when
moving information between systems having different sets of datatypes,
but RDF would impose no extra conversions into and out
of a native set of RDF datatypes.)</p>
<div class="newstuff">
<p>RDF datatype concepts are based on
<a name="LCC-025" id="LCC-025">a conceptual framework</a>
from XML Schema datatypes <a
href="#ref-xmlschema2">[XML-SCHEMA2]</a>, as described
in <a href="http://www.w3.org/TR/rdf-concepts/">RDF
Concepts and Abstract Syntax</a> <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>.
This conceptual framework defines a datatype as consisting of:</p>
<ul>
<li>A set of values, called the <em>value space</em>, that
literals of the datatype are intended
to represent. For example, for the XML Schema datatype
<code>xsd:date</code>, this set of values is a set of dates.</li>
<li>A set of character strings, called the <em>lexical space</em>, that
the datatype uses to represent its values. This set determines
which character strings can legally be used to represent
literals of this datatype. For example, the datatype
<code>xsd:date</code> defines <code>1999-08-16</code> as being a legal
way to write a literal of this type
(as opposed, say, to <code>August 16, 1999</code>).
As defined in <a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>, the lexical space of a datatype is a set of Unicode <a href="#ref-unicode">[UNICODE]</a> strings, allowing information from many languages to be directly represented.
</li>
<li>A <em>lexical-to-value mapping</em> from the lexical
space to the value space. This determines the value that a
given character string from the lexical space represents
for this particular datatype. For example,
the lexical-to-value mapping for datatype <code>xsd:date</code>
determines that, for this datatype, the string <code>1999-08-16</code>
represents the date <em>August 16, 1999</em>. The lexical-to-value
mapping is a factor because the same character string may represent
different values for different datatypes.</li>
</ul>
<p>Not all datatypes are suitable for use in RDF. For a datatype
to be suitable for use in RDF, it
must conform to the conceptual framework just described. This basically means
that, given a character string, the datatype must
unambiguously define
whether or not the string is in its lexical space, and
what value in its value space the string represents.
For example, the basic XML Schema datatypes
such as <code>xsd:string</code>, <code>xsd:boolean</code>, <code>xsd:date</code>,
etc. are suitable
for use in RDF. However, some of the built-in XML Schema datatypes
are not suitable for use in RDF. For example, <code>xsd:duration</code> does
not have a well-defined value space, and <code>xsd:QName</code> requires an
enclosing XML document context. Lists of the XML Schema datatypes
that are currently considered suitable and unsuitable for use in
RDF are given in <a href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>.</p>
</div>
<p> <span class="newstuff">Since the value that a given typed literal denotes is defined
by the typed literal's datatype, and, with the exception of
<code>rdf:XMLLiteral</code>, RDF does not define any datatypes,
the actual interpretation of a
typed literal appearing in an RDF graph (e.g., determining
the value it denotes) must be performed by software
that is written to correctly process not only RDF, but the
typed literal's datatype as well. Effectively, this software must
be written to process an extended language that includes not
only RDF, but also the datatype, as part of its built-in
vocabulary.
This raises the issue of which datatypes will be generally available in
RDF software.
Generally, the XML Schema datatypes that are listed as suitable
for use in RDF in <a href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>
</span>
have a "first among equals" status in RDF.
As noted already, the examples in <a href="#figure8">Figure 8</a> and
<a href="#figure9">Figure 9</a>
used some of these XML Schema datatypes, and the Primer will be
using these datatypes in
most of its other examples of typed literals as well (for one thing, XML Schema
datatypes already have assigned URIrefs that can be used to refer to them, specified
in <a href="#ref-xmlschema2">[XML-SCHEMA2]</a>). These XML Schema datatypes are
treated no differently than any other datatype, but they are
expected to be the most widely used, and therefore the most
likely to be interoperable among different software. As a
result, it is expected that much RDF software will also be
written to process these datatypes. However, RDF software
could be written to process other sets of datatypes as
well, assuming they were determined to be suitable for use
with RDF, as described already.</p>
<p>In general, RDF software may be called on to process RDF
data that contains references to datatypes that the software
has not been written to
process, in which case there are some things the software
will not be able to do.
<span class="newstuff">
For one thing, with the exception of <code>rdf:XMLLiteral</code>,
RDF itself does not define the URIrefs that identify datatypes.
As a result, RDF software, unless it has been written to recognize specific
URIrefs, will not be able to determine whether or not
a URIref written in a typed literal actually identifies a datatype.
Moreover, even when a URIref does identify a datatype, RDF
itself does not define the validity of pairing that datatype
with a particular literal.</span> This validity can only be determined
by software written to correctly process that particular datatype. </p>
<p>For example, the typed literal in the triple:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:age "pumpkin"^^xsd:integer .
</pre>
</div>
<p>or the graph shown in <a href="#figure10">Figure 10</a>:</p>
<div class="figure">
<img src="fig10jul23.png"
alt="An Invalid Typed Literal for John Smith's Age" /><br />
<a id="figure10" name="figure10">Figure 10: An Invalid Typed
Literal for John Smith's Age</a>
</div>
<p>is valid RDF, but obviously an error as far as the
<code>xsd:integer</code> datatype is concerned, since <code>"pumpkin"</code> is
not defined as being in the lexical space of
<code>xsd:integer</code>.
RDF software not written to
process the <code>xsd:integer</code> datatype would not be able
to recognize <span class="newstuff">this error.</span></p>
<p class="newstuff">However, proper use of RDF typed literals provides more information about
the intended interpretation of literal values, and hence makes
RDF statements a better means of information exchange among applications.</p>
</div>
<div class="section">
<h3><a name="conceptsummary" id="conceptsummary">2.5 Concepts
Summary</a></h3>
<p>Taken as a whole, RDF is basically simple: nodes-and-arcs diagrams
interpreted as statements about things identified by URIrefs.
This section has presented an introduction to these concepts.
As noted earlier, the normative (i.e., definitive) RDF
specification describing these concepts is <a
href="http://www.w3.org/TR/rdf-concepts/">RDF Concepts and
Abstract Syntax</a> <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>, which should be
consulted for further information. The formal semantics (meaning)
of these concepts is defined in the (normative) <a
href="http://www.w3.org/TR/rdf-mt/">RDF Semantics</a> <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a> document.</p>
<p>However, in addition to the basic techniques for
describing things using RDF statements discussed
so far, it should be clear that people or organizations also need a way
to describe the <em>vocabularies</em> (terms) they intend to use in those
statements, specifically, vocabularies for:</p>
<ul>
<li>describing types of things (like <code>exterms:Person</code>)</li>
<li>describing properties (like <code>exterms:age</code> and
<code>exterms:creation-date</code>), and</li>
<li>describing the types of things that can serve as the
subjects or objects of statements involving those properties
(such as specifying that the value of an <code>exterms:age</code>
property should always be an <code>xsd:integer</code>).</li>
</ul>
<p>The basis for describing such vocabularies in RDF is the <a
href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary
Description Language 1.0: RDF Schema</a> <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a>, which will be
described in <a href="#rdfschema">Section 5</a>.</p>
<p>Additional background on the basic ideas underlying RDF, and
its role in providing a general language for describing Web
information, can be found in <a
href="#ref-webdata">[WEBDATA]</a>. RDF draws upon ideas from
knowledge representation, artificial intelligence, and data
management, including Conceptual Graphs, logic-based knowledge
representation, frames, and relational databases. Some possible
sources of background information on these subjects include <a
href="#ref-sowa">[SOWA]</a>, <a href="#ref-cg">[CG]</a>, <a
href="#ref-kif">[KIF]</a>, <a href="#ref-hayes">[HAYES]</a>, <a
href="#ref-luger">[LUGER]</a>, and <a
href="#ref-gray">[GRAY]</a>.</p>
</div>
</div>
<div class="section">
<h2><a id="rdfxml" name="rdfxml"></a>3. An XML Syntax for RDF:
RDF/XML</h2>
<p>As described in Section 2, RDF's conceptual model is a
graph. RDF provides an XML syntax for writing down and exchanging
RDF graphs, called <em>RDF/XML</em>. Unlike triples, which are
intended as a shorthand notation, RDF/XML is the normative syntax
for writing RDF. RDF/XML is defined in the <a
href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML Syntax
Specification</a> <a href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.
This section describes this RDF/XML syntax.</p>
<div class="section">
<h3><a name="basicprinciples" id="basicprinciples">3.1 Basic
Principles</a></h3>
<p>The basic ideas behind the RDF/XML syntax can be illustrated
using some of the examples presented already. Take as an example
the English statement:</p>
<p class="ptriple"><code><strong>http://www.example.org/index.html</strong>
has a <strong>creation-date</strong> whose value is <strong>August 16,
1999</strong></code></p>
<p>The RDF graph for this single statement, after assigning a
URIref to the <code>creation-date</code> property, is shown in <a
href="#figure11">Figure 11</a>:</p>
<div class="figure">
<img src="fig11dec16.png"
alt="Describing a Web Page's Creation Date" /><br />
<a id="figure11" name="figure11">Figure 11: Describing a Web
Page's Creation Date</a>
</div>
<p>with a triple representation of:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html exterms:creation-date "August 16, 1999" .
</pre>
</div>
<p class="newstuff">(Note that a typed literal is not used for the date value in
this example. Representing typed literals in RDF/XML will be
described later in this section.)</p>
<p><a href="#example2">Example 2</a> shows the RDF/XML syntax
corresponding to the graph in <a href="#figure11">Figure
11</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example2" name="example2">Example 2: RDF/XML for the
Web Page's Creation Date</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:exterms="http://www.example.org/terms/">
4. <rdf:Description rdf:about="http://www.example.org/index.html">
5. <exterms:creation-date>August 16, 1999</exterms:creation-date>
6. </rdf:Description>
7. </rdf:RDF>
</pre>
</div>
</div>
<p>(Line numbers are added to help in explaining the
example.)</p>
<p>This seems like a lot of overhead. It is easier to understand
what is going on by considering each part of this XML in turn
(a brief introduction to XML is provided in <a
href="#documents">Appendix B</a>).</p>
<p>Line 1, <code><?xml version="1.0"?></code>, is the <em>XML
declaration</em>, which indicates that the following content is XML,
and what version of XML it is.</p>
<p>Line 2 begins an <code>rdf:RDF</code> element. This indicates
that the following XML content (starting here and ending with
the <code></rdf:RDF></code> in line 7) is intended to
represent RDF. Following the <code>rdf:RDF</code> on this same line
is an XML namespace declaration, represented as an
<code>xmlns</code> attribute of the <code>rdf:RDF</code> start-tag.
<a name="LCC-012a" id="LCC-012a">This declaration</a>
specifies that all tags in this content
prefixed with <code>rdf:</code> are part of the namespace
identified by the URIref
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>.
<span class="newstuff">URIrefs beginning with the string
<code>http://www.w3.org/1999/02/22-rdf-syntax-ns#</code>
are used for terms from the RDF vocabulary.</span></p>
<p>Line 3 specifies another XML namespace declaration, this
time for the prefix <code>exterms:</code>. This is expressed as
another <code>xmlns</code> attribute of the <code>rdf:RDF</code>
element, and specifies that the namespace URIref
<code>http://www.example.org/terms/</code> is to be associated with
the <code>exterms:</code> prefix.
<span class="newstuff">URIrefs beginning with the string
<code>http://www.example.org/terms/</code>
are used for terms from the vocabulary defined by the example organization,
example.org.</span>
The ">" at the end of line 3 indicates the end
of the <code>rdf:RDF</code> start-tag. Lines 1-3 are general
"housekeeping" necessary to indicate that this is
RDF/XML content, and to identify the namespaces being used
within the RDF/XML content.</p>
<p>Lines 4-6 provide the RDF/XML for the specific statement
shown in <a href="#figure11">Figure
11</a>. An obvious way to talk about any RDF
statement is to say it is a <em>description</em>, and that it is
<em>about</em> the subject of the statement (in this case,
about http://www.example.org/index.html), and this is the way
RDF/XML represents the statement. The <code>rdf:Description</code>
start-tag in line 4 indicates the start of a
<em>description</em> of a resource, and goes on to identify the
resource the statement is <em>about</em> (the subject of the
statement) using the <code>rdf:about</code> attribute to specify
the URIref of the subject resource.
<span class="newstuff">Line 5 provides a
<em>property element</em>, with the QName
<code>exterms:creation-date</code> as its tag, to
represent the predicate and object of the statement.
The QName <code>exterms:creation-date</code> is chosen
so that appending
the local name <code>creation-date</code> to the URIref of the
<code>exterms:</code> prefix (<code>http://www.example.org/terms/</code>)
gives the statement's predicate URIref
<code>http://www.example.org/terms/creation-date</code>.
The content of this property element is the object of the
statement, the plain literal <code>August 19, 1999</code>
(the value of the creation-date property of the subject resource).
</span>
The property element is nested within the containing
<code>rdf:Description</code> element, indicating that this property
applies to the resource specified in the <code>rdf:about</code>
attribute of the <code>rdf:Description</code> element. Line 6
indicates the end of this particular <code>rdf:Description</code>
element.</p>
<p>Finally, Line 7 indicates the end of the <code>rdf:RDF</code>
element started on line 2. Using an <code>rdf:RDF</code> element
to enclose RDF/XML content is optional in situations where
the XML can be identified as RDF/XML by context. This is discussed
further in <a href="#ref-rdf-syntax">[RDF-SYNTAX]</a>. However, it
does not hurt to provide the <code>rdf:RDF</code> element in any case,
and Primer examples will generally (but not always) provide one.</p>
<p><a href="#example2">Example 2</a> illustrates the basic
ideas used by RDF/XML to encode an RDF graph as XML elements,
attributes, element content, and attribute values. The URIrefs
of predicates (as well as some nodes) are written as XML
<em>QNames</em>, consisting of a short <em>prefix</em> denoting
a namespace URI, together with a <em>local name</em> denoting a
namespace-qualified element or attribute, as described in <a
href="#documents">Appendix B</a>. The (namespace URIref, local
name) pair is chosen so that concatenating them forms the
URIref of the original node or predicate. The URIrefs of subject nodes are
written as XML attribute values (URIrefs of object nodes may sometimes be
written as attribute values as well). Literal nodes
(which are always object nodes) become element text content or
attribute values. (Many of these options are described later in
the Primer; all of these options are described in <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.)</p>
<p>An RDF graph consisting of multiple statements can be represented
in RDF/XML by using RDF/XML similar to Lines 4-6 in
<a href="#example2">Example 2</a> to separately represent each
statement. For example, to write the following two
statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html exterms:creation-date "August 16, 1999" .
ex:index.html dc:language "en" .
</pre>
</div>
<p>the RDF/XML in <a href="#example3">Example
3</a> could be used:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example3" name="example3">Example 3: RDF/XML for Two
Statements</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:dc="http://purl.org/dc/elements/1.1/"
4. xmlns:exterms="http://www.example.org/terms/">
5. <rdf:Description rdf:about="http://www.example.org/index.html">
6. <exterms:creation-date>August 16, 1999</exterms:creation-date>
7. </rdf:Description>
8. <rdf:Description rdf:about="http://www.example.org/index.html">
9. <dc:language>en</dc:language>
10. </rdf:Description>
11. </rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example3">Example 3</a> is the same as <a
href="#example2">Example 2</a>, with the addition of
a second <code>rdf:Description</code> element (in lines 8-10)
to represent the second statement. (An additional namespace declaration
is also given in line 3
to identify the additional namespace used in this statement.)
An arbitrary number of
additional statements could be written in the same way, using a separate
<code>rdf:Description</code> element for each additional statement.
As <a href="#example3">Example 3</a> illustrates, once the
overhead of writing the XML and namespace declarations is dealt
with, writing each additional RDF statement in RDF/XML is both
straightforward and not too complicated.</p>
<p>The RDF/XML syntax provides a number of abbreviations to
make common uses easier to write. For example, it is typical
for the same resource to be described with several properties
and values at the same time, as in <a href="#example3">Example
3</a>, where the resource <code>ex:index.html</code> is the subject
of several statements. To handle such cases, RDF/XML allows
multiple property elements representing those properties to be
nested within the <code>rdf:Description</code> element that
identifies the subject resource. For example, to
represent the following group of statements about
<code>http://www.example.org/index.html</code>:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html dc:creator exstaff:85740 .
ex:index.html exterms:creation-date "August 16, 1999" .
ex:index.html dc:language "en" .
</pre>
</div>
<p>whose graph (the same as <a href="#figure3">Figure 3</a>) is
shown in <a href="#figure12">Figure 12</a>:</p>
<div class="figure">
<img src="fig3nov19.png"
alt="Several Statements About the Same Resource" /><br />
<a id="figure12" name="figure12">Figure 12: Several
Statements About the Same Resource</a>
</div>
<p>the RDF/XML shown in <a
href="#example4">Example 4</a> could be written:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example4" name="example4">Example 4: Abbreviating
Multiple Properties</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:dc="http://purl.org/dc/elements/1.1/"
4. xmlns:exterms="http://www.example.org/terms/">
5. <rdf:Description rdf:about="http://www.example.org/index.html">
6. <exterms:creation-date>August 16, 1999</exterms:creation-date>
7. <dc:language>en</dc:language>
8. <dc:creator rdf:resource="http://www.example.org/staffid/85740"/>
9. </rdf:Description>
10. </rdf:RDF>
</pre>
</div>
</div>
<p>Compared with the previous two examples, <a
href="#example4">Example 4</a> adds an additional <code>dc:creator</code>
property element (in line 8). In addition, the
property elements for the three properties whose subject is
<code>http://www.example.org/index.html</code> are nested within a single
<code>rdf:Description</code> element identifying that subject,
rather than writing a separate <code>rdf:Description</code> element
for each statement.</p>
<p>Line 8 also introduces a new form of property element. The
<code>dc:language</code> element in line 7 is similar to the
<code>exterms:creation-date</code> element used in <a
href="#example2">Example 2</a>. Both these elements represent
properties with plain literals as property values, and such
elements are written by enclosing the literal within start-
and end-tags corresponding to the property name. However, the
<code>dc:creator</code> element on line 8 represents a property
whose value is <em>another resource</em>, rather than a
literal. If the URIref of this resource were written as a
plain literal within start- and end-tags in the same way as
the literal values of the other elements, this would
say that the value of the <code>dc:creator</code> element was
the <em>character string</em>
<code>http://www.example.org/staffid/85740</code>, rather than the
resource identified by that literal interpreted as a URIref. In
order to indicate the difference, the
<code>dc:creator</code> element is written using what XML calls an
<em>empty-element tag</em> (it has no separate end-tag), and
the property value is written using an <code>rdf:resource</code>
attribute within that empty element. The <code>rdf:resource</code>
attribute indicates that the property element's value is
another resource, identified by its URIref. Because the URIref
is being used as an attribute <em>value</em>, RDF/XML requires
the URIref to be written out (as an absolute or relative URIref),
rather than abbreviating it as a
QName as was done in writing element and attribute
<em>names</em> (absolute and relative URIrefs are discussed in
<a href="#identifiers">Appendix A</a>).</p>
<p>It is important to understand that the RDF/XML in <a
href="#example4">Example 4</a> is an <em>abbreviation</em>. The
RDF/XML in <a href="#example5">Example 5</a>, in which each
statement is written separately, describes exactly the same RDF
graph (the graph of <a href="#figure12">Figure 12</a>):</p>
<div class="exampleOuter">
<div class="c1">
<a id="example5" name="example5">Example 5: Writing Example
4 as Separate Statements</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.org/index.html">
<exterms:creation-date>August 16, 1999</exterms:creation-date>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
<dc:language>en</dc:language>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
<dc:creator rdf:resource="http://www.example.org/staffid/85740"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>The following sections will describe a few additional
RDF/XML abbreviations. <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a> provides a more thorough
description of the abbreviations that are available.</p>
<p>RDF/XML can also represent graphs that include
nodes that have no URIrefs, i.e., the <em>blank nodes</em>
described in <a href="#structuredproperties">Section 2.3</a>. For
example, <a href="#figure13">Figure 13</a> (taken from <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>) shows a graph saying
"the document 'http://www.w3.org/TR/rdf-syntax-grammar' has a
title 'RDF/XML Syntax Specification (Revised)' and has an
editor, the editor has a name 'Dave Beckett' and a home page
'http://purl.org/net/dajobe/' ".</p>
<div class="figure">
<img src="fig13dec16.png"
alt="A Graph Containing a Blank Node" /><br />
<a id="figure13" name="figure13">Figure 13: A Graph
Containing a Blank Node</a>
</div>
<p>This illustrates an idea discussed in <a
href="#structuredproperties">Section 2.3</a>: the use of a
blank node to represent something that does not have a URIref,
but can be described in terms of other information. In this
case, the blank node represents a person, the editor of the
document, and the person is described by his name and home
page.</p>
<p>RDF/XML provides several ways to represent graphs
containing blank nodes. These are all described in <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>. The approach
illustrated here, which is the most direct approach, is to
assign a <em>blank node identifier</em> to each blank node. A
blank node identifier serves to identify a blank node within a
particular RDF/XML document but, unlike a URIref, is unknown
outside the document in which it is assigned. A blank node is
referred to in RDF/XML using an <code>rdf:nodeID</code> attribute,
with a blank node identifier as its value, in places where the
URIref of a resource would otherwise appear. Specifically,
a statement with a blank node as its <em>subject</em> can be written in
RDF/XML using an <code>rdf:Description</code> element with
an <code>rdf:nodeID</code> attribute instead of an
<code>rdf:about</code> attribute. Similarly, a statement with a
blank node as its <em>object</em> can be written using a property
element with an <code>rdf:nodeID</code> attribute instead of an
<code>rdf:resource</code> attribute. Using <code>rdf:nodeID</code>, <a
href="#example6">Example 6</a> shows the RDF/XML corresponding
to <a href="#figure13">Figure 13</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example6" name="example6">Example 6: RDF/XML
Describing a Blank Node</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:dc="http://purl.org/dc/elements/1.1/"
4. xmlns:exterms="http://example.org/stuff/1.0/">
5. <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar">
6. <dc:title>RDF/XML Syntax Specification (Revised)</dc:title>
7. <exterms:editor rdf:nodeID="abc"/>
8. </rdf:Description>
9. <rdf:Description rdf:nodeID="abc">
10. <exterms:fullName>Dave Beckett</exterms:fullName>
11. <exterms:homePage rdf:resource="http://purl.org/net/dajobe/"/>
12. </rdf:Description>
13. </rdf:RDF>
</pre>
</div>
</div>
<p>In <a href="#example6">Example 6</a>, the blank node
identifier <code>abc</code> is used in line 9 to identify the blank
node as the subject of several statements, and is used in line
7 to indicate that the blank node is the value of a resource's
<code>exterms:editor</code> property. The advantage of using a
blank node identifier over some of the other approaches
described in <a href="#ref-rdf-syntax">[RDF-SYNTAX]</a> is that
using a blank node identifier allows the same blank node to be
referred to in more than one place in the same RDF/XML
document.</p>
<p>Finally, the <em>typed literals</em> described in <a
href="#typedliterals">Section 2.4</a> may be used as property
values instead of the plain literals used in the
examples so far. A typed literal is represented in RDF/XML by
adding an <code>rdf:datatype</code> attribute specifying a datatype
URIref to the property element containing the literal.</p>
<p>For example, to change the statement in <a
href="#example2">Example 2</a> to use a typed literal instead
of a plain literal for the <code>exterms:creation-date</code> property, the
triple representation would be:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:index.html exterms:creation-date "1999-08-16"^^xsd:date .
</pre>
</div>
<p>with corresponding RDF/XML syntax shown in <a
href="#example7">Example 7</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example7" name="example7">Example 7: RDF/XML Using a
Typed Literal</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3. xmlns:exterms="http://www.example.org/terms/">
4. <rdf:Description rdf:about="http://www.example.org/index.html">
5. <exterms:creation-date rdf:datatype=
"http://www.w3.org/2001/XMLSchema#date">1999-08-16
</exterms:creation-date>
6. </rdf:Description>
7. </rdf:RDF>
</pre>
</div>
</div>
<p>In line 5 of <a href="#example7">Example 7</a>, a typed
literal is given as the value of the <code>exterms:creation-date</code>
property element by adding an <code>rdf:datatype</code> attribute
to the element's start-tag to specify the datatype. The value
of this attribute is the URIref of the datatype, in this case,
the URIref of the XML Schema <code>date</code> datatype. Since this
is an attribute value, the URIref must be written out, rather
than using the QName abbreviation <code>xsd:date</code>
used in the triple. A literal appropriate to this datatype is
then written as the element content, in this case, the literal
<code>1999-08-16</code>, which is the literal representation for
August 16, 1999 in the XML Schema <code>date</code> datatype.</p>
<div class="newstuff">
<p>In the
<a name="LCC-013" id="LCC-013">rest of the Primer,</a> the examples will
use typed literals from appropriate datatypes rather than
plain (untyped) literals, in order to emphasize the value of
typed literals in conveying more information about the intended
interpretation of literal values. (The exceptions will be that plain
literals will continue to be used in
examples taken from actual applications that do not currently use
typed literals, in order to accurately reflect the usage in those
applications.)
In RDF/XML, both plain and typed literals (and, with certain exceptions, tags) can contain Unicode <a href="#ref-unicode">[UNICODE]</a> characters, allowing information from many languages to be directly represented.
</p>
<p><a href="#example7">Example 7</a> illustrates that using typed literals requires writing an <code>rdf:datatype</code> attribute with
a URIref identifying the datatype for each element whose value is a typed literal. As noted earlier, RDF/XML requires that URIrefs used as attribute values
must be written out, rather than abbreviated as a QName.
XML <em>entities</em> can be used in RDF/XML to improve readability
in such cases, by providing an additional abbreviation
facility for URIrefs. Essentially, an XML entity declaration
associates a name with a string of characters. When the entity
name is referenced elsewhere within an XML document, XML processors replace
the reference with the corresponding string. For example, the
<code>ENTITY</code> declaration (specified as part of a <code>DOCTYPE</code>
declaration at the beginning of the RDF/XML document):</p>
<div class="exampleOuter exampleInner">
<pre>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
</pre>
</div>
<p>defines the entity <code>xsd</code> to be the string representing the
namespace URIref for XML Schema datatypes. This declaration allows
the full namespace URIref to be abbreviated elsewhere in the XML
document by the <dfn>entity reference</dfn> <code>&xsd;</code>.
Using this abbreviation,
<a href="#example7">Example 7</a> could also be written as shown in
<a href="#example8">Example 8</a>.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example8" name="example8">Example 8: RDF/XML Using a
Typed Literal and an XML Entity</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:exterms="http://www.example.org/terms/">
5. <rdf:Description rdf:about="http://www.example.org/index.html">
6. <exterms:creation-date rdf:datatype="&xsd;date">1999-08-16
</exterms:creation-date>
7. </rdf:Description>
8. </rdf:RDF>
</pre>
</div>
</div>
<p>The <code>DOCTYPE</code> declaration in line 2 defines the entity
<code>xsd</code>, which is used in line 6.</p>
<p>The use of XML entities as an abbreviation mechanism is optional
in RDF/XML, and hence the use of an XML <code>DOCTYPE</code> declaration
is also optional
in RDF/XML. (For readers familiar with XML, RDF/XML is only required
to be "well-formed" XML. RDF/XML is not designed to be
validated against a DTD by a validating XML processor. This is
discussed more fully in <a href="#documents">Appendix B</a>, which
provides additional information about XML.)</p>
<p>For readability purposes, examples in the rest of the
Primer will use the XML entity <code>xsd</code> as just described.
XML entities are discussed
further in <a href="#documents">Appendix B</a>.
As illustrated in <a href="#documents">Appendix B</a>,
other URIrefs (and, more generally, other strings)
can also be abbreviated using XML entities.
However, the URIrefs for XML Schema datatypes are the only ones that will be
abbreviated in this way in Primer examples. </p>
</div>
<p>Although additional abbreviated forms for writing RDF/XML
are available, the facilities illustrated so far
provide a simple but general way to express graphs in
RDF/XML. Using these facilities, an RDF graph is written in
RDF/XML as follows:</p>
<ul>
<li>All blank nodes are assigned blank node identifiers.</li>
<li>Each node is listed in turn as the subject of an
un-nested <code>rdf:Description</code> element, using an
<code>rdf:about</code> attribute if the node has a URIref, or
an <code>rdf:nodeID</code> attribute if the node is
blank.<br />
For each triple with this node as subject, an appropriate
property element is created, with either literal content
(possibly empty), an <code>rdf:resource</code> attribute
specifying the object of the triple (if the object node has a
URIref), or an <code>rdf:nodeID</code> attribute specifying
the object of the triple (if the object node is blank).</li>
</ul>
<p>Compared to some of the more abbreviated
approaches described in <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>, this simple
approach provides the most direct representation
of the actual graph structure, and is particularly recommended
for applications in which the output RDF/XML is to be used in
further RDF processing.</p>
</div>
<div class="section">
<h3><a name="newresources" id="newresources">3.2 Abbreviating
and Organizing RDF URIrefs</a></h3>
<p>So far, the examples have assumed that the resources
being described have been given URIrefs already. For instance, the initial
examples provided descriptive information about
example.org's Web page, whose URIref was
<code>http://www.example.org/index.html</code>. This resource was identified
in RDF/XML
using an <code>rdf:about</code> attribute citing its full URIref.
Although RDF does not specify or control how URIrefs are
assigned to resources, sometimes it is desirable to achieve the
effect of assigning URIrefs to resources that are part
of an organized group of resources. For example, suppose a
sporting goods company, example.com, wanted to provide an
RDF-based catalog of its products, such as tents, hiking boots,
and so on, as an RDF/XML document, identified by (and located
at) <code>http://www.example.com/2002/04/products</code>. In that
resource, each product might be given a separate RDF
description. This catalog, along with one of these
descriptions, the catalog entry for a model of tent called the
"Overnighter", might be written in RDF/XML as shown in <a
href="#example9">Example 9</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example9" name="example9">Example 9: RDF/XML for
example.com's Catalog</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:exterms="http://www.example.com/terms/">
5. <rdf:Description rdf:ID="item10245">
6. <exterms:model rdf:datatype="&xsd;string">Overnighter</exterms:model>
7. <exterms:sleeps rdf:datatype="&xsd;integer">2</exterms:sleeps>
8. <exterms:weight rdf:datatype="&xsd;decimal">2.4</exterms:weight>
9. <exterms:packedSize rdf:datatype="&xsd;integer">784</exterms:packedSize>
10. </rdf:Description>
...other product descriptions...
11. </rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example9">Example 9</a> is similar to previous
examples in the way it represents the properties (model,
sleeping capacity, weight) of the resource (the tent) being
described.
(The surrounding xml, DOCTYPE, RDF, and namespace
information is included in lines 1 through 4, and line 11, but this
information would only need to be provided once for the whole
catalog, not repeated for each entry in the catalog.
Note also that although the <em>datatypes</em> associated with the various property values
are given explicitly, the <em>units</em> associated with some of these property values are not, even
though this information should be available to properly interpret the values. Representing units and similar information that may be associated with property values is discussed in <a href="#rdfvalue">Section 4.4</a>. In this example, the value of <code>exterms:sleeps</code> is the number of persons the tent can sleep, the value of <code>exterms:weight</code> is given in kilograms, and the value of <code>exterms:packedSize</code> is given in square centimeters, the area the tent occupies on a backpack.)</p>
<p>An important <em>difference</em> from previous examples
is that, in line 5, the <code>rdf:Description</code>
element has an <code>rdf:ID</code> attribute instead of an
<code>rdf:about</code> attribute. Using <code>rdf:ID</code> specifies
a <em>fragment identifier</em>, given by the
value of the <code>rdf:ID</code> attribute (<code>item10245</code> in
this case, which might be the catalog number assigned by
example.com), as an abbreviation of the complete URIref of the
resource being described. The fragment identifier
<code>item10245</code> will be interpreted relative to a <em>base
URI</em>, in this case, the URI of the containing catalog
document. The full URIref for the tent is formed by taking the
base URI (of the catalog), and appending the character
"<code>#</code>" (to
indicate that what follows is a fragment identifier) and then
<code>item10245</code> to it, giving the absolute URIref
<code>http://www.example.com/2002/04/products#item10245</code>.</p>
<p>The <code>rdf:ID</code> attribute is somewhat similar to the <code>ID</code>
attribute in XML and HTML, in that it defines a name which must
be unique relative to the current base URI (in this example, that of the catalog).
In this case, the <code>rdf:ID</code>
attribute appears to be assigning a name (<code>item10245</code>)
to this particular kind of tent. Any other RDF/XML within this
catalog could refer to the tent by using either the absolute URIref
<code>http://www.example.com/2002/04/products#item10245</code>,
or the <em>relative URIref</em> <code>#item10245</code>. The
relative URIref would be understood as being a URIref defined relative to the
base URIref of the catalog. Using a similar abbreviation,
the URIref of the tent could also be given by specifying
<code>rdf:about="#item10245"</code> in the catalog entry (i.e., by
specifying the relative URIref directly) instead of
<code>rdf:ID="item10245"</code> . As an abbreviation mechanism,
the two forms are essentially
synonyms: the full URIref formed by RDF/XML is the same in
either case:
<code>http://www.example.com/2002/04/products#item10245</code>.
However, using <code>rdf:ID</code> provides an additional check
when assigning a set of distinct names, since a given value of the
<code>rdf:ID</code> attribute can only appear once relative to the
same base URI (the catalog document, in this example). Using
either form, example.com would be giving the URIref for the
tent in a two-stage process, first assigning the URIref for the
whole catalog, and then using a relative URIref in the
description of the tent in the catalog to indicate the URIref
that has been assigned to this particular kind of tent.
Moreover, this use of a relative URIref can be thought of either
as being an abbreviation for a full URIref that has been
assigned to the tent independently of the RDF, or as being the
assignment of the URIref to the tent within the catalog.</p>
<p>RDF located <em>outside</em> the catalog could refer to this
tent by using the full URIref, i.e., by concatenating the
relative URIref <code>#item10245</code> of the tent to the base URI
of the catalog, forming the absolute URIref
<code>http://www.example.com/2002/04/products#item10245</code>. For
example, an outdoor sports Web site exampleRatings.com might
use RDF to provide ratings of various tents. The (5-star)
rating given to the tent described in <a
href="#example9">Example 9</a> might then be represented on
exampleRatings.com's Web site as shown in <a
href="#example10">Example 10</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example10" name="example10">Example 10:
exampleRatings.com's Rating of the Tent</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:sportex="http://www.exampleRatings.com/terms/">
5. <rdf:Description rdf:about="http://www.example.com/2002/04/products#item10245">
6. <sportex:ratingBy rdf:datatype="&xsd;string">Richard Roe</sportex:ratingBy>
7. <sportex:numberStars rdf:datatype="&xsd;integer">5</sportex:numberStars>
8. </rdf:Description>
9. </rdf:RDF>
</pre>
</div>
</div>
<p>In <a href="#example10">Example 10</a>, line 5 uses an
<code>rdf:Description</code> element with an <code>rdf:about</code>
attribute whose value is the full URIref of the tent. The use
of this URIref allows the tent being referred to in the rating
to be precisely identified.</p>
<p>These examples illustrate several points. First, even though
RDF does not specify or control how URIrefs are assigned to
resources (in this case, the various tents and other items in
the catalog), the <em>effect</em> of assigning URIrefs to
resources in RDF can be achieved by combining a process
(external to RDF) that identifies a single document (the
catalog in this case) as the source for descriptions of those
resources, with the use of relative URIrefs in descriptions of
those resources within that document. For instance, example.com
could use this catalog as the central source where its products
are described, with the understanding that if a product's item
number is not in an entry in this catalog, it is not a product
known to example.com. (Note that RDF does not assume any
particular relationship exists between two resources just
because their URIrefs have the same base, or are otherwise
similar. This relationship may be known to example.com, but it
is not directly defined by RDF.)</p>
<p>These examples also illustrate one of the basic
architectural principles of the Web, <span class="newstuff">which is that
<a name="LCC-019" id="LCC-019">anyone</a>
should be able to freely add information
about an existing resource, using any vocabulary they
please</span> <a href="#ref-berners-lee98">[BERNERS-LEE98]</a>. The examples
further illustrate that the RDF describing a particular
resource does not need to be located all in one place; instead,
it may be distributed throughout the Web. This is true not only
for situations like this one, in which one organization is
rating or commenting on a resource defined by another, but also
for situations in which the original definer of a resource (or
anyone else) wishes to amplify the description of that resource
by providing additional information about it. This may be done
by modifying the RDF document in which the resource was
originally described, to add the properties and values needed
to describe the additional information. Or, as this example
illustrates, a separate document could be created, providing the
additional properties and values in <code>rdf:Description</code>
elements that refer to the original resource via its URIref
using <code>rdf:about</code>.</p>
<p>The discussion above indicated that relative URIrefs
such as <code>#item10245</code> will be interpreted relative to a
<em>base URI</em>. By default, this base URI would be the URI
of the resource in which the relative URIref is used.
However, in some cases it is desirable to be able to explicitly
specify this base URI. For instance, suppose that in addition
to the catalog located at
<code>http://www.example.com/2002/04/products</code>, example.org
wanted to provide a duplicate catalog on a mirror site, say at
<code>http://mirror.example.com/2002/04/products</code>. This could
create a problem, since if the catalog was accessed from the
mirror site, the URIref for the example tent would be generated
from the URI of the containing document, forming
<code>http://mirror.example.com/2002/04/products#item10245</code>,
rather than
<code>http://www.example.com/2002/04/products#item10245</code>, and
hence would apparently refer to a different resource than the
one intended. Alternatively, example.org might want to assign a
base URIref for its set of product URIrefs <em>without</em> publishing a
single source document whose location defines the base.</p>
<p>To deal with such cases, RDF/XML supports <a
href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML
Base</a> <a href="#ref-xml-base">[XML-BASE]</a>, which allows
an XML document to specify a base URI other than the URI of the
document itself. <a href="#example11">Example 11</a> shows how
the catalog would be described using XML Base:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example11" name="example11">Example 11: Using XML
Base in example.com's Catalog</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:exterms="http://www.example.com/terms/"
5. xml:base="http://www.example.com/2002/04/products">
6. <rdf:Description rdf:ID="item10245">
7. <exterms:model rdf:datatype="&xsd;string">Overnighter</exterms:model>
8. <exterms:sleeps rdf:datatype="&xsd;integer">2</exterms:sleeps>
9. <exterms:weight rdf:datatype="&xsd;decimal">2.4</exterms:weight>
10. <exterms:packedSize rdf:datatype="&xsd;integer">784</exterms:packedSize>
11. </rdf:Description>
...other product descriptions...
12. </rdf:RDF>
</pre>
</div>
</div>
<p>In <a href="#example11">Example 11</a>, the
<code>xml:base</code> declaration in line 5 specifies that the base
URI for the content within the <code>rdf:RDF</code> element (until
another <code>xml:base</code> attribute is specified) is
<code>http://www.example.com/2002/04/products</code>, and all
relative URIrefs cited within that content will be interpreted
relative to that base, no matter what the URI of the containing
document is. As a result, the relative URIref of the tent,
<code>#item10245</code>, will be interpreted as the same absolute
URIref,
<code>http://www.example.com/2002/04/products#item10245</code>, no
matter what the actual URI of the catalog document is, or
whether the base URIref actually identifies a particular
document at all.</p>
<p>So far, the examples have used a single product
description, a particular model of tent, from example.com's
catalog. However, example.com will probably offer several
different models of tents, as well as multiple instances of
other categories of products, such as backpacks, hiking boots,
and so on. This idea of things being classified into different
<em>kinds</em> or <em>categories</em> is similar to the
programming language concept of objects having different
<em>types</em> or <em>classes</em>. RDF supports this concept
by providing a predefined property, <code>rdf:type</code>. When an
RDF resource is described with an <code>rdf:type</code> property,
the value of that property is considered to be a resource that
represents a category or <em>class</em> of things, and the
subject of that property is considered to be an
<em>instance</em> of that category or class. Using
<code>rdf:type</code>, <a href="#example12">Example 12</a> shows
how example.com might indicate that the product description is
that of a tent:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example12" name="example12">Example 12: Describing a
Tent with <code>rdf:type</code></a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:exterms="http://www.example.com/terms/"
5. xml:base="http://www.example.com/2002/04/products">
6. <rdf:Description rdf:ID="item10245">
7. <rdf:type rdf:resource="http://www.example.com/terms/Tent"/>
8. <exterms:model rdf:datatype="&xsd;string">Overnighter</exterms:model>
9. <exterms:sleeps rdf:datatype="&xsd;integer">2</exterms:sleeps>
10. <exterms:weight rdf:datatype="&xsd;decimal">2.4</exterms:weight>
11. <exterms:packedSize rdf:datatype="&xsd;integer">784</exterms:packedSize>
12. </rdf:Description>
...other product descriptions...
13. </rdf:RDF>
</pre>
</div>
</div>
<p>In <a href="#example12">Example 12</a>, the
<code>rdf:type</code> property in line 7 indicates that the
resource being described is an instance of the class identified by the URIref
<code>http://www.example.com/terms/Tent</code>. This assumes
that example.com has described its classes as part of
the same vocabulary that it uses to describe its other terms
(such as the property <code>exterms:weight</code>), so the
absolute URIref of the class is used to refer to it. If example.com had
described these classes as part of the product catalog itself,
the relative URIref <code>#Tent</code> could have been used to refer
to it.</p>
<p>RDF itself does not provide facilities for defining
application-specific classes of things, such as <code>Tent</code>
in this example, or their properties, such as <code>exterms:weight</code>.
Instead, such classes would be described in an <em>RDF schema</em>,
using the <em>RDF Schema</em> language
discussed in <a href="#rdfschema">Section 5</a>. Other such
facilities for describing classes can also be defined, such as
the <em>DAML+OIL</em> and <em>OWL</em> languages described in
<a href="#richerschemas">Section 5.5</a>.</p>
<p>It is fairly common in RDF for resources to have <code>rdf:type</code>
properties that describe the resources as instances of specific types
or classes. Such resources are called <em>typed nodes</em> in the
graph, or <em>typed node elements</em> in the RDF/XML.
RDF/XML provides a special abbreviation for describing
these typed nodes. In this abbreviation, the
<code>rdf:type</code> property and its value are removed, and the
<code>rdf:Description</code> element for the node is replaced by an element
whose name is the QName corresponding to the value of the
removed <code>rdf:type</code> property (a URIref that names a class).
Using this abbreviation, example.com's tent from <a
href="#example12">Example 12</a> could also be described as
shown in <a href="#example13">Example 13</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example13" name="example13">Example 13: Abbreviating
the Tent's Type</a>
</div>
<div class="exampleInner">
<pre>
1. <?xml version="1.0"?>
2. <!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
3. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4. xmlns:exterms="http://www.example.com/terms/"
5. xml:base="http://www.example.com/2002/04/products">
6. <exterms:Tent rdf:ID="item10245">
7. <exterms:model rdf:datatype="&xsd;string">Overnighter</exterms:model>
8. <exterms:sleeps rdf:datatype="&xsd;integer">2</exterms:sleeps>
9. <exterms:weight rdf:datatype="&xsd;decimal">2.4</exterms:weight>
10. <exterms:packedSize rdf:datatype="&xsd;integer">784</exterms:packedSize>
11. </exterms:Tent>
...other product descriptions...
12. </rdf:RDF>
</pre>
</div>
</div>
<div class="newstuff">
<p>Since a resource may be described as an instance of more
than one class, a resource may have more than one
<code>rdf:type</code> property. However, only one of these
<code>rdf:type</code> properties can be abbreviated in this way.
The others must be written out using <code>rdf:type</code> properties,
in the manner illustrated by the
<code>rdf:type</code> property in <a href="#example12">Example 12</a>.</p>
<p>In addition to its use in describing instances of user-defined
classes such as <code>exterms:Tent</code>, the typed node abbreviation
is also commonly used in RDF/XML when describing instances of
the built-in RDF classes (such as <code>rdf:Bag</code>) to be
described in <a href="#othercapabilities">Section 4</a>, and
the built-in RDF Schema classes (such as <code>rdfs:Class</code>) to be described in
<a href="#rdfschema">Section 5</a>.</p>
</div>
<p>Both <a href="#example12">Example 12</a> and <a
href="#example13">Example 13</a> illustrate that RDF statements
can be written in RDF/XML in a way that closely resembles
descriptions that might have been written directly in (non-RDF) XML. This
is an important consideration, given the increasing use of XML
in all kinds of applications, since it suggests that RDF could
be used in these applications without requiring major changes
in the way their information is structured.</p>
</div>
<div class="section">
<h3><a name="rdfxmlsummary" id="rdfxmlsummary">3.3 RDF/XML
Summary</a></h3>
<p>The examples above have illustrated some of the basic ideas
behind the RDF/XML syntax. These examples provide enough
information to begin writing useful RDF/XML.
A more thorough discussion of the principles behind the
modeling of RDF statements in XML (known as <em>striping</em>),
together with a presentation of the other RDF/XML abbreviations
available, and other details and examples about writing RDF in
XML, is given in the (normative) <a
href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML Syntax
Specification</a> <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.</p>
</div>
</div>
<div class="section">
<h2><a id="othercapabilities" name="othercapabilities"></a>4.
Other RDF Capabilities</h2>
<p>RDF provides a number of additional capabilities,
<span class="newstuff">such as
built-in types and properties for representing groups of
resources and RDF statements, and capabilities for representing
XML fragments as property values.</span> These additional capabilities
are described in the following sections.</p>
<div class="section">
<h3><a name="containers" id="containers">4.1 RDF
Containers</a></h3>
<p>There is often a need to describe <em>groups</em> of things:
for example, to say that a book was created by
several authors, or to list the students in a course, or the
software modules in a package. RDF provides several predefined
(built-in) types and properties that can be used to describe such
groups.</p>
<p>First, RDF provides a <em>container vocabulary</em>
consisting of three predefined types (together with some
associated predefined properties). A <em>container</em> is a
resource that contains things. The contained things are called
<em>members</em>. The members of a container may be resources
(including blank nodes) or literals. RDF defines three types of containers:</p>
<ul>
<li><code>rdf:Bag</code></li>
<li><code>rdf:Seq</code></li>
<li><code>rdf:Alt</code></li>
</ul>
<p>A <em>Bag</em> (a resource having type <code>rdf:Bag</code>)
<span class="newstuff">represents</span>
a group of resources or literals, possibly including duplicate
members, where there is no significance in the order of the
members. For example, a Bag might be used to describe a group
of part numbers in which the order of entry or processing of
the part numbers does not matter.</p>
<p>A <em>Sequence</em> or <em>Seq</em> (a resource having type
<code>rdf:Seq</code>) <span class="newstuff">represents</span>
a group of resources or literals, possibly
including duplicate members, where the order of the members is
significant. For example, a Sequence might be used to describe
a group that must be maintained in alphabetical order.</p>
<p>An <em>Alternative</em> or <em>Alt</em> (a resource having
type <code>rdf:Alt</code>) <span class="newstuff">represents</span>
a group of resources or literals that
are <em>alternatives</em> (typically for a single value of a
property). For example, an Alt might be used to describe
alternative language translations for the title of a book, or
to describe a list of alternative Internet sites at which a
resource might be found. An application using a property whose
value is an Alt container should be aware that it can choose
any one of the members of the group as appropriate.</p>
<p>To describe a resource as being one of these types of
containers, the resource is given an <code>rdf:type</code> property
whose value is one of the predefined resources
<code>rdf:Bag</code>, <code>rdf:Seq</code>, or <code>rdf:Alt</code>
(whichever is appropriate). The container resource (which may
either be a blank node or a resource with a URIref) denotes the
group as a whole. The <em>members</em> of the container can be
described by defining a <em>container membership property</em>
for each member with the container resource as its subject and
the member as its object. These container membership properties
have names of the form <code>rdf:_<em>n</em></code>, where
<em>n</em> is a decimal integer greater than zero, with no
leading zeros, e.g., <code>rdf:_1</code>, <code>rdf:_2</code>,
<code>rdf:_3</code>, and so on, and are used specifically for
describing the members of containers. Container resources may
also have other properties that describe the container, in
addition to the container membership properties and the
<code>rdf:type</code> property.</p>
<p>It is important to understand that while these types of
containers are described using predefined RDF types and
properties, any special meanings associated with these
containers, e.g., that the members of an Alt container are
alternative values, are only <em>intended</em> meanings. These
specific container types, and their definitions, are provided
with the aim of establishing a shared convention among those
who need to describe groups of things. All RDF does is provide
the types and properties that can be used to construct the RDF
graphs to describe each type of container. RDF has no more
built-in understanding of what a resource of type
<code>rdf:Bag</code> is than it has of what a resource of type
<code>ex:Tent</code> (discussed in <a
href="#newresources">Section 3.2</a>) is. In each case,
applications must be written to behave according to the
particular meaning involved for each type. This point will be
expanded on in the following examples.</p>
<p>A typical use of a container is to indicate that the value
of a property is a group of things. For example, to represent
the sentence "Course 6.001 has the students Amy, Mohamed, Johann,
Maria, and Phuong", the course could be described by giving it a
<code>s:students</code> property (from an appropriate vocabulary)
whose value is a container of type
<code>rdf:Bag</code> (<span class="newstuff">representing</span>
the group of students). Then, using the
container membership properties, individual
students could be identified as being members of that group,
as in the RDF
graph shown in <a href="#figure14">Figure 14</a>:</p>
<div class="newstuff">
<div class="figure">
<img src="fig14july12.png"
alt="A Simple Bag Container Description" /><br />
<a id="figure14" name="figure14">Figure 14: A Simple Bag
Container Description</a>
</div>
</div>
<p>Since the value of the <code>s:students</code> property in this
example is described as a Bag, there is no intended
significance in the order given for the URIrefs of the
students, even though the membership properties in the graph have integers
in their names. It is up to applications creating and
processing graphs that include <code>rdf:Bag</code> containers to
ignore any (apparent) order in the names of the membership
properties.</p>
<p>RDF/XML provides some special syntax and abbreviations to
make it simpler to describe such containers. For example, <a
href="#example14">Example 14</a> describes the graph shown in
<a href="#figure14">Figure 14</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example14" name="example14">Example 14: RDF/XML for
a Bag of Students</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/students/vocab#">
<rdf:Description rdf:about="http://example.org/courses/6.001">
<s:students>
<rdf:Bag>
<rdf:li rdf:resource="http://example.org/students/Amy"/>
<rdf:li rdf:resource="http://example.org/students/Mohamed"/>
<rdf:li rdf:resource="http://example.org/students/Johann"/>
<rdf:li rdf:resource="http://example.org/students/Maria"/>
<rdf:li rdf:resource="http://example.org/students/Phuong"/>
</rdf:Bag>
</s:students>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example14">Example 14</a> shows that RDF/XML
provides <code>rdf:li</code> as a convenience element to avoid having
to explicitly number each membership property. The numbered
properties <code>rdf:_1</code>, <code>rdf:_2</code>, and so on are
generated from the <code>rdf:li</code> elements in forming the
corresponding graph. The element name <code>rdf:li</code> was chosen to
be mnemonic with the term "list item" from HTML. Note also the
use of a <code><rdf:Bag></code> element nested within the
<code><s:students></code> property element. The
<code><rdf:Bag></code> element is another example of the
abbreviation used in <a href="#example13">Example 13</a>
that replaces both an <code>rdf:Description</code> element
and an <code>rdf:type</code> element with a single element
when describing an instance of a type (an instance of
<code>rdf:Bag</code> in this case). Since
no URIref is specified, the Bag is a blank node. Its nesting
within the <code><s:students></code> property element is an
abbreviated way of indicating that the blank node is the value
of this property. These abbreviations are described further in
<a href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.</p>
<p>The graph structure for an <code>rdf:Seq</code> container, and
the corresponding RDF/XML, are similar to those for an
<code>rdf:Bag</code> (the only difference is in the type,
<code>rdf:Seq</code>). Once again, although an <code>rdf:Seq</code>
container is intended to describe a sequence, it is up to
applications creating and processing the graph to appropriately
interpret the sequence of integer-valued property names.</p>
<p>To illustrate an Alt container, the sentence "The
source code for X11 may be found at ftp.example.org,
ftp1.example.org, or ftp2.example.org" could be expressed in
the RDF graph shown in <a href="#figure15">Figure 15</a>:</p>
<div class="newstuff">
<div class="figure">
<img src="fig15july12.png"
alt="A Simple Alt Container Description" /><br />
<a id="figure15" name="figure15">Figure 15: A Simple Alt
Container Description</a>
</div>
</div>
<p><a href="#example15">Example 15</a> shows how the graph in
<a href="#figure15">Figure 15</a> could be written in
RDF/XML:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example15" name="example15">Example 15: RDF/XML for
an Alt Container</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/packages/vocab#">
<rdf:Description rdf:about="http://example.org/packages/X11">
<s:DistributionSite>
<rdf:Alt>
<rdf:li rdf:resource="ftp://ftp.example.org"/>
<rdf:li rdf:resource="ftp://ftp1.example.org"/>
<rdf:li rdf:resource="ftp://ftp2.example.org"/>
</rdf:Alt>
</s:DistributionSite>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>An Alt container is intended to have at least one member,
identified by the property <code>rdf:_1</code>. This member is
intended to be considered as the default or preferred value.
Other than the member identified as <code>rdf:_1</code>, the order
of the remaining elements is not significant.</p>
<p>The RDF in <a href="#figure15">Figure 15</a> <em>as
written</em> states simply that the value of the
<code>s:DistributionSite</code> site property is the Alt container
resource itself. Any additional meaning that is to be read into
this graph, e.g., that one of the <em>members</em> of the Alt
container is to be considered as the value of the
<code>s:DistributionSite</code> site property, or that
<code>ftp://ftp.example.org</code> is the default or preferred
value, must be built into an application's understanding of
the intended meaning of
an Alt container, and/or into the meaning defined
for the particular property (<code>s:DistributionSite</code> in
this case), which also must be understood by the
application.</p>
<p>Alt containers are frequently used in conjunction with
language tagging. (RDF/XML permits the use of the <code>xml:lang</code>
attribute defined in <a href="#ref-xml">[XML]</a> to indicate
that the element content is in a specified language. The use
of <code>xml:lang</code> is described in <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>, and illustrated later in
<a href="#prism">Section 6.2</a>.) For example, a work whose title has been
translated into several languages might have its <code>title</code>
property pointing to an Alt container holding literals representing
the titles expressed in each of the language variants.</p>
<p>The distinction between the intended meanings of a Bag and
an Alt can be further illustrated by considering the authorship
of the book "Huckleberry Finn". The book has exactly one
author, but the author has two names (Mark Twain and Samuel
Clemens). Either name is sufficient to specify the author. Thus
using an Alt container for the author's names more accurately
represents the relationship than using a Bag (which might
suggest there are two <em>different</em> authors).</p>
<p>Users are free to choose their own ways to describe groups of
resources, rather than using the RDF container vocabulary. These RDF
containers are merely provided as common definitions that, if
generally used, could help make data involving groups of
resources more interoperable.</p>
<p>Sometimes there are clear alternatives to using these RDF
container types. For example, a relationship between a
particular resource and a group of other resources could be
indicated by making the first resource the subject of multiple
statements using the same property. This is structurally different
from the resource being the subject of a single
statement whose object is a container containing multiple
members. In some cases, these two structures may have
equivalent meaning, but in other cases they may not. The choice
of which to use in a given situation should be made with this
in mind.</p>
<p>Consider as an example the relationship between a writer and
her publications, as in the sentence:</p>
<blockquote>
<p>Sue has written "Anthology of Time", "Zoological
Reasoning", and "Gravitational Reflections".</p>
</blockquote>
<p>In this case, there are three resources each of which was
written independently by the same writer. This could be
expressed using repeated properties as:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:Sue exterms:publication ex:AnthologyOfTime .
exstaff:Sue exterms:publication ex:ZoologicalReasoning .
exstaff:Sue exterms:publication ex:GravitationalReflections .
</pre>
</div>
<p>In this example there is no stated relationship between the
publications other than that they were written by the same
person. Each of the statements is an independent fact, and so
using repeated properties would be a reasonable choice.
However, this could just as reasonably be represented as a
statement about the group of resources written by Sue:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:Sue exterms:publication _:z .
_:z rdf:type rdf:Bag .
_:z rdf:_1 ex:AnthologyOfTime .
_:z rdf:_2 ex:ZoologicalReasoning .
_:z rdf:_3 ex:GravitationalReflections .
</pre>
</div>
<p>On the other hand, the sentence:</p>
<blockquote>
<p>The resolution was approved by the Rules Committee, having
members Fred, Wilma, and Dino.</p>
</blockquote>
<p>says that the committee <em>as a whole</em> approved the resolution;
it does not necessarily state that each committee member
<em>individually</em> voted in favor of the resolution. In this case, it
would be potentially misleading to model this sentence as three
separate <code>exterms:approvedBy</code> statements, one for each
committee member, as shown below:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:resolution exterms:approvedBy ex:Fred .
ex:resolution exterms:approvedBy ex:Wilma .
ex:resolution exterms:approvedBy ex:Dino .
</pre>
</div>
<p>since these statements say that each member individually
approved the resolution.</p>
<p>In this case, it would be better to model the sentence as a
single <code>exterms:approvedBy</code> statement whose subject is
the resolution and whose object is the committee itself. The
committee resource could then be described as a Bag whose
members are the members of the committee, as in the following
triples:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:resolution exterms:approvedBy ex:rulesCommittee .
ex:rulesCommittee rdf:type rdf:Bag .
ex:rulesCommittee rdf:_1 ex:Fred .
ex:rulesCommittee rdf:_2 ex:Wilma .
ex:rulesCommittee rdf:_3 ex:Dino .
</pre>
</div>
<p>When using RDF containers, it is important to
understand that the statements are not <em>constructing</em> containers,
as in a programming language data structure. Instead,
the statements are <em>describing</em> containers (groups of things) that
presumably exist. For instance, in the Rules Committee example
just given, the Rules Committee is an unordered group of
people, whether it is described in RDF that way or not.
Saying that the resource <code>ex:rulesCommittee</code> has type
<code>rdf:Bag</code> is not saying that the Rules Committee is a data
structure, or constructing a particular data structure
to hold the members of the group (the
Rules Committee could be described as a Bag without
describing any members at
all). Instead, it is describing the Rules Committee as having
characteristics corresponding to those associated with a Bag
container, namely that it has members, and their order of description
is not significant.
Similarly, using the container membership
properties simply describes a container resource as
having certain things as members. This does not necessarily
say that the things described as members are the
<em>only</em> members that exist. For example, the triples
given above to describe the Rules Committee say only that Fred,
Wilma, and Dino are members of the committee, not that they are the
<em>only</em> members of the committee.</p>
<div class="newstuff">
<p>Also, <a href="#example14">Example 14</a> and
<a href="#example15">Example 15</a> illustrated a common "pattern"
in describing containers, regardless of the type of container
involved (e.g., use of a blank node with
an appropriate <code>rdf:type</code> property to
represent the container itself, and use of <code>rdf:li</code> to
generate sequentially-numbered container membership properties).
However, it is important to understand that RDF does not
<em>enforce</em> this particular way of using the RDF
container vocabulary, and so it is possible to use this
vocabulary in other ways. For example, in some cases
it might be appropriate to
use a container resource having a URIref rather
than using a blank node.
<a name="LCC-026b" id="LCC-026b">Moreover,</a> it is possible
to use the container vocabulary in ways that may not
describe graphs with the "well-formed" structures
shown in the previous examples.
For example, <a href="#example16">Example 16</a> shows
the RDF/XML for a graph similar to the Alt container shown in
<a href="#figure15">Figure 15</a>, but which writes the container
membership properties explicitly, rather than using
<code>rdf:li</code> to generate them:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example16" name="example16">Example 16: RDF/XML for
an "Ill-Formed" Alt Container</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/packages/vocab#">
<rdf:Description rdf:about="http://example.org/packages/X11">
<s:DistributionSite>
<rdf:Alt>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
<rdf:_2 rdf:resource="ftp://ftp.example.org"/>
<rdf:_2 rdf:resource="ftp://ftp1.example.org"/>
<rdf:_5 rdf:resource="ftp://ftp2.example.org"/>
</rdf:Alt>
</s:DistributionSite>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>As noted in <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>,
RDF imposes no "well-formedness" conditions on the use of
the container vocabulary, so <a href="#example16">Example 16</a>
is perfectly legal, even though the container
is described as <em>both</em> a Bag and an Alt, it is
described as having
two distinct values of the <code>rdf:_2</code> property,
and it does not have <code>rdf:_1</code>, <code>rdf:_3</code>,
or <code>rdf:_4</code> properties.</p>
<p>As a result, RDF applications that require containers
to be "well-formed" should be written to check that the
container vocabulary is being used appropriately, in order to
be fully robust.</p>
</div>
</div>
<div class="section">
<h3><a name="collections" id="collections">4.2 RDF
Collections</a></h3>
<p>A limitation of the containers described in <a
href="#containers">Section 4.1</a> is that there is no way to
<em>close</em> them, i.e., to say "these are all the members of
the container". As noted in <a
href="#containers">Section 4.1</a>, a container
only says that certain identified
resources are members; it does not say that other members do
not exist. Also, while one graph may describe
some of the members, there is no way to exclude the possibility
that there is another graph somewhere that describes additional
members. RDF provides support for describing groups containing
only the specified members, in the form of RDF
<em>collections</em>. An RDF collection is a group of things
represented as a list structure in the RDF graph. This list
structure is constructed using a predefined <em>collection
vocabulary</em> consisting of the predefined type
<code>rdf:List</code>, the predefined properties <code>rdf:first</code>
and <code>rdf:rest</code>, and the predefined resource
<code>rdf:nil</code>.</p>
<p>To illustrate this, the sentence "The
students in course 6.001 are Amy, Mohamed, and Johann" could be represented
using the
graph shown in <a href="#figure16">Figure 16</a>:</p>
<div class="newstuff">
<div class="figure">
<img src="fig16bjuly12.png"
alt="An RDF Collection (list structure)" /><br />
<a id="figure16" name="figure16">Figure 16: An RDF
Collection (list structure)</a>
</div>
<p>In this graph, each member of the collection, such as
<code>s:Amy</code>, is the object of an <code>rdf:first</code> property whose
subject is a resource (a blank node in this example) that
represents a list.
This list resource is linked to the rest of the list by an
<code>rdf:rest</code> property. The end of the list is indicated by
the <code>rdf:rest</code> property having as its object the resource
<code>rdf:nil</code> (the resource <code>rdf:nil</code> represents the empty
list, and is defined as being of type <code>rdf:List</code>).
This structure will be familiar to those who
know the Lisp programming language. As in Lisp, the
<code>rdf:first</code> and <code>rdf:rest</code> properties allow
applications to traverse the structure.
Each of the blank nodes forming this list structure is
implicitly of type <code>rdf:List</code>
(that is, each of these nodes implicitly has an <code>rdf:type</code> property whose
value is the predefined type <code>rdf:List</code>),
although this is not explicitly shown in the graph.
The RDF Schema language <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a>
defines the properties <code>rdf:first</code> and <code>rdf:rest</code>
as having subjects of type <code>rdf:List</code>, so the information about
these nodes being lists can generally be inferred, rather than the corresponding
<code>rdf:type</code> triples being written out all the time.</p>
</div>
<p>RDF/XML provides a special notation to make it easy to
describe collections using graphs of this form.
In RDF/XML, a collection can be described by
a property element that has the attribute
<code>rdf:parseType="Collection"</code>, and that contains a group
of nested elements representing the members of the collection.
<span class="newstuff">RDF/XML provides the <code>rdf:parseType</code> attribute to
indicate that the contents of an element are to be interpreted
in a special way. In this case, the <code>rdf:parseType="Collection"</code>
attribute indicates that the enclosed elements are to be used to
create the corresponding list structure in the RDF graph
(other values of the <code>rdf:parseType</code> attribute will
be described in later sections of the Primer).</span></p>
<p>To illustrate how <code>rdf:parseType="Collection"</code> works,
the RDF/XML from <a
href="#example17">Example 17</a> would result in the RDF graph
shown in <a href="#figure16">Figure 16</a>:</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example17" name="example17">Example 17: RDF/XML for
a Collection of Students</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/students/vocab#">
<rdf:Description rdf:about="http://example.org/courses/6.001">
<s:students rdf:parseType="Collection">
<rdf:Description rdf:about="http://example.org/students/Amy"/>
<rdf:Description rdf:about="http://example.org/students/Mohamed"/>
<rdf:Description rdf:about="http://example.org/students/Johann"/>
</s:students>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>The use of <code>rdf:parseType="Collection"</code> in RDF/XML always
defines a list structure like the one
shown in <a href="#figure16">Figure 16</a>, i.e., a
fixed finite list of items with a given length and terminated
by <code>rdf:nil</code>, and which uses "new" blank nodes that are
unique to the list structure itself. However, RDF does not
<em>enforce</em> this particular way of using the RDF
collection vocabulary, and so it is possible to use this
vocabulary in other ways, some of which may not describe lists
or closed collections.
To see why, note that the graph shown in <a href="#figure16">Figure 16</a>
could also be written in RDF/XML by writing out the same triples "in longhand"
(without using <code>rdf:parseType="Collection"</code>) using the
collection vocabulary, as in
<a href="#example18">Example 18</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example18" name="example18">Example 18: RDF/XML for
a Collection of Students in "Longhand"</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/students/vocab#">
<rdf:Description rdf:about="http://example.org/courses/6.001">
<s:students rdf:nodeID="sch1"/>
</rdf:Description>
<rdf:Description rdf:nodeID="sch1">
<rdf:first rdf:resource="http://example.org/students/Amy"/>
<rdf:rest rdf:nodeID="sch2"/>
</rdf:Description>
<rdf:Description rdf:nodeID="sch2">
<rdf:first rdf:resource="http://example.org/students/Mohamed"/>
<rdf:rest rdf:nodeID="sch3"/>
</rdf:Description>
<rdf:Description rdf:nodeID="sch3">
<rdf:first rdf:resource="http://example.org/students/Johann"/>
<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>As noted in <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>
(and as was the case for the container vocabulary described
in <a href="#containers">Section 4.1</a>),
<a name="LCC-026a" id="LCC-026a">RDF imposes</a> no "well-formedness"
conditions on the use of the collection vocabulary so, when
writing triples in longhand, it is possible to define RDF
graphs with structures other than the well-structured graphs
that would be automatically
generated by using <code>rdf:parseType="Collection"</code>.
For example, it is not illegal to assert that a given node has
two distinct values of the <code>rdf:first</code> property, to
create structures that have forked or non-list tails, or to
simply omit part of the description of a collection.
Also, graphs defined by using the collection vocabulary
in longhand could use URIrefs to identify the components of the list
instead of blank nodes unique to the list structure. In this case,
it would be possible to create triples in other graphs that
effectively added elements to the collection, making it non-closed.</p>
<p>As a result, RDF applications that require collections
to be well-formed should be written to check that the
collection vocabulary is being used appropriately, in order to
be fully robust. In addition, languages such as
<a
href="http://www.w3.org/TR/owl-ref/">OWL</a> <a
href="#ref-owl">[OWL]</a>,
which can define additional constraints on
the structure of RDF graphs, can rule out some of these cases.</p>
</div>
</div>
<div class="section">
<h3><a name="reification" id="reification">4.3 RDF
Reification</a></h3>
<div class="newstuff">
<p>RDF applications sometimes need to describe other RDF statements
using RDF, for instance, to record information about when
statements were made, who made them, or other similar
information (this is sometimes referred to as "provenance"
information). For example, <a href="#example9">Example 9</a> in
<a href="#newresources">Section 3.2</a>
described a particular tent with URIref <code>exproducts:item10245</code>,
offered for sale by example.com.
One of the triples from that description, describing the weight
of the tent, was:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:item10245 exterms:weight "2.4"^^xsd:decimal .
</pre>
</div>
<p>and it might be useful for example.com to record who provided that particular
piece of information. </p>
<p>RDF provides a built-in vocabulary intended for describing RDF statements.
A description of a statement using this vocabulary is called a
<em>reification</em> of the statement.
The RDF reification vocabulary consists of the type
<code>rdf:Statement</code>, and the properties
<code>rdf:subject</code>, <code>rdf:predicate</code>, and
<code>rdf:object</code>. However, while RDF provides this
reification vocabulary, care is needed in using it, because it
is easy to imagine that the vocabulary defines some things that are
not actually defined. This point will be discussed further later in
this section.</p>
<p>Using the reification vocabulary, a <em>reification</em> of the statement
about the tent's weight would be given by assigning the statement
a URIref such as <code>exproducts:triple12345</code>
(so statements can be written describing it), and then
describing the statement using the statements:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:triple12345 rdf:type rdf:Statement .
exproducts:triple12345 rdf:subject exproducts:item10245 .
exproducts:triple12345 rdf:predicate exterms:weight .
exproducts:triple12345 rdf:object "2.4"^^xsd:decimal .
</pre>
</div>
<p>These statements say that the resource identified by the URIref
<code>exproducts:triple12345</code> is an RDF statement, that the subject
of the statement refers to the resource identified by <code>exproducts:item10245</code>,
the predicate of the statement refers to the resource identified by <code>exterms:weight</code>,
and the object of the statement refers to the decimal value identified by the typed literal
<code>"2.4"^^xsd:decimal</code>.
Assuming that the original statement is actually identified by
<code>exproducts:triple12345</code>, it should be clear by comparing the original
statement with the reification that the reification
actually does describe it. The conventional use of the RDF reification
vocabulary always involves describing a statement using four statements
in this pattern; the four statements are sometimes referred to as a
"reification quad" for this reason.</p>
<p>Using reification according to this convention, example.com could
record the
fact that John Smith made the original statement about the tent's weight
by first assigning the original statement a URIref (such as
<code>exproducts:triple12345</code> as before), describing that statement
using the reification just described, and then adding an additional
statement that <code>exproducts:triple12345</code> was
written by John Smith (using a URIref to identify which John
Smith is being referred to). The resulting statements would be:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:triple12345 rdf:type rdf:Statement .
exproducts:triple12345 rdf:subject exproducts:item10245 .
exproducts:triple12345 rdf:predicate exterms:weight .
exproducts:triple12345 rdf:object "2.4"^^xsd:decimal .
exproducts:triple12345 dc:creator exstaff:85740 .
</pre>
</div>
<p>The original statement, together with the reification
and the attribution of the statement to John Smith,
forms the graph shown in <a href="#figure17">Figure 17</a>:</p>
<div class="figure">
<img src="reificationFigJul22.png"
alt="A Statement, Its Reification, and Its Attribution" /><br />
<a id="figure17" name="figure17">Figure 17: A Statement, Its
Reification, and Its Attribution</a>
</div>
<p>This graph
could be written in RDF/XML as shown in
<a href="#example19">Example 19</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example19" name="example19">Example 19: RDF/XML for
the Reification Example</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:exterms="http://www.example.com/terms/"
xml:base="http://www.example.com/2002/04/products">
<rdf:Description rdf:ID="item10245">
<exterms:weight rdf:datatype="&xsd;decimal">2.4</exterms:weight>
</rdf:Description>
<rdf:Statement rdf:about="#triple12345">
<rdf:subject rdf:resource="http://www.example.com/2002/04/products#item10245"/>
<rdf:predicate rdf:resource="http://www.example.com/terms/weight"/>
<rdf:object rdf:datatype="&xsd;decimal">2.4</rdf:object>
<dc:creator rdf:resource="http://www.example.com/staffid/85740"/>
</rdf:Statement>
</rdf:RDF>
</pre>
</div>
</div>
<p><a href="#newresources">Section 3.2</a> introduced the use of the
<code>rdf:ID</code> attribute in RDF/XML in an <code>rdf:Description</code>
element to abbreviate the URIref of the subject of a statement.
<code>rdf:ID</code> can also be used in a
property element to automatically produce a reification of the triple that
the property element generates. <a href="#example20">Example 20</a>
shows how this could be used to produce the same graph
as <a href="#example19">Example 19</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example20" name="example20">Example 20: Generating Reifications
using <code>rdf:ID</code></a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:exterms="http://www.example.com/terms/"
xml:base="http://www.example.com/2002/04/products">
<rdf:Description rdf:ID="item10245">
<exterms:weight rdf:ID="triple12345" rdf:datatype="&xsd;decimal">2.4
</exterms:weight>
</rdf:Description>
<rdf:Description rdf:about="#triple12345">
<dc:creator rdf:resource="http://www.example.com/staffid/85740"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>In this case, specifying the attribute <code>rdf:ID="triple12345"</code>
in the <code>exterms:weight</code> element results in
the original triple describing the tent's weight:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:item10245 exterms:weight "2.4"^^xsd:decimal .
</pre>
</div>
<p>plus the reification triples:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:triple12345 rdf:type rdf:Statement .
exproducts:triple12345 rdf:subject exproducts:item10245 .
exproducts:triple12345 rdf:predicate exterms:weight .
exproducts:triple12345 rdf:object "2.4"^^xsd:decimal .
</pre>
</div>
<p>The subject of these reification triples
is a URIref formed by concatenating the base URI of the document
(given in the <code>xml:base</code> declaration), the character
"<code>#</code>" (to indicate that what follows is a fragment
identifier), and the value of the <code>rdf:ID</code> attribute;
that is, the triples have the same subject
<code>exproducts:triple12345</code> as in the previous examples.</p>
<p>Note that asserting the reification is not
the same as asserting the original statement, and
neither implies the other. That is, when someone says that
John said something about the weight of a tent, they are
not making a statement about the weight of a tent themselves,
they are making a statement about something John said.
Conversely, when someone describes
the weight of a tent, they are
not also making a statement about a statement they made (since they
may have no intention of talking about things called "statements").</p>
<p>The text above deliberately referred in a number of places to
"the conventional use of reification". As noted earlier, care is needed when using
the RDF reification vocabulary because it is easy to imagine that
the vocabulary defines some things that are not actually defined.
While there are applications that successfully use reification, they do so by
following some conventions, and making some assumptions, that are
in addition to the actual meaning that RDF defines for the reification
vocabulary, and the actual facilities that RDF provides to support it.</p>
<p>For one thing, it is important to
note that in the conventional use of reification, the subject of
the reification triples is assumed to identify
a <em>particular instance</em>
of a triple in a particular RDF document, rather than some
arbitrary triple having the same subject, predicate, and
object. This particular convention is used because
reification is intended for expressing properties such
as dates of composition and source information, as in the
examples given already, and these properties need to be applied to specific
instances of triples. There could be several triples that have the same
subject, predicate, and object and, although a graph is
defined as a <em>set</em> of triples, several instances with the same
triple structure might occur in different documents. Thus,
to fully support this convention,
there needs to be some means of associating the subject of the reification
triples with <em>an individual triple in some document</em>.
However, RDF provides no way to do this.</p>
<p>For instance, in the examples above, there is no explicit information
in either the triples or the RDF/XML that actually indicates that
the original statement describing the tent's weight is the resource
<code>exproducts:triple12345</code>, the resource that is the subject of
the four reification statements and the statement
that John Smith created it.
This can be seen by looking at the drawn graph shown in
<a href="#figure17">Figure 17</a>.
The original statement is certainly part of this graph, but
as far as the information in the graph is concerned,
<code>exproducts:triple12345</code> is a separate resource, rather
than identifying that part of the graph.
RDF does not provide a built-in way of indicating how a URIref
like <code>exproducts:triple12345</code> is associated
with a particular statement or graph, any more than it provides
a built-in way of indicating how a URIref like <code>exproducts:item10245</code>
is associated with an actual tent.
Associating specific URIrefs with specific resources (statements
in this case) must be done using mechanisms outside of RDF.</p>
<p>Using <code>rdf:ID</code> as shown in <a href="#example20">Example 20</a>
generates the reification
automatically, and provides a convenient way of indicating the
URIref to be used as the subject of the statements in the reification.
Moreover, it provides a partial "hook" relating the triples
in the reification with the piece of RDF/XML syntax that caused
them to be created, since the value <code>triple12345</code> of
the <code>rdf:ID</code> attribute is used to generate the URIref
of the subject of the reification triples. However, this
relationship is once again outside RDF, since there is nothing
in the resulting triples that explicitly says that the original
triple had the URIref <code>exproducts:triple12345</code> (RDF
does not assume there is any relationship between a URIref
and any RDF/XML that it might have been used or abbreviated in).</p>
<p>The lack of a built-in means for assigning URIrefs to
statements does not mean that "provenance" information
of this kind cannot
be expressed in RDF, just that it cannot be done using only the
meaning RDF associates with the reification vocabulary. For
example, if an RDF document (say, a Web page) has a URI,
statements could be made about the resource identified by that URI
and, based on some application-dependent understanding of how
those statements should be interpreted, an application could act as if those
statements "distribute" over (apply equally to) all the
statements in the document. Also, if some mechanism exists
(outside of RDF) to assign URIs to individual RDF statements,
then statements could certainly be made about those individual
statements, using their URIs to identify them. However, in these cases,
it would also not be strictly necessary to use the reification vocabulary
in the conventional way.</p>
<p>To see this, assuming the original statement:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:item10245 exterms:weight "2.4"^^xsd:decimal .
</pre>
</div>
<p>had a URIref of
<code>exproducts:triple12345</code>, the statement could be
attributed to John Smith simply by the statement:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:triple12345 dc:creator exstaff:85740 .
</pre>
</div>
<p>with no use of the reification vocabulary (although the
description of <code>exproducts:triple12345</code> as having
<code>rdf:type</code> <code>rdf:Statement</code> might also be helpful).</p>
<p>In addition, the reification vocabulary could be used
directly according to the convention described
above, along with an application-dependent understanding as to
how to associate specific triples with their reifications.
However, other applications receiving this RDF would not
necessarily share this application-dependent understanding, and
thus would not necessarily interpret the graphs
appropriately.</p>
<p>It is also important to note that the interpretation of reification described here is not the same as "quotation", as found in some languages. Instead, the reification describes the relationship between a particular instance of a triple and the resources the triple refers to. The reification can be read intuitively as saying "this RDF triple talks about these things", rather than (as in quotation) "this RDF triple has this form." For instance, in the reification example used in this section, the triple:</p>
<div class="exampleOuter exampleInner">
<pre>
exproducts:triple12345 rdf:subject exproducts:item10245 .
</pre>
</div>
<p>describing the <code>rdf:subject</code> of the original statement says that the subject of the statement is the resource (the tent) identified by the URIref <code>exproducts:item10245</code>. It does <em>not</em> say that the subject of the statement is the URIref itself (i.e., a string beginning with certain characters), as quotation would do. </p>
</div>
</div>
<div class="section">
<h3><a name="rdfvalue" id="rdfvalue">4.4 More on Structured
Values: rdf:value</a></h3>
<p><a href="#structuredproperties">Section 2.3</a> noted
that the RDF model intrinsically supports only
<em>binary</em> relations; that is, a statement specifies a
relation between two resources. For example, the statement:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:manager exstaff:62345 .
</pre>
</div>
<p>states that the relation <code>exterms:manager</code> holds between two
employees (presumably one manages the other).</p>
<p>However, in some cases it is necessary to represent
information involving higher arity relations (relations between
more than two resources) in RDF.
<a href="#structuredproperties">Section 2.3</a> discussed one example of
this, where
the problem was to represent the relationship between John
Smith and his address information, and the value of John's
address was a structured value of his street, city, state, and
postal code. Writing this as a relation shows that this
address is a 5-ary relation of the form:</p>
<p class="ptriple"><code>address(exstaff:85740, "1501 Grant
Avenue", "Bedford", "Massachusetts", "01730")</code></p>
<p><a href="#structuredproperties">Section 2.3</a> noted that
this kind of structured information can be represented
in RDF by considering the aggregate thing be described
(here, the group of components representing
John's address) as a separate resource, and then making
separate statements about that new resource, as in the
triples:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:85740 exterms:address _:johnaddress .
_:johnaddress exterms:street "1501 Grant Avenue" .
_:johnaddress exterms:city "Bedford" .
_:johnaddress exterms:state "Massachusetts" .
_:johnaddress exterms:postalCode "01730" .
</pre>
</div>
<p>(where <code>_:johnaddress</code> is the blank node identifier
of the blank node representing John's address.)</p>
<p>This is a general way to represent any n-ary relation in
RDF: select one of the participants (John in this case) to
serve as the subject of the original relation (<code>address</code>
in this case), then specify an intermediate resource to
represent the rest of the relation (either with or without
assigning it a URI), then give that new resource properties
representing the remaining components of the relation.</p>
<p>In the case of John's address, none of the individual parts
of the structured value could be considered the "main" value of
the <code>exterms:address</code> property; all of the parts
contribute equally to the value. However, in some cases one of
the parts of the structured value is often thought of as the
"main" value, with the other parts of the relation providing
additional contextual or other information that qualifies the
main value. For instance, in <a href="#example9">Example 9</a> in <a
href="#newresources">Section 3.2</a>, the weight of a
particular tent was given as the <span class="newstuff">
decimal value <em>2.4</em> using a typed literal</span>,
i.e.,</p>
<div class="exampleOuter exampleInner">
<pre>
exproduct:item10245 exterms:weight "2.4"^^xsd:decimal .
</pre>
</div>
<p>In fact, a more complete description of the weight would
have been <em>2.4 kilograms</em> rather than just the decimal value
<em>2.4</em>. To state
this, the value of the <code>exterms:weight</code> property would
need to have two components, the typed literal for the decimal value and an
indication of the unit of measure (kilograms). In this
situation the decimal value could be considered the "main"
value of the <code>exterms:weight</code> property, because
frequently the value would be recorded simply as the typed literal
(as in the triple above), relying on an
understanding of the context to fill in the unstated units
information.</p>
<p>In the RDF model a qualified property value of this kind can be
considered as simply another kind of structured value. To
represent this, a separate resource could be used to represent the
structured value as a whole (the weight, in this case), and to
serve as the object of the original statement.
That resource could then be given properties representing the individual parts of
the structured value. In this case, there should be a property for the
typed literal representing the decimal value, and a property for
the unit. RDF provides a predefined <code>rdf:value</code> property to describe
the main value (if there is one) of a structured value. So in
this case, the typed literal could be given as the value of the
<code>rdf:value</code> property, and the resource
<code>exunits:kilograms</code> as the value of an
<code>exterms:units</code> property (assuming the resource
<code>exunits:kilograms</code> is defined as part of example.org's
vocabulary). The resulting
triples would be:</p>
<div class="exampleOuter exampleInner">
<pre>
exproduct:item10245 exterms:weight _:weight10245 .
_:weight10245 rdf:value "2.4"^^xsd:decimal .
_:weight10245 exterms:units exunits:kilograms .
</pre>
</div>
<p>which can be expressed using the RDF/XML shown in <a
href="#example21">Example 21</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example21" name="example21">Example 21: RDF/XML
using <code>rdf:value</code></a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.com/2002/04/products#item10245">
<exterms:weight rdf:parseType="Resource">
<rdf:value rdf:datatype="&xsd;decimal">2.4</rdf:value>
<exterms:units rdf:resource="http://www.example.org/units/kilograms"/>
</exterms:weight>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p class="newstuff">
<a href="#example21">Example 21</a> also illustrates a second use of
the <code>rdf:parseType</code> attribute introduced in
<a href="#collections">Section 4.2</a>,
in this case, <code>rdf:parseType="Resource"</code>. An
<code>rdf:parseType="Resource"</code> attribute is used to indicate
that the contents of an element are to be interpreted as the description
of a new (blank node) resource, without actually having to write a
nested <code>rdf:Description</code> element. In this case, the
<code>rdf:parseType="Resource"</code> attribute used in the
<code>exterms:weight</code> property element indicates that a
blank node is to be created as the value of the <code>exterms:weight</code>
property, and that the enclosed elements (<code>rdf:value</code> and
<code>exterms:units</code>) describe properties of that blank node.
Further details on <code>rdf:parseType="Resource"</code> are given
in <a href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.</p>
<p>The same approach can be used to represent quantities using
any units of measure, as well as values taken from different
classification schemes or rating systems, by using the
<code>rdf:value</code> property to give the main value, and using
additional properties to identify the classification scheme or
other information that further describes the value.</p>
<p>There is no need to use <code>rdf:value</code> for these purposes
(e.g., a user-defined property name, such as
<code>exterms:amount</code>, could have been used instead of <code>rdf:value</code>
in <a href="#example21">Example 21</a>), and RDF does not
associate any special meaning with <code>rdf:value</code>.
<code>rdf:value</code> is simply provided as a convenience for use in these
commonly-occurring situations.</p>
<p>However, even though much existing data in databases and on the Web
(and in later Primer examples) takes the form of simple values for properties
such as weights, costs, etc., the principle that such simple values are often
insufficient to adequately describe these values is an important one. In a global
environment such as the Web, it is generally <em>not</em> safe to make the
assumption that anyone accessing a property value will understand the units
being used (or other contextually-dependent information that may be involved).
For example, a U.S. site might give a weight value in pounds, but someone accessing
that data from outside the U.S. might assume that weights are given in kilograms.
The correct interpretation of data in the Web environment may require that
additional information (such as units information) be explicitly recorded.
This can be done in many ways, such as using <code>rdf:value</code>, building
units into property names (e.g., <code>exterms:weightInKg</code>), defining
specialized datatypes that include units information (e.g., <code>extypes:kilograms</code>),
or adding additional user-defined properties to specify this information
(e.g., <code>exterms:unitOfWeight</code>), either in descriptions of individual
items or products, in descriptions of sets of data (e.g., all the data in a
catalog or on a site), or in schemas (see <a href="#rdfschema">Section 5</a>).</p>
</div>
<div class="newstuff">
<div class="section">
<h3><a name="xmlliterals" id="xmlliterals">4.5 XML Literals</a></h3>
<p>Sometimes the value of a property needs to be a fragment of XML,
or text that might contain XML markup. For example, a publisher might
maintain RDF metadata that includes the titles of books and articles.
While such titles are often just simple strings of characters, this is
not always the case. For instance, the titles of books on mathematics
may contain mathematical formulas that could be represented using
MathML <a href="#ref-mathml">[MATHML]</a>. Titles might also include
markup for other reasons, such as for Ruby annotations
<a href="#ref-ruby">[RUBY]</a>, or for bidirectional rendering or
special glyph variants (see, e.g., <a href="#ref-charmod">[CHARMOD]</a>).</p>
<p>RDF/XML provides a special notation to make it easy to write
literals of this kind. This is done using a third value of the
<code>rdf:parseType</code> attribute. Giving an element the attribute
<code>rdf:parseType="Literal"</code> indicates that the contents of
the element are to be interpreted as an XML fragment.
<a href="#example22">Example 22</a> illustrates the use of
<code>rdf:parseType="Literal"</code>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example22" name="example22">Example 22: RDF/XML
for an XML Literal</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:base="http://www.example.com/books">
<rdf:Description rdf:ID="book12345">
<dc:title rdf:parseType="Literal">
<span xml:lang="en">
The <em>&lt;br /&gt;</em> Element Considered Harmful.
</span>
</dc:title>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>The RDF/XML in <a href="#example22">Example 22</a> describes a
graph containing a single triple with subject
<code>ex:book12345</code>, and predicate <code>dc:title</code>.
The <code>rdf:parseType="Literal"</code> attribute in the RDF/XML
indicates that all the XML within the <code><dc:title></code>
element is an XML fragment that is the value of the
<code>dc:title</code> property.
In the graph, this value is a typed literal, whose datatype,
<code>rdf:XMLLiteral</code>, is defined in <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a> specifically to
represent fragments of XML (including character sequences that may
or may not include XML markup). The XML fragment is canonicalized according
to the XML Exclusive Canonicalization recommendation
<a href="#ref-xml-xc14n">[XML-XC14N]</a>. This causes declarations
of used namespaces to be added to the fragment,
the uniform escaping or unescaping of characters,
the expansion of empty-element tags,
and other transformations. (For these reasons, and the fact that the
triples notation itself requires further escaping, the
actual typed literal is not shown here. RDF/XML provides the
<code>rdf:parseType="Literal"</code> attribute so that RDF users will
<em>not</em> have to deal directly with these transformations. Those
interested in the details should consult <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a> and <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.)
Contextual attributes, such as <code>xml:lang</code> and <code>xml:base</code>
are not inherited from the RDF/XML document, and, if required, must,
as shown in the example, be explicitly specified in the XML fragment.</p>
<p>This example illustrates that care must be taken in designing RDF data.
It might appear at first glance that titles are simple strings best
represented as plain literals, and only later might it be discovered
that some titles contain markup. In cases where the value of a property
may sometimes contain markup and sometimes not, either
<code>rdf:parseType="Literal"</code> should be used throughout,
or software must handle both plain literals and literals of type
<code>rdf:XMLLiteral</code> as values of the property.</p>
</div>
</div>
</div>
<div class="section">
<h2><a id="rdfschema" name="rdfschema"></a>5. Defining RDF
Vocabularies: RDF Schema</h2>
<p>RDF provides a way to express simple statements about
resources, using named properties and values. However, RDF user
communities also need the ability
<span class="newstuff">
to define the <em>vocabularies</em>
(terms) they intend to use in those statements, specifically,
</span>
to indicate that they are
describing specific kinds or classes of resources, and will use
specific properties in describing those resources. For example,
the company example.com from the examples in <a
href="#newresources">Section 3.2</a> would want to describe
classes such as <code>exterms:Tent</code>, and use properties such as
<code>exterms:model</code>, <code>exterms:weightInKg</code>, and
<code>exterms:packedSize</code> to describe them (QNames with
various "example" namespace prefixes are used as the names of classes and
properties here as a reminder that in RDF these names are
actually <em>URI references</em>, as discussed in <a
href="#basicconcepts">Section 2.1</a>). Similarly, people
interested in describing bibliographic resources would want to
describe classes such as <code>ex2:Book</code> or
<code>ex2:MagazineArticle</code>, and use properties such as
<code>ex2:author</code>, <code>ex2:title</code>, and <code>ex2:subject</code>
to describe them. Other applications might need to describe
classes such as <code>ex3:Person</code> and <code>ex3:Company</code>, and
properties such as <code>ex3:age</code>, <code>ex3:jobTitle</code>,
<code>ex3:stockSymbol</code>, and <code>ex3:numberOfEmployees</code>.
<span class="newstuff">
RDF
itself provides no means for defining such application-specific
classes and properties.
Instead, such classes and properties are described as an RDF
vocabulary, using extensions to RDF provided by the <a
href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary
Description Language 1.0: RDF Schema</a> <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a>, referred
to here as <em>RDF Schema</em>.</span></p>
<p>RDF Schema does not provide a vocabulary of
application-specific classes like <code>exterms:Tent</code>,
<code>ex2:Book</code>, or <code>ex3:Person</code>, and properties like
<code>exterms:weightInKg</code>, <code>ex2:author</code> or
<code>ex3:JobTitle</code>. Instead, it provides the facilities needed
to <em>describe</em> such classes and properties,
and to indicate which classes and properties are
expected to be used together (for example, to say that the
property <code>ex3:jobTitle</code> will be used in describing a
<code>ex3:Person</code>). In other words, RDF Schema provides a
<em>type system</em> for RDF. The RDF Schema type system is
similar in some respects to the type systems of object-oriented
programming languages such as Java. For example, RDF Schema
allows resources to be defined as instances of one or more
<em>classes</em>. In addition, it allows classes to be organized
in a hierarchical fashion; for example a class <code>ex:Dog</code>
might be defined as a subclass of <code>ex:Mammal</code> which is a
subclass of <code>ex:Animal</code>, meaning that any resource which
is in class <code>ex:Dog</code> is also implicitly in class
<code>ex:Animal</code> as well. However, RDF classes and properties are in
some respects very different from programming language types. RDF
class and property descriptions do not create a straightjacket
into which information must be forced, but instead provide
additional information about the RDF resources they describe.
This information can be used in a variety of ways, which will be
discussed in <a href="#interpretingschema">Section
5.3</a>.</p>
<p><span class="newstuff">
The RDF Schema facilities are themselves provided in the form of
an RDF vocabulary; that is, as a specialized set of predefined RDF
resources with their own special meanings. The resources in the
RDF Schema vocabulary have URIrefs with the prefix
<code>http://www.w3.org/2000/01/rdf-schema#</code> (conventionally
associated with the QName prefix <code>rdfs:</code>).
Vocabulary descriptions (schemas) written in the RDF Schema language
are legal RDF graphs. Hence, RDF software that is not written
to also process
the additional RDF Schema vocabulary can still interpret a schema as a legal
RDF graph consisting of various resources and properties,
but will not "understand" the additional built-in
meanings of the RDF Schema terms. To understand these additional
meanings, RDF software must
be written to process an extended language that includes not
only the <code>rdf:</code> vocabulary, but also the <code>rdfs:</code>
vocabulary, together with their built-in meanings.
This point will be illustrated in the next section.</span></p>
<p>The following sections will illustrate RDF Schema's
basic resources and properties.</p>
<div class="section">
<h3><a name="schemaclasses" id="schemaclasses">5.1 Describing
Classes</a></h3>
<p>A basic step in any kind of description process is
identifying the various kinds of things to be described. RDF
Schema refers to these "kinds of things" as <em>classes</em>. A
<em>class</em> in RDF Schema corresponds to the generic concept
of a <em>Type</em> or <em>Category</em>, somewhat like the
notion of a class in object-oriented programming languages such
as Java. RDF classes can be used to represent almost any
category of thing, such as Web pages, people, document types,
databases or abstract concepts. Classes are described using the
RDF Schema resources <code>rdfs:Class</code> and
<code>rdfs:Resource</code>, and the properties <code>rdf:type</code>
and <code>rdfs:subClassOf</code>.</p>
<p>For example, suppose an organization
<code>example.org</code> wanted to use RDF to provide
information about different kinds of motor vehicles. In RDF
Schema, <code>example.org</code> would first need a class to represent the category
of things that are motor vehicles. The resources that belong to
a class are called its <em>instances</em>. In this case, <code>example.org</code>
intends for the instances of this class to be resources that are
motor vehicles.</p>
<p>In RDF Schema, a <em>class</em> is any resource having an
<code>rdf:type</code> property whose value is the
resource <code>rdfs:Class</code>. So the motor vehicle class would
be described by assigning the class a URIref, say
<code>ex:MotorVehicle</code> (<span class="newstuff">using <code>ex:</code>
to stand for the URIref
<code>http://www.example.org/schemas/vehicles</code>, which is used
as the prefix for URIrefs from example.org's vocabulary</span>)
and describing that resource with an
<code>rdf:type</code> property whose value is the
resource <code>rdfs:Class</code>. That is, <code>example.org</code> would write the RDF
statement:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:MotorVehicle rdf:type rdfs:Class .
</pre>
</div>
<p>As indicated in <a href="#newresources">Section 3.2</a>,
the property <code>rdf:type</code> is used to indicate that a
resource is an instance of a class. So, having described
<code>ex:MotorVehicle</code> as a class, resource <code>exthings:companyCar</code>
would be described as a motor vehicle by
the RDF statement:</p>
<div class="exampleOuter exampleInner">
<pre>
exthings:companyCar rdf:type ex:MotorVehicle .
</pre>
</div>
<p>(This statement uses a common convention that class names
are written with an initial uppercase letter, while property
and instance names are written with an initial lowercase
letter. However, this convention is not required in RDF Schema.
<span class="newstuff">The statement also assumes that <code>example.org</code>
has decided to define separate vocabularies for classes of things, and
instances of things.)</span></p>
<p>The resource <code>rdfs:Class</code> itself has an
<code>rdf:type</code> of <code>rdfs:Class</code>. A resource may be an
instance of more than one class.</p>
<p>After describing class <code>ex:MotorVehicle</code>, <code>example.org</code> might
want to describe additional classes representing various
specialized kinds of motor vehicle, e.g., passenger vehicles,
vans, minivans, and so on. These classes can be described in the
same way as class <code>ex:MotorVehicle</code>, by
assigning a URIref for each new class, and writing RDF
statements describing these resources as classes, e.g.,
writing:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:Van rdf:type rdfs:Class .
ex:Truck rdf:type rdfs:Class .
</pre>
</div>
<p>and so on. However, these statements by themselves only describe
the individual classes. <code>example.org</code> may also want to
indicate their special
relationship to class <code>ex:MotorVehicle</code>, i.e., that they
are specialized <em>kinds</em> of MotorVehicle.</p>
<p>This kind of specialization relationship between
two classes is described using the predefined <code>rdfs:subClassOf</code>
property to relate the two classes.
For example, to state that <code>ex:Van</code> is a
specialized kind of <code>ex:MotorVehicle</code>, <code>example.org</code>
would write the RDF statement:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:Van rdfs:subClassOf ex:MotorVehicle .
</pre>
</div>
<p>The meaning of this <code>rdfs:subClassOf</code> relationship is
that any instance of class <code>ex:Van</code> is also an instance
of class <code>ex:MotorVehicle</code>.
<span class="newstuff">
So if resource <code>exthings:companyVan</code> is an instance of
<code>ex:Van</code> then, based on the declared
<code>rdfs:subClassOf</code> relationship,
RDF software written to understand the RDF Schema vocabulary
can <a name="LCC-015" id="LCC-015">infer</a> the additional information
that <code>exthings:companyVan</code>
is also an instance of <code>ex:MotorVehicle</code>.</span></p>
<p class="newstuff">This example of <code>exthings:companyVan</code>
illustrates the point made earlier about RDF Schema defining
an extended language. RDF itself does not define the special
meaning of terms from the RDF Schema vocabulary such as <code>rdfs:subClassOf</code>.
So if an RDF schema defines this <code>rdfs:subClassOf</code> relationship
between <code>ex:Van</code> and <code>ex:MotorVehicle</code>,
RDF software not written to understand the RDF Schema terms
would recognize this as a triple,
with predicate <code>rdfs:subClassOf</code>, but it would not
understand the special significance of <code>rdfs:subClassOf</code>,
and not be able to
draw the additional inference that <code>exthings:companyVan</code>
is also an instance of <code>ex:MotorVehicle</code>.</p>
<p>The <code>rdfs:subClassOf</code> property is
<em>transitive</em>. This means, for example, that given
the RDF statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:Van rdfs:subClassOf ex:MotorVehicle .
ex:MiniVan rdfs:subClassOf ex:Van .
</pre>
</div>
<p class="newstuff">RDF Schema defines <code>ex:MiniVan</code> as also being a subclass of
<code>ex:MotorVehicle</code>. As a result, RDF Schema defines resources that are
instances of class <code>ex:MiniVan</code> as also being
instances of class <code>ex:MotorVehicle</code> (as well as being instances of
class <code>ex:Van</code>). A class may be a subclass of more than
one class (for example, <code>ex:MiniVan</code> may be a subclass
of both <code>ex:Van</code> and <code>ex:PassengerVehicle</code>).
RDF Schema defines all classes as subclasses of class
<code>rdfs:Resource</code> (since the instances belonging to all
classes are resources).</p>
<p><a href="#figure18">Figure 18</a> shows the full class
hierarchy being discussed in these examples.</p>
<div class="newstuff">
<div class="figure">
<img src="vehicleClassesJan12.png"
alt="A Vehicle Class Hierarchy" /><br />
<a id="figure18" name="figure18">Figure 18: A Vehicle Class
Hierarchy</a>
</div>
<p>(To simplify the figure, the <code>rdf:type</code> properties
relating each of the classes to <code>rdfs:Class</code> are omitted in
<a href="#figure18">Figure 18</a>. In fact, RDF Schema defines
both the subjects and objects of statements that use the
<code>rdfs:subClassOf</code> property to be resources of type
<code>rdfs:Class</code>, so this information could be inferred.
However, in actually writing schemas, it is good practice to
explicitly provide this information.)</p>
</div>
<p>This schema could also be described by the triples:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:MotorVehicle rdf:type rdfs:Class .
ex:PassengerVehicle rdf:type rdfs:Class .
ex:Van rdf:type rdfs:Class .
ex:Truck rdf:type rdfs:Class .
ex:MiniVan rdf:type rdfs:Class .
ex:PassengerVehicle rdfs:subClassOf ex:MotorVehicle .
ex:Van rdfs:subClassOf ex:MotorVehicle .
ex:Truck rdfs:subClassOf ex:MotorVehicle .
ex:MiniVan rdfs:subClassOf ex:Van .
ex:MiniVan rdfs:subClassOf ex:PassengerVehicle .
</pre>
</div>
<p><a href="#example23">Example 23</a> shows how this schema
could be written in RDF/XML.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example23" name="example23">Example 23: The Vehicle
Class Hierarchy in RDF/XML</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://example.org/schemas/vehicles">
<rdf:Description rdf:ID="MotorVehicle">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>
<rdf:Description rdf:ID="PassengerVehicle">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdf:Description>
<rdf:Description rdf:ID="Truck">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdf:Description>
<rdf:Description rdf:ID="Van">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdf:Description>
<rdf:Description rdf:ID="MiniVan">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:subClassOf rdf:resource="#Van"/>
<rdfs:subClassOf rdf:resource="#PassengerVehicle"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<div class="newstuff">
<p>As discussed in <a href="#newresources">Section 3.2</a>
in connection with <a href="#example13">Example 13</a>,
RDF/XML provides an abbreviation for describing
resources having an <code>rdf:type</code> property (<em>typed nodes</em>).
Since RDF Schema classes are RDF resources,
this abbreviation can be applied to the description of classes.
Using this abbreviation, the schema could also be described
as shown in <a href="#example24">Example 24</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example24" name="example24">Example 24: The Vehicle
Class Hierarchy Using the Typed Node Abbreviation</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://example.org/schemas/vehicles">
<rdfs:Class rdf:ID="MotorVehicle"/>
<rdfs:Class rdf:ID="PassengerVehicle">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="Truck">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="Van">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="MiniVan">
<rdfs:subClassOf rdf:resource="#Van"/>
<rdfs:subClassOf rdf:resource="#PassengerVehicle"/>
</rdfs:Class>
</rdf:RDF>
</pre>
</div>
</div>
<p>Similar typed node abbreviations will be used throughout the rest of
this section.</p>
</div>
<p>The RDF/XML in <a href="#example23">Example 23</a>
and <a href="#example24">Example 24</a> introduces names, such as
<code>MotorVehicle</code>, for the resources (classes) that it
describes using <code>rdf:ID</code>, to give the effect of
"assigning" URIrefs relative to the schema document as
described in <a href="#newresources">Section 3.2</a>.
<span class="newstuff"><code>rdf:ID</code> is useful here because
it both abbreviates the URIrefs, and also provides an additional
check that the value of the <code>rdf:ID</code> attribute is
unique against the current base URI (usually the document URI).
This helps pick up repeated <code>rdf:ID</code> values when defining
the names of classes and properties in RDF schemas.</span>
Relative
URIrefs based on these names can then be used in other class
definitions within the same schema (e.g., as
<code>#MotorVehicle</code> is used in the description of the other
classes). The full URIref of this class, assuming that the
schema itself was the resource
<code>http://example.org/schemas/vehicles</code>, would be
<code>http://example.org/schemas/vehicles#MotorVehicle</code>
(shown in <a href="#figure18">Figure 18</a>). As noted in <a
href="#newresources">Section 3.2</a>, to ensure that the
references to these schema classes would be consistently
maintained even if the schema were relocated or copied (or to
simply assign a base URIref for the schema classes without
assuming they are all published at a single location), the
class descriptions could also include an explicit
<code>xml:base="http://example.org/schemas/vehicles"</code>
declaration. <span class="newstuff">Use of an explicit
<code>xml:base</code> declaration is considered good practice,
and one is provided in both examples.</span></p>
<p>To refer to these classes in RDF instance data (e.g., data
describing individual vehicles of these classes) located
elsewhere, <code>example.org</code> would need to identify
the classes <span class="newstuff">either by writing absolute URIrefs,
by using relative URIrefs together with an appropriate
<code>xml:base</code> declaration, or by using QNames
together with an appropriate namespace declaration that allows the
QNames to be expanded to the proper URIrefs.</span> For example, the resource
<code>exthings:companyCar</code> could be described as an instance of the class
<code>ex:MotorVehicle</code> described in the schema of
<a href="#example24">Example 24</a> by
the RDF/XML shown in <a href="#example25">Example 25</a> :</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example25" name="example25">Example 25: An Instance
of <code>ex:MotorVehicle</code></a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/schemas/vehicles#"
xml:base="http://example.org/things">
<ex:MotorVehicle rdf:ID="companyCar"/>
</rdf:RDF>
</pre>
</div>
</div>
<p>Note that the QName <code>ex:MotorVehicle</code>, when expanded using the
namespace declaration <code>xmlns:ex="http://example.org/schemas/vehicles#"</code>,
becomes the full URIref <code>http://example.org/schemas/vehicles#MotorVehicle</code>,
which is the correct URIref for the <code>MotorVehicle</code> class
as shown in <a href="#figure18">Figure 18</a>. The <code>xml:base</code> declaration
<code>xml:base="http://example.org/things"</code> is provided
to allow the <code>rdf:ID="companyCar"</code> to expand to the proper
<code>exthings:companyCar</code> URIref (since a QName cannot be used as the
value of the <code>rdf:ID</code> attribute).</p>
</div>
</div>
<div class="section">
<h3><a id="properties" name="properties">5.2 Describing
Properties</a></h3>
<p>In addition to describing the specific <em>classes</em> of
things they want to describe, user communities also need to be
able to describe specific <em>properties</em> that characterize
those classes of things (such as <code>rearSeatLegRoom</code> to
describe a passenger vehicle). In RDF Schema, properties are
described using the RDF class <code>rdf:Property</code>,
and the RDF Schema properties <code>rdfs:domain</code>,
<code>rdfs:range</code>, and <code>rdfs:subPropertyOf</code>.</p>
<p>All properties in RDF are described as instances of class
<code>rdf:Property</code>. So a new property, such as
<code>exterms:weightInKg</code>, is described by assigning the
property a URIref, and describing that resource with an
<code>rdf:type</code> property whose value is the resource
<code>rdf:Property</code>, for example, by writing the RDF
statement:</p>
<div class="exampleOuter exampleInner">
<pre>
exterms:weightInKg rdf:type rdf:Property .
</pre>
</div>
<p>RDF Schema also provides vocabulary for describing how
properties and classes are intended to be used together in RDF
data. The most important information of this kind is supplied
by using the RDF Schema properties <code>rdfs:range</code> and
<code>rdfs:domain</code> to further describe application-specific
properties.</p>
<p>The <code>rdfs:range</code> property is used to indicate that
the values of a particular property are instances of a
designated class. For example, if <code>example.org</code> wanted to indicate that
the property <code>ex:author</code> had values that are instances
of class <code>ex:Person</code>, it would write the RDF
statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:Person rdf:type rdfs:Class .
ex:author rdf:type rdf:Property .
ex:author rdfs:range ex:Person .
</pre>
</div>
<p>These statements indicate that <code>ex:Person</code> is a
class, <code>ex:author</code> is a property, and that RDF
statements using the <code>ex:author</code> property have instances
of <code>ex:Person</code> as objects.</p>
<p>A property, say <code>ex:hasMother</code>, can have zero, one,
or more than one range property. If <code>ex:hasMother</code> has
no range property, then nothing is said about the values
of the <code>ex:hasMother</code> property. If <code>ex:hasMother</code>
has one range property, say one specifying <code>ex:Person</code>
as the range, this says that the values of the
<code>ex:hasMother</code> property are instances of class
<code>ex:Person</code>. If <code>ex:hasMother</code> has more than one
range property, say one specifying <code>ex:Person</code> as its
range, and another specifying <code>ex:Female</code> as its range,
this says that the values of the <code>ex:hasMother</code> property
are resources that are instances of <em>all</em> of the classes
specified as the ranges, i.e., that any value of
<code>ex:hasMother</code> is <em>both</em> a <code>ex:Female</code>
<em>and</em> a <code>ex:Person</code>.</p>
<div class="newstuff">
<p>This last point may not be obvious. However, stating
that the property <code>ex:hasMother</code> has the two ranges
<code>ex:Female</code> and <code>ex:Person</code> involves making
two separate statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:hasMother rdfs:range ex:Female .
ex:hasMother rdfs:range ex:Person .
</pre>
</div>
<p>For any given statement using this property, say:</p>
<div class="exampleOuter exampleInner">
<pre>
exstaff:frank ex:hasMother exstaff:frances .
</pre>
</div>
<p>in order for <em>both</em> the <code>rdfs:range</code>
statements to be
correct, it must be the case that <code>exstaff:frances</code> is
<em>both</em> an instance of <code>ex:Female</code> and
of <code>ex:Person</code>.</p>
</div>
<p>The <code>rdfs:range</code> property can also be used to
indicate that the value of a property is given by a typed
literal, as discussed in <a href="#typedliterals">Section
2.4</a>. For example, if <code>example.org</code> wanted to indicate that the
property <code>ex:age</code> had values from the XML Schema
datatype <code>xsd:integer</code>, it would write the RDF
statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:age rdf:type rdf:Property .
ex:age rdfs:range xsd:integer .
</pre>
</div>
<p>The datatype <code>xsd:integer</code> is identified by its
URIref (the full URIref being
<code>http://www.w3.org/2001/XMLSchema#integer</code>). This URIref
can be used without explicitly stating in the schema that
it identifies a datatype. However, it is often useful to
explicitly state that a given URIref identifies a datatype.
This can be done using the RDF Schema class
<code>rdfs:Datatype</code>. To state that <code>xsd:integer</code> is a
datatype, <code>example.org</code> would write the RDF statement:</p>
<div class="exampleOuter exampleInner">
<pre>
xsd:integer rdf:type rdfs:Datatype .
</pre>
</div>
<p>This statement says that <code>xsd:integer</code> is the URIref
of a datatype (which is assumed to conform to the requirements
for RDF datatypes described in <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>). Such a statement
does <em>not</em> constitute a <em>definition</em> of a
datatype, e.g., in the sense that <code>example.org</code> is defining a new
datatype. There is no way to define datatypes in RDF Schema. As noted
in <a href="#typedliterals">Section 2.4</a>, datatypes are
defined externally to RDF (and to RDF Schema), and
<em>referred to</em> in RDF statements
by their URIrefs. This statement simply serves to document the
existence of the datatype, and indicate explicitly that it is
being used in this schema.</p>
<p>The <code>rdfs:domain</code> property is used to indicate that a
particular property applies to a designated class. For example,
if <code>example.org</code> wanted to indicate that the property <code>ex:author</code>
applies to instances of class <code>ex:Book</code>, it would write
the RDF statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:Book rdf:type rdfs:Class .
ex:author rdf:type rdf:Property .
ex:author rdfs:domain ex:Book .
</pre>
</div>
<p>These statements indicate that <code>ex:Book</code> is a
class, <code>ex:author</code> is a property, and that RDF
statements using the <code>ex:author</code> property have instances
of <code>ex:Book</code> as subjects.</p>
<p>A given property, say <code>exterms:weight</code>, may have
zero, one, or more than one domain property. If
<code>exterms:weight</code> has no domain property, then
nothing is said about the resources that <code>exterms:weight</code>
properties may be used with (any resource could have a
<code>exterms:weight</code> property). If <code>exterms:weight</code>
has one domain property, say one specifying <code>ex:Book</code> as
the domain, this says that the <code>exterms:weight</code> property
applies to instances of class <code>ex:Book</code>. If
<code>exterms:weight</code> has more than one domain property, say
one specifying <code>ex:Book</code> as the domain and another one
specifying <code>ex:MotorVehicle</code> as the domain, this says
that any resource that has a <code>exterms:weight</code> property
is an instance of <em>all</em> of the classes specified as the
domains, i.e., that any resource that has a
<code>exterms:weight</code> property is both a <code>ex:Book</code>
<em>and</em> a <code>ex:MotorVehicle</code> (illustrating the need
for care in specifying domains and ranges).</p>
<div class="newstuff">
<p>As in the case of <code>rdfs:range</code>, this last point may
not be obvious. However, stating
that the property <code>exterms:weight</code> has the two domains
<code>ex:Book</code> and <code>ex:MotorVehicle</code> involves making
two separate statements:</p>
<div class="exampleOuter exampleInner">
<pre>
exterms:weight rdfs:domain ex:Book .
exterms:weight rdfs:domain ex:MotorVehicle .
</pre>
</div>
<p>For any given statement using this property, say:</p>
<div class="exampleOuter exampleInner">
<pre>
exthings:companyCar exterms:weight "2500"^^xsd:integer .
</pre>
</div>
<p>in order for <em>both</em> the <code>rdfs:domain</code>
statements to be
correct, it must be the case that <code>exthings:companyCar</code> is
<em>both</em> an instance of <code>ex:Book</code> and
of <code>ex:MotorVehicle</code>.</p>
</div>
<p>The use of these range and domain
descriptions can be illustrated by extending the vehicle schema, adding two
properties <code>ex:registeredTo</code> and
<code>ex:rearSeatLegRoom</code>, a new class <code>ex:Person</code>,
and explicitly describing the datatype <code>xsd:integer</code> as
a datatype. The <code>ex:registeredTo</code> property applies to
any <code>ex:MotorVehicle</code> and its value is a
<code>ex:Person</code>. For the sake of this example,
<code>ex:rearSeatLegRoom</code> applies only to instances of class
<code>ex:PassengerVehicle</code>. The value is an
<code>xsd:integer</code> giving the number of centimeters of rear
seat legroom. These descriptions are shown in <a
href="#example26">Example 26</a>:</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example26" name="example26">Example 26: Some
Property Descriptions for the Vehicle Schema</a>
</div>
<div class="exampleInner">
<pre>
<rdf:Property rdf:ID="registeredTo">
<rdfs:domain rdf:resource="#MotorVehicle"/>
<rdfs:range rdf:resource="#Person"/>
</rdf:Property>
<rdf:Property rdf:ID="rearSeatLegRoom">
<rdfs:domain rdf:resource="#PassengerVehicle"/>
<rdfs:range rdf:resource="&xsd;integer"/>
</rdf:Property>
<rdfs:Class rdf:ID="Person"/>
<rdfs:Datatype rdf:about="&xsd;integer"/>
</pre>
</div>
</div>
</div>
<p>Note that an <code><rdf:RDF></code>
element is not used in <a href="#example26">Example 26</a>, because
it is
assumed this RDF/XML is being added to the vehicle schema
described in <a href="#example24">Example 24</a>. This same
assumption also allows the use of relative URIrefs like
<code>#MotorVehicle</code> to refer to other classes from that
schema.</p>
<p>RDF Schema provides a way to specialize <em>properties</em>
as well as classes. This specialization
relationship between two properties is described using the predefined
<code>rdfs:subPropertyOf</code> property. For example, if
<code>ex:primaryDriver</code> and <code>ex:driver</code> are both
properties, <code>example.org</code> could describe these properties,
and the fact that
<code>ex:primaryDriver</code> is a specialization of
<code>ex:driver</code>, by writing the RDF statements:</p>
<div class="exampleOuter exampleInner">
<pre>
ex:driver rdf:type rdf:Property .
ex:primaryDriver rdf:type rdf:Property .
ex:primaryDriver rdfs:subPropertyOf ex:driver .
</pre>
</div>
<p>The meaning of this <code>rdfs:subPropertyOf</code> relationship
is that if an instance <code>exstaff:fred</code> is an
<code>ex:primaryDriver</code> of the instance
<code>ex:companyVan</code>, <span class="newstuff">then
RDF Schema defines <code>exstaff:fred</code> as also being
an <code>ex:driver</code> of
<code>ex:companyVan</code>.</span> The RDF/XML describing these properties
(assuming again that it is being added to the vehicle schema
described in <a href="#example24">Example 24</a>)
is shown in <a href="#example27">Example
27</a>.</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example27" name="example27">Example 27: More
Properties for the Vehicle Schema</a>
</div>
<div class="exampleInner">
<pre>
<rdf:Property rdf:ID="driver">
<rdfs:domain rdf:resource="#MotorVehicle"/>
</rdf:Property>
<rdf:Property rdf:ID="primaryDriver">
<rdfs:subPropertyOf rdf:resource="#driver"/>
</rdf:Property>
</pre>
</div>
</div>
</div>
<p>A property may be a subproperty of zero, one or more
properties. All RDF Schema <code>rdfs:range</code> and
<code>rdfs:domain</code> properties that apply to an RDF property
also apply to each of its subproperties. So, in the above example,
<span class="newstuff">
RDF Schema defines <code>ex:primaryDriver</code>
as also having an <code>rdfs:domain</code> of <code>ex:MotorVehicle</code>,
because of its subproperty
relationship to <code>ex:driver</code>.</span></p>
<p><a href="#example28">Example 28</a> shows the RDF/XML for the
full vehicle schema, containing all the descriptions
given so far:</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example28" name="example28">Example 28: The Full
Vehicle Schema</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://example.org/schemas/vehicles">
<rdfs:Class rdf:ID="MotorVehicle"/>
<rdfs:Class rdf:ID="PassengerVehicle">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="Truck">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="Van">
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="MiniVan">
<rdfs:subClassOf rdf:resource="#Van"/>
<rdfs:subClassOf rdf:resource="#PassengerVehicle"/>
</rdfs:Class>
<rdfs:Class rdf:ID="Person"/>
<rdfs:Datatype rdf:about="&xsd;integer"/>
<rdf:Property rdf:ID="registeredTo">
<rdfs:domain rdf:resource="#MotorVehicle"/>
<rdfs:range rdf:resource="#Person"/>
</rdf:Property>
<rdf:Property rdf:ID="rearSeatLegRoom">
<rdfs:domain rdf:resource="#PassengerVehicle"/>
<rdfs:range rdf:resource="&xsd;integer"/>
</rdf:Property>
<rdf:Property rdf:ID="driver">
<rdfs:domain rdf:resource="#MotorVehicle"/>
</rdf:Property>
<rdf:Property rdf:ID="primaryDriver">
<rdfs:subPropertyOf rdf:resource="#driver"/>
</rdf:Property>
</rdf:RDF>
</pre>
</div>
</div>
</div>
<p>Having shown how to describe classes and properties
using RDF Schema, instances using those classes and properties
can now be illustrated. For example, <a
href="#example29">Example 29</a> describes an instance of the
<code>ex:PassengerVehicle</code> class described in
<a href="#example28">Example 28</a>, together
with some hypothetical values for its properties.</p>
<div class="newstuff">
<div class="exampleOuter">
<div class="c1">
<a id="example29" name="example29">Example 29: An Instance
of <code>ex:PassengerVehicle</code></a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.org/schemas/vehicles#"
xml:base="http://example.org/things">
<ex:PassengerVehicle rdf:ID="johnSmithsCar">
<ex:registeredTo rdf:resource="http://www.example.org/staffid/85740"/>
<ex:rearSeatLegRoom
rdf:datatype="&xsd;integer">127</ex:rearSeatLegRoom>
<ex:primaryDriver rdf:resource="http://www.example.org/staffid/85740"/>
</ex:PassengerVehicle>
</rdf:RDF>
</pre>
</div>
</div>
<p>This example assumes that the instance is described in a
separate document from the schema. Since the
schema has an <code>xml:base</code> of
<code>http://example.org/schemas/vehicles</code>, the
namespace declaration
<code>xmlns:ex="http://example.org/schemas/vehicles#"</code>
is provided to allow
QNames such as <code>ex:registeredTo</code> in the instance data to
be properly expanded to the URIrefs of the classes and
properties described in that schema. An
<code>xml:base</code> declaration is also provided for this
instance, to allow
<code>rdf:ID="johnSmithsCar"</code> to expand to the proper URIref
independently of the location of the actual document.</p>
</div>
<p>Note that an <code>ex:registeredTo</code> property can be used in
describing this instance of <code>ex:PassengerVehicle</code>,
because <code>ex:PassengerVehicle</code> is a subclass of
<code>ex:MotorVehicle</code>. Note also that a typed literal is used
for the value of the <code>ex:rearSetLegRoom</code> property in this
instance, rather than a plain literal (i.e., rather than stating the value
as <code><ex:rearSeatLegRoom>127</ex:rearSeatLegRoom></code>).
Because the schema describes the range of this property as an
<code>xsd:integer</code>, the value of the property should be a typed
literal of that datatype in order to match the range description
<span class="newstuff">(i.e., the range declaration does not
automatically "assign" a
datatype to a plain literal, and so a typed literal of the
appropriate datatype must be explicitly provided).</span>
Additional information, either in the schema, or in additional
instance data, could also be provided to explicitly specify the
<em>units</em> of the <code>ex:rearSetLegRoom</code> property
(centimeters), as discussed in <a href="#rdfvalue">Section 4.4</a>.
</p>
</div>
<div class="section">
<h3><a id="interpretingschema" name="interpretingschema">5.3
Interpreting RDF Schema Declarations</a></h3>
<p>As noted earlier, the RDF Schema type system is similar in
some respects to the type systems of object-oriented
programming languages such as Java. However, RDF differs from
most programming language type systems in several important
respects.</p>
<p>One important difference is that instead of describing a
class as having a collection of specific properties, an RDF
schema describes properties as applying to specific classes of
resources, using <em>domain</em> and <em>range</em> properties.
For example, a typical object-oriented programming language
might define a class <code>Book</code> with an attribute called
<code>author</code> having values of type <code>Person</code>. A
corresponding RDF schema would describe a class
<code>ex:Book</code>, and, in a separate description, a property
<code>ex:author</code> having a domain of <code>ex:Book</code> and a
range of <code>ex:Person</code>.</p>
<p>The difference between these approaches may seem to be only
syntactic, but in fact there is an important difference. In the
programming language class description, the attribute
<code>author</code> is part of the description of class
<code>Book</code>, and applies <em>only</em> to instances of class
<code>Book</code>. Another class (say, <code>softwareModule</code>)
might also have an attribute called <code>author</code>, but this
would be considered a <em>different</em> attribute. In other
words, the <em>scope</em> of an attribute description in most
programming languages is restricted to the class or type in
which it is defined. In RDF, on the other hand, property
descriptions are, by default, <em>independent</em> of class
definitions, and have, by default, <em>global</em> scope
(although they may optionally be declared to apply only to
certain classes using domain specifications).</p>
<p>As a result, an RDF schema could describe a property
<code>exterms:weight</code> without a domain being specified. This
property could then be used to describe instances of any class
that might be considered to have a weight. One benefit of the
RDF property-based approach is that it becomes easier to extend
the use of property definitions to situations that might not
have been anticipated in the original description. At the same time,
this is a "benefit" which must be used with care, to insure
that properties are not mis-applied in inappropriate
situations.</p>
<p class="newstuff">Another result of the global scope of RDF property descriptions
is that it is not possible in an RDF schema to define a specific property as
having locally-different ranges depending on the class of the resource
it is applied to.
For example, in defining the property <code>ex:hasParent</code>, it
would be desirable to be able to say that if the property is used
to describe a resource of class <code>ex:Human</code>, then the range
of the property is also a resource of class <code>ex:Human</code>,
while if the property is used
to describe a resource of class <code>ex:Tiger</code>, then the range
of the property is also a resource of class <code>ex:Tiger</code>.
This kind of definition is not possible in RDF Schema. Instead, any
range defined for an RDF property applies to <em>all</em> uses of the
property, and so ranges should be defined with care. However, while
such locally-different ranges cannot be defined in RDF Schema,
they can be defined in some of the richer schema languages discussed in
<a href="#richerschemas">Section 5.5</a>.</p>
<p>Another important difference is that RDF Schema descriptions
are not necessarily <em>prescriptive</em> in the way
programming language type declarations typically are. For
example, if a programming language declares a class
<code>Book</code> with an <code>author</code> attribute having values
of type <code>Person</code>, this is usually interpreted as a group
of <em>constraints</em>. The language will not allow the
creation of an instance of <code>Book</code> without an
<code>author</code> attribute, and it will not allow an instance of
<code>Book</code> with an <code>author</code> attribute that does not
have a <code>Person</code> as its value. Moreover, if
<code>author</code> is the <em>only</em> attribute defined for
class <code>Book</code>, the language will not allow an instance of
<code>Book</code> with some other attribute.</p>
<p>RDF Schema, on the other hand, provides schema information
as additional <em>descriptions</em> of resources, but does not
prescribe how these descriptions should be used by an
application. For example, suppose an RDF schema states that an
<code>ex:author</code> property has an <code>rdfs:range</code> of class
<code>ex:Person</code>. This is simply an RDF statement that RDF
statements containing <code>ex:author</code> properties have
instances of <code>ex:Person</code> as objects.</p>
<p>This schema-supplied information might be used in different
ways. One application might interpret this statement as
specifying part of a template for RDF data it is creating, and
use it to ensure that any <code>ex:author</code> property has a
value of the indicated (<code>ex:Person</code>) class. That is,
this application interprets the schema description as a
<em>constraint</em> in the same way that a programming language
might. However, another application might interpret this
statement as providing additional information about data it is
receiving, information which may not be provided explicitly in
the original data. For example, this second application might
receive some RDF data that includes an <code>ex:author</code>
property whose value is a resource of unspecified class, and
use this schema-provided statement to conclude that the
resource must be an instance of class <code>ex:Person</code>. A
third application might receive some RDF data that includes an
<code>ex:author</code> property whose value is a resource of class
<code>ex:Corporation</code>, and use this schema information as the
basis of a warning that "there may be an inconsistency here,
but on the other hand there may not be". Somewhere else there
may be a declaration that resolves the apparent inconsistency
(e.g., a declaration to the effect that "a Corporation is a
(legal) Person").</p>
<p>Moreover, depending on how the application interprets the
property descriptions, a description of an instance might be
considered valid either <em>without</em> some of the
schema-specified properties (e.g., there might be an instance
of <code>ex:Book</code> without an <code>ex:author</code> property,
even if <code>ex:author</code> is described as having a domain of
<code>ex:Book</code>), or with <em>additional</em> properties (there
might be an instance of <code>ex:Book</code> with an
<code>ex:technicalEditor</code> property, even though the schema
describing class <code>ex:Book</code> does not describe such
a property).</p>
<p>In other words, statements in an RDF schema are always
<em>descriptions</em>. They may also be <em>prescriptive</em>
(introduce constraints), but only if the application
interpreting those statements wants to treat them that way. All
RDF Schema does is provide a way of stating this additional
information. Whether this information conflicts with explicitly
specified instance data is up to the application to determine
and act upon.</p>
</div>
<div class="section">
<h3><a id="otherschema" name="otherschema">5.4 Other Schema
Information</a></h3>
<p>RDF Schema provides a number of other built-in properties, which
can be used to provide documentation and other information
about an RDF schema or about instances. For example the
<code>rdfs:comment</code> property can be used to provide a
human-readable description of a resource. The
<code>rdfs:label</code> property can be used to provide a more
human-readable version of a resource's name. The
<code>rdfs:seeAlso</code> property can be used to indicate a
resource that might provide additional information about the
subject resource. The <code>rdfs:isDefinedBy</code> property is a
subproperty of <code>rdfs:seeAlso</code>, and can be used to
indicate a resource that (in a sense not specified by RDF;
e.g., the resource may not be an RDF schema) "defines" the
subject resource. <a
href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary
Description Language 1.0: RDF Schema</a> <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a>
should be consulted for further discussion of these properties.</p>
<p class="newstuff">As with a number of the built-in RDF properties such as
<code>rdf:value</code>, the uses described for these RDF Schema properties
are only their <em>intended</em> uses. <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a> defines no special
meanings for these properties, and RDF Schema does
not define any constraints based on these intended uses.
For example, there is no constraint specified that
the object of a <code>rdfs:seeAlso</code> property
<em>must</em> provide additional information about the subject of the
statement in which it appears.</p>
</div>
<div class="section">
<h3><a id="richerschemas" name="richerschemas">5.5 Richer
Schema Languages</a></h3>
<p>RDF Schema provides basic capabilities for describing RDF
vocabularies, but additional capabilities are also possible,
and can be useful. These capabilities may be provided through
further development of RDF Schema, or in other languages based
on RDF. Other
richer schema capabilities that have been identified as useful
(but that are not provided by RDF Schema) include:</p>
<ul type="disc">
<li><em>cardinality constraints</em> on properties, e.g.,
that a Person has <em>exactly one</em> biological
father.</li>
<li>specifying that a given property (such as
<code>ex:hasAncestor</code>) is <em>transitive</em>, e.g., that if A
<code>ex:hasAncestor</code> B, and B <code>ex:hasAncestor</code> C, then A
<code>ex:hasAncestor</code> C.</li>
<li>specifying that a given property is a unique identifier
(or <em>key</em>) for instances of a particular class.</li>
<li>specifying that two different classes (having different
URIrefs) actually represent the same class.</li>
<li>specifying that two different instances (having different
URIrefs) actually represent the same individual.</li>
<li><span class="newstuff">specifying constraints on the range or cardinality
of a property that depend on the class of resource
to which a property is applied, e.g., being able to
say that for a soccer team the <code>ex:hasPlayers</code>
property has 11 values, while for a basketball team
the same property should have only 5 values.</span></li>
<li>the ability to describe new classes in terms of
combinations (e.g., unions and intersections) of other
classes, or to say that two classes are disjoint (i.e., that
no resource is an instance of both classes).</li>
</ul>
<p>The additional capabilities mentioned above, in addition to
others, are the targets of <em>ontology</em> languages such as
<a href="http://www.w3.org/TR/daml+oil-reference">DAML+OIL</a>
<a href="#ref-damloil">[DAML+OIL]</a> and <a
href="http://www.w3.org/TR/owl-ref/">OWL</a> <a
href="#ref-owl">[OWL]</a>. Both these languages are based on
RDF and RDF Schema (and both currently provide all the
additional capabilities mentioned above). The intent of such
languages is to provide additional machine-processable
<em>semantics</em> for resources, that is, to make the machine
representations of resources more closely resemble their
intended real world counterparts. While such capabilities are
not necessarily needed to build useful applications using RDF
(see <a href="#applications">Section 6</a> for a description of
a number of existing RDF applications), the development of such
languages is a very active subject of work as part of the
development of the <a
href="http://www.w3.org/2001/sw/Activity">Semantic Web</a>.</p>
</div>
</div>
<div class="section">
<h2><a id="applications" name="applications"></a>6. Some RDF
Applications: RDF in the Field</h2>
<p>The previous sections have described the general
capabilities of RDF and RDF Schema. While examples were used
in those sections to illustrate those capabilities, and some
of those examples may have suggested potential RDF applications,
those sections did not actually discuss any <em>real</em> applications.
This
section will describe some actual deployed RDF applications,
showing how RDF supports various real-world requirements to
represent and manipulate information about a wide variety of
things.</p>
<div class="section">
<h3 id="dc"><a id="dublincore" name="dublincore">6.1 Dublin
Core Metadata Initiative</a></h3>
<p><em>Metadata</em> is <em>data about data</em>. Specifically,
the term refers to data used to identify, describe, or locate
information resources, whether these resources are physical or
electronic. While structured metadata processed by computers is
relatively new, the basic concept of metadata has been used for
many years in helping manage and use large collections of
information. Library card catalogs are a familiar example of
such metadata.</p>
<p>The Dublin Core is a set of "elements" (properties) for
describing documents (and hence, for recording metadata). The
element set was originally developed at the March 1995 Metadata
Workshop in Dublin, Ohio. The Dublin Core has subsequently been
modified on the basis of later Dublin Core Metadata workshops,
and is currently maintained by the <a
href="http://dublincore.org/">Dublin Core Metadata
Initiative</a>. The goal of the Dublin Core is to provide a
minimal set of descriptive elements that facilitate the
description and the automated indexing of document-like
networked objects, in a manner similar to a library card
catalog. The Dublin Core metadata set is intended to be
suitable for use by resource discovery tools on the Internet,
such as the "Webcrawlers" employed by popular World Wide Web
search engines. In addition, the Dublin Core is meant to be
sufficiently simple to be understood and used by the wide range
of authors and casual publishers who contribute information to
the Internet. Dublin Core elements have become widely used in
documenting Internet resources (the Dublin
Core <code>creator</code> element has already been used in earlier examples).
The current
elements of the Dublin Core are defined in the <a
href="http://dublincore.org/documents/2003/06/02/dces/">Dublin Core
Metadata Element Set, Version 1.1: Reference Description</a> <a
href="#ref-dublin-core">[DC]</a>, and contain definitions for
the following properties:</p>
<ul type="disc">
<li><strong>Title</strong>: A name given to the
resource.</li>
<li><strong>Creator</strong>: An entity primarily responsible
for making the content of the resource.</li>
<li><strong>Subject</strong>: The topic of the content of the
resource.</li>
<li><strong>Description</strong>: An account of the content
of the resource.</li>
<li><strong>Publisher</strong>: An entity responsible for
making the resource available</li>
<li><strong>Contributor</strong>: An entity responsible for
making contributions to the content of the resource.</li>
<li><strong>Date</strong>: A date associated with an event in
the life cycle of the resource.</li>
<li><strong>Type</strong>: The nature or genre of the content
of the resource.</li>
<li><strong>Format</strong>: The physical or digital
manifestation of the resource.</li>
<li><strong>Identifier</strong>: An unambiguous reference to
the resource within a given context.</li>
<li><strong>Source</strong>: A reference to a resource from
which the present resource is derived.</li>
<li><strong>Language</strong>: A language of the intellectual
content of the resource.</li>
<li><strong>Relation</strong>: A reference to a related
resource.</li>
<li><strong>Coverage</strong>: The extent or scope of the
content of the resource.</li>
<li><strong>Rights</strong>: Information about rights held in
and over the resource.</li>
</ul>
<p>Information using the Dublin Core elements may be
represented in any suitable language (e.g., in HTML <code>meta</code>
elements). However, RDF is an ideal representation for Dublin
Core information. The examples below represent the simple
description of a set of resources in RDF using the Dublin Core
vocabulary. Note that the specific Dublin Core RDF vocabulary
shown here is not intended to be authoritative. The Dublin Core
Reference Description <a href="#ref-dublin-core">[DC]</a> is
the authoritative reference.</p>
<p>The first example, <a href="#example30">Example 30</a>,
describes a Web site home page using Dublin Core
properties:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example30" name="example30">Example 30: A Web Page
Described using Dublin Core Properties</a>
</div>
<div class="exampleInner">
<pre>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://www.dlib.org">
<dc:title>D-Lib Program - Research in Digital Libraries</dc:title>
<dc:description>The D-Lib program supports the community of people
with research interests in digital libraries and electronic
publishing.</dc:description>
<dc:publisher>Corporation For National Research Initiatives</dc:publisher>
<dc:date>1995-01-07</dc:date>
<dc:subject>
<rdf:Bag>
<rdf:li>Research; statistical methods</rdf:li>
<rdf:li>Education, research, related topics</rdf:li>
<rdf:li>Library use Studies</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:type>World Wide Web Home Page</dc:type>
<dc:format>text/html</dc:format>
<dc:language>en</dc:language>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>Note that both RDF and the Dublin Core define an (XML)
element called "Description" (although the Dublin Core element
name is written in lowercase). Even if the initial letter were
identically uppercase, the XML namespace mechanism enables
these two elements to be distinguished (one is
<code>rdf:Description</code>, and the other is
<code>dc:description</code>). Also, as a matter of interest,
accessing <a
href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a>
(the namespace URI used to identify the Dublin Core vocabulary in this
example)
in a Web browser (as of the current writing) will retrieve an
RDF Schema declaration for <a
href="#ref-dublin-core">[DC]</a>.</p>
<p>The second example, <a href="#example31">Example 31</a>,
describes a published magazine:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example31" name="example31">Example 31: Describing A
Magazine Using Dublin Core</a>
</div>
<div class="exampleInner">
<pre>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
<rdf:Description rdf:about="http://www.dlib.org/dlib/may98/05contents.html">
<dc:title>DLIB Magazine - The Magazine for Digital Library Research
- May 1998</dc:title>
<dc:description>D-LIB magazine is a monthly compilation of
contributed stories, commentary, and briefings.</dc:description>
<dc:contributor>Amy Friedlander</dc:contributor>
<dc:publisher>Corporation for National Research Initiatives</dc:publisher>
<dc:date>1998-01-05</dc:date>
<dc:type>electronic journal</dc:type>
<dc:subject>
<rdf:Bag>
<rdf:li>library use studies</rdf:li>
<rdf:li>magazines and newspapers</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:format>text/html</dc:format>
<dc:identifier rdf:resource="urn:issn:1082-9873"/>
<dcterms:isPartOf rdf:resource="http://www.dlib.org"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example31">Example 31</a> uses (in the
third line from the bottom) the Dublin Core <em>qualifier</em>
<code>isPartOf</code> (from a separate <span class="newstuff">vocabulary</span>) to indicate that
this magazine is "part of" the previously-described Web
site.</p>
<p>The third example, <a href="#example32">Example 32</a>,
describes a specific article in the magazine described in
<a href="#example31">Example 31</a>.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example32" name="example32">Example 32: Describing a
Magazine Article</a>
</div>
<div class="exampleInner">
<pre>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
<rdf:Description rdf:about="http://www.dlib.org/dlib/may98/miller/05miller.html">
<dc:title>An Introduction to the Resource Description Framework</dc:title>
<dc:creator>Eric J. Miller</dc:creator>
<dc:description>The Resource Description Framework (RDF) is an
infrastructure that enables the encoding, exchange and reuse of
structured metadata. rdf is an application of xml that imposes needed
structural constraints to provide unambiguous methods of expressing
semantics. rdf additionally provides a means for publishing both
human-readable and machine-processable vocabularies designed to
encourage the reuse and extension of metadata semantics among
disparate information communities. the structural constraints rdf
imposes to support the consistent encoding and exchange of
standardized metadata provides for the interchangeability of separate
packages of metadata defined by different resource description
communities. </dc:description>
<dc:publisher>Corporation for National Research Initiatives</dc:publisher>
<dc:subject>
<rdf:Bag>
<rdf:li>machine-readable catalog record formats</rdf:li>
<rdf:li>applications of computer file organization and
access methods</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:rights>Copyright © 1998 Eric Miller</dc:rights>
<dc:type>Electronic Document</dc:type>
<dc:format>text/html</dc:format>
<dc:language>en</dc:language>
<dcterms:isPartOf rdf:resource="http://www.dlib.org/dlib/may98/05contents.html"/>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example32">Example 32</a> also uses the
qualifier <code>isPartOf</code>, this time to indicate that this
article is "part of" the previously-described magazine.</p>
<div class="newstuff">
<p>Computer languages and file formats do
not always make explicit provision for
<a name="LCC-029" id="LCC-029">embedding metadata</a> with the
data it describes. In many cases, the metadata has to be specified
as a separate resource and explicitly linked to the data
(this has been done for the RDF metadata that describes the Primer;
there is an explicit link to this metadata at the end of the Primer).
However, applications and languages are increasingly making explicit
provision for embedding metadata directly with the data. For example, the
W3C's Scalable Vector Graphics language
<a href="#ref-svg">[SVG]</a> (another XML-based language)
provides an explicit <code>metadata</code> element for recording metadata
along with other SVG data.
Any XML-based metadata language can be used inside this element.
<a href="#ref-svg">[SVG]</a> includes the example
shown in <a href="#example33">Example 33</a> of
how to embed metadata describing an SVG document in the SVG document itself.
The example uses the Dublin Core vocabulary, and RDF/XML for recording
the metadata.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example33" name="example33">Example 33: Including Metadata
in an SVG Document</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<svg width="4in" height="3in" version="1.1"
xmlns = 'http://www.w3.org/2000/svg'>
<desc xmlns:myfoo="http://example.org/myfoo">
<myfoo:title>This is a financial report</myfoo:title>
<myfoo:descr>The global description uses markup from the
<myfoo:emph>myfoo</myfoo:emph> namespace.</myfoo:descr>
<myfoo:scene><myfoo:what>widget $growth</myfoo:what>
<myfoo:contains>$three $graph-bar</myfoo:contains>
<myfoo:when>1998 $through 2000</myfoo:when> </myfoo:scene>
</desc>
<metadata>
<rdf:RDF
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc = "http://purl.org/dc/elements/1.1/" >
<rdf:Description rdf:about="http://example.org/myfoo"
dc:title="MyFoo Financial Report"
dc:description="$three $bar $thousands $dollars $from 1998 $through 2000"
dc:publisher="Example Organization"
dc:date="2000-04-11"
dc:format="image/svg+xml"
dc:language="en" >
<dc:creator>
<rdf:Bag>
<rdf:li>Irving Bird</rdf:li>
<rdf:li>Mary Lambert</rdf:li>
</rdf:Bag>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</metadata>
</svg>
</pre>
</div>
</div>
<p>Adobe's <a href="http://www.adobe.com/products/xmp/main.html">
Extensible Metadata Platform (XMP)</a>
is another example of technology that allows metadata
about a file to be embedded into the file itself.
XMP uses RDF/XML as the basis of its metadata representation.
A number of Adobe products already support XMP.</p>
</div>
</div>
<div class="section">
<h3><a id="prism" name="prism">6.2 PRISM</a></h3>
<p><a
href="http://www.prismstandard.org/">PRISM:
Publishing Requirements for Industry Standard Metadata</a> <a
href="#ref-prism">[PRISM]</a> is a metadata specification
developed in the publishing industry. Magazine publishers and
their vendors formed the PRISM Working Group to
identify the industry's needs for metadata and define a
specification to meet them. Publishers want to use existing
content in many ways in order to get a greater return on the
investment made in creating it. Converting magazine articles to
HTML for posting on the Web is one example. Licensing it to
aggregators like <a href="http://www.lexisnexis.com/">LexisNexis</a>
is another. All of these are "first
uses" of the content; typically they all go live at the time
the magazine hits the stands. The publishers also want their
content to be "evergreen". It might be used in new issues, such
as in a retrospective article. It could be used by other
divisions in the company, such as in a book compiled from the
magazine's photos, recipes, etc. Another use is to license it
to outsiders, such as in a reprint of a product review, or in a
retrospective produced by a different publisher. This overall
goal requires a metadata approach that emphasizes
<em>discovery</em>, <em>rights tracking</em>, and
<em>end-to-end metadata</em>.</p>
<p><em>Discovery:</em> Discovery is a general term for finding
content which encompasses searching, browsing, content routing,
and other techniques. Discussions of discovery frequently
center on a consumer searching a public Web site. However,
discovering content is much broader than that. The audience may
consist of consumers, or it may consist of internal users such
as researchers, designers, photo editors, licensing agents,
etc. To assist discovery, PRISM provides properties to describe
the topics, formats, genre, origin, and contexts of a resource.
It also provides means for categorizing resources using
multiple subject description taxonomies.</p>
<p><em>Rights Tracking:</em> Magazines frequently contain
material licensed from others. Photos from a stock photo agency
are the most common type of licensed material, but articles,
sidebars, and all other types of content may be licensed.
Simply knowing if content was licensed for one-time use,
requires royalty payments, or is wholly-owned by the publisher
is a struggle. PRISM provides elements for basic tracking of
such rights. A separate vocabulary defined in the
PRISM specification supports description of places, times, and
industries where content may or may not be used.</p>
<p><em>End-to-end metadata:</em> Most published content already
has metadata created for it. Unfortunately, when content moves
between systems, the metadata is frequently discarded, only to
be re-created later in the production process at considerable
expense. PRISM aims to reduce this problem by providing a
specification that can be used in multiple stages in the
content production pipeline. An important feature of the PRISM
specification is its use of other existing specifications.
Rather than create an entirely new thing, the group decided to
use existing specifications as much as possible, and only
define new things where needed. For this reason, the PRISM
specification uses XML, RDF, Dublin Core, and well as various
ISO formats and vocabularies.</p>
<p>A PRISM description may be as simple as a few Dublin Core
properties with plain literal values. <a
href="#example34">Example 34</a> describes a photograph, giving
basic information on its title, photographer, format, etc.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example34" name="example34">Example 34: A PRISM
Description of a Photograph</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:lang="en-US">
<rdf:Description rdf:about="http://travel.example.com/2000/08/Corfu.jpg">
<dc:title>Walking on the Beach in Corfu</dc:title>
<dc:description>Photograph taken at 6:00 am on Corfu with two models
</dc:description>
<dc:creator>John Peterson</dc:creator>
<dc:contributor>Sally Smith, lighting</dc:contributor>
<dc:format>image/jpeg</dc:format>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>PRISM also augments the Dublin Core to allow more detailed
descriptions. The augmentations are defined <span class="newstuff">as three new
vocabularies</span>, generally cited using the prefixes <code>prism:</code>,
<code>pcv:</code>, and <code>prl:</code>.</p>
<p><code>prism:</code> This prefix refers to the main PRISM
<span class="newstuff">vocabulary, whose terms use the URI prefix
<code>http://prismstandard.org/namespaces/basic/1.0/</code></span>. Most
of the properties in this vocabulary are more specific versions of properties from
the Dublin Core. For example, more specific versions of
<code>dc:date</code> are provided by properties like
<code>prism:publicationTime</code>, <code>prism:releaseTime</code>,
<code>prism:expirationTime</code>, etc.</p>
<p><code>pcv:</code> This prefix refers to the PRISM Controlled
Vocabulary (pcv) <span class="newstuff">vocabulary, whose terms use the URI prefix
<code>http://prismstandard.org/namespaces/pcv/1.0/</code></span>.
Currently, common practice for describing the subject(s) of an
article is by supplying descriptive keywords. Unfortunately,
simple keywords do not make a great difference in retrieval
performance, due to the fact that different people will use
different keywords <a href="#ref-bates96">[BATES96]</a>. Best
practice is to code the articles with subject terms from a
"controlled vocabulary". The vocabulary should provide as many
synonyms as possible for its terms in the vocabulary. This way
the controlled terms provide a meeting ground for the keywords
supplied by the searcher and the indexer. The pcv vocabulary
provides properties for specifying
terms in a vocabulary, the relations between terms, and
alternate names for the terms.</p>
<p><code>prl:</code> This prefix refers to the PRISM Rights
Language <span class="newstuff">vocabulary, whose terms use the URI prefix
<code>http://prismstandard.org/namespaces/prl/1.0/</code></span>. Digital
Rights Management is an area undergoing considerable upheaval.
There are a number of proposals for rights management
languages, but none are clearly favored throughout the
industry. Because there was no clear choice to recommend, the
PRISM Rights Language (PRL) was defined as an interim measure.
It provides properties which let people say if an item can or
cannot be "used", depending on conditions of time, geography,
and industry. This is believed to be an 80/20 trade-off which
will help publishers begin to save money when tracking rights.
It is not intended to be a general rights language, or allow
publishers to automatically enforce limits on consumer uses of
the content.</p>
<p>PRISM uses RDF because of its abilities for dealing with
descriptions of varying complexity. Currently, a great deal of
metadata uses simple character string (plain literal) values,
such as:</p>
<div class="exampleOuter exampleInner">
<pre>
<dc:coverage>Greece</dc:coverage>
</pre>
</div>
<p>Over time the developers of PRISM expect uses of the PRISM
specification to become more sophisticated, moving from simple
literal values to more structured values. In fact, that range
of values is a situation being faced now. Some publishers
already use sophisticated controlled vocabularies, others are
barely using manually-supplied keywords. To illustrate this,
some examples of the different kinds of values that can be
given for the <code>dc:coverage</code> property are:</p>
<div class="exampleOuter exampleInner">
<pre>
<dc:coverage>Greece</dc:coverage>
<dc:coverage rdf:resource="http://prismstandard.org/vocabs/ISO-3166/GR"/>
</pre>
</div>
<p>(i.e., using either a plain literal or a URIref to identify
the country) and</p>
<div class="exampleOuter exampleInner">
<pre>
<dc:coverage>
<pcv:Descriptor rdf:about="http://prismstandard.org/vocabs/ISO-3166/GR">
<pcv:label xml:lang="en">Greece</pcv:label>
<pcv:label xml:lang="fr">Grèce</pcv:label>
</pcv:Descriptor>
</dc:coverage>
</pre>
</div>
<p>(using a structured value to provide both a URIref and names
in various languages).</p>
<p>Note also that there are properties whose meanings are
similar, or subsets of other properties. For example, the
geographic subject of a resource could be given with</p>
<div class="exampleOuter exampleInner">
<pre>
<prism:subject>Greece</prism:subject>
<dc:coverage>Greece</dc:coverage>
</pre>
</div>
<p>or</p>
<div class="exampleOuter exampleInner">
<pre>
<prism:location>Greece</prism:location>
</pre>
</div>
<p>Any of those properties might use the simple literal value,
or a more complex structured value. Such a range of
possibilities cannot be adequately described by DTDs, or even
by the newer XML Schemas. While there is a wide range of
syntactic variations to deal with, RDF's graph model has a
simple structure - a set of triples. Dealing with the metadata
in the triples domain makes it much easier for older software
to accommodate content with new extensions.</p>
<p>This section closes with two final examples. <a
href="#example35">Example 35</a> says that the image
(<code>.../Corfu.jpg</code>) cannot be used (<code>#none</code>) in the
tobacco industry (code 21 in SIC, the Standard Industrial
Classifications).</p>
<div class="exampleOuter">
<div class="c1">
<a id="example35" name="example35">Example 35: A PRISM
Description of an Image</a>
</div>
<div class="exampleInner">
<pre>
<rdf:RDF xmlns:prism="http://prismstandard.org/namespaces/basic/1.0/"
xmlns:prl="http://prismstandard.org/namespaces/prl/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://travel.example.com/2000/08/Corfu.jpg">
<dc:rights rdf:parseType="Resource"
xml:base="http://prismstandard.org/vocabularies/1.0/usage.xml">
<prl:usage rdf:resource="#none"/>
<prl:industry rdf:resource="http://prismstandard.org/vocabs/SIC/21"/>
</dc:rights>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p><a href="#example36">Example 36</a> says that the
photographer for the Corfu image was employee 3845, better
known as John Peterson. It also says that the geographic
coverage of the photo is Greece. It does so by providing, not
just a code from a controlled vocabulary, but a cached version
of the information for that term in the vocabulary.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example36" name="example36">Example 36: Additional
Information about the Image from Example 35</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:pcv="http://prismstandard.org/namespaces/pcv/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:base="http://travel.example.com/">
<rdf:Description rdf:about="/2000/08/Corfu.jpg">
<dc:identifier rdf:resource="/content/2357845" />
<dc:creator>
<pcv:Descriptor rdf:about="/emp3845">
<pcv:label>John Peterson</pcv:label>
</pcv:Descriptor>
</dc:creator>
<dc:coverage>
<pcv:Descriptor
rdf:about="http://prismstandard.org/vocabs/ISO-3166/GR">
<pcv:label xml:lang="en">Greece</pcv:label>
<pcv:label xml:lang="fr">Grece</pcv:label>
</pcv:Descriptor>
</dc:coverage>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
</div>
<div class="section">
<h3><a id="xpackage" name="xpackage">6.3 XPackage</a></h3>
<div class="newstuff">
<p>Many situations involve the need to maintain information
about structured groupings of resources and their associations
that are, or may be, used as a unit. The <a
href="http://www.xpackage.org/specification/">XML Package
(XPackage) specification</a> <a
href="#ref-xpackage">[XPACKAGE]</a> provides a framework for
defining such groupings, called <em>packages</em>. XPackage
specifies a framework for describing the resources included in
such packages, the properties of those resources, their method
of inclusion, and their relationships with each other. XPackage
applications include specifying the style sheets used by a
document, declaring the images shared by multiple documents,
indicating the author and other metadata of a document,
describing how namespaces are used by XML resources, and
providing a manifest for bundling resources into a single
archive file.</p>
<p>The XPackage framework is based upon XML, RDF, and the <a
href="http://www.w3.org/TR/xlink/">XML Linking Language</a> <a
href="#ref-xlink">[XLINK]</a>, and provides multiple RDF
vocabularies: one for general packaging descriptions, and
several other vocabularies for providing supplemental
resource information useful to package processors.</p>
<p>One application of XPackage is the description of XHTML
documents and their supporting resources. An XHTML document
retrieved from a Web site may rely on other resources such as
style sheets and image files that also need to be retrieved.
However, the identities of these supporting resources may not
be obvious without processing the entire document. Other
information about the document, such as the name of its author,
may also not be available without processing the document.
XPackage allows such descriptive information to be stored in a
standard way in a package description document containing RDF.
The outer elements of a package description document describing
such an XHTML document might look like <a
href="#example37">Example 37</a> (with namespace declarations
removed for simplicity):</p>
<div class="exampleOuter">
<div class="c1">
<a id="example37" name="example37">Example 37: Outer
Elements of an XPackage Package Description Document</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<xpackage:description>
<rdf:RDF>
(description of individual resources go here)
</rdf:RDF>
</xpackage:description>
</pre>
</div>
</div>
<p>Resources (such as the XHTML document, style sheets, and
images) are described within this package description document
using standard RDF/XML syntax.
Each resource description element may include
RDF properties from various vocabularies (XPackage uses the
term "ontology" for what RDF calls a "vocabulary").
Besides the main packaging vocabulary, XPackage itself
specifies several supplemental vocabularies, including:</p>
<ul>
<li>a vocabulary (using prefix <code>file:</code>) for describing files
(with properties such as <code>file:size</code>)</li>
<li>a vocabulary (using prefix <code>mime:</code>) for providing MIME information
(with properties such as <code>mime:contentType</code>)</li>
<li>a vocabulary (using prefix <code>unicode:</code>) for providing character usage information
(with properties such as <code>unicode:script</code>)</li>
<li>a vocabulary (using prefix <code>x:</code>) for describing XML-based resources
(with properties such as <code>x:namespace</code> and <code>x:style</code>)</li>
</ul>
<p>In <a
href="#example38">Example 38</a>, the document's MIME content
type ("application/xhtml+xml") is defined using a standard
XPackage property from the XPackage MIME vocabulary,
<code>mime:contentType</code>. Another property, the document's
author (in this case, "Garret Wilson"), is described using a
property from the Dublin Core vocabulary, defined outside
of XPackage, resulting in a <code>dc:creator</code>
property. </p>
<div class="exampleOuter">
<div class="c1">
<a id="example38" name="example38">Example 38: A
Description of an XHTML Document</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<xpackage:description
xmlns:xpackage="http://xpackage.org/namespaces/2003/xpackage#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:mime="http://xpackage.org/namespaces/2003/mime#"
xmlns:x="http://xpackage.org/namespaces/2003/xml#"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rdf:RDF>
<!--doc.html-->
<rdf:Description rdf:about="urn:example:xhtmldocument-doc">
<rdfs:comment>The XHTML document.</rdfs:comment>
<xpackage:location xlink:href="doc.html"/>
<mime:contentType>application/xhtml+xml</mime:contentType>
<x:namespace rdf:resource="http://www.w3.org/1999/xhtml"/>
<x:style rdf:resource="urn:example:xhtmldocument-stylesheet"/>
<dc:creator>Garret Wilson</dc:creator>
<xpackage:manifest rdf:parseType="Collection">
<rdf:Description rdf:about="urn:example:xhtmldocument-stylesheet"/>
<rdf:Description rdf:about="urn:example:xhtmldocument-image"/>
</xpackage:manifest>
</rdf:Description>
</rdf:RDF>
</xpackage:description>
</pre>
</div>
</div>
<p>The <code>xpackage:manifest</code> property indicates that both
the style sheet and image resources are necessary for
processing; those resources are described separately within the
package description document. The example style sheet resource
description in <a href="#example39">Example 39</a> lists its
location within the package ("stylesheet.css") using the
general XPackage vocabulary
<code>xpackage:location</code> property (which is compatible with
XLink), and shows through use of the XPackage MIME vocabulary
<code>mime:contentType</code> property that it is a CSS
style sheet ("text/css").</p>
<div class="exampleOuter">
<div class="c1">
<a id="example39" name="example39">Example 39: A Style Sheet
Resource Description</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<xpackage:description
xmlns:xpackage="http://xpackage.org/namespaces/2003/xpackage#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:mime="http://xpackage.org/namespaces/2003/mime#"
xmlns:x="http://xpackage.org/namespaces/2003/xml#"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rdf:RDF>
<!--stylesheet.css-->
<rdf:Description rdf:about="urn:example:xhtmldocument-css">
<rdfs:comment>The document style sheet.</rdfs:comment>
<xpackage:location xlink:href="stylesheet.css"/>
<mime:contentType>text/css</mime:contentType>
</rdf:Description>
</rdf:RDF>
</xpackage:description>
</pre>
</div>
</div>
<p>The full version of this example may be found in <a
href="#ref-xpackage">[XPACKAGE]</a>.</p>
</div>
</div>
<div class="section">
<h3><a id="rss" name="rss">6.4 RSS 1.0: RDF Site
Summary</a></h3>
<p>People sometimes need to access a wide variety of information on
the Web on a day-to-day basis, such as schedules, to-do lists, news
headlines, search results, "What's New", etc. As the sources
and diversity of the information on the Web increases, it becomes
increasingly difficult to manage this information and integrate
it into a coherent whole. <a href="http://purl.org/rss/1.0">RSS
1.0</a> ("RDF Site Summary") is an RDF vocabulary that provides
a lightweight, yet powerful way of describing information for
timely, large-scale distribution and reuse. RSS 1.0 is also perhaps
the most widely deployed RDF application on the Web.</p>
<p>To give a simple example, the <a
href="http://www.w3.org/">W3C home page</a> is a primary point of contact
with the public and serves in part to disseminate information
about the deliverables of the Consortium.
An example of the W3C home page as of a certain date is shown
in <a href="#figure19">Figure 19</a>. The center column of
news items changes frequently. To support the timely
dissemination of this information, the W3C Team has implemented
an RDF Site Summary (<a href="http://purl.org/rss/1.0/">RSS
1.0</a>) news feed that makes the content in the center column
available to others to reuse as they will. News syndication
sites may merge the headlines into a summary of the day's
latest news, others may display the headlines as links as a
service to their readers, and, increasingly, individuals may
subscribe to this feed with a desktop application. These
desktop <em>RSS readers</em> allow their users to keep track of
potentially hundreds of sites, without having to visit each one
in their browser.</p>
<div class="figure">
<a href="w3c-rss.crop.gif"><img src="fig18dec16.gif"
alt="The W3C Home Page" /></a><br />
<br />
<a id="figure19" name="figure19">Figure 19: The W3C Home
Page</a>
</div>
<p>Numerous sites all over the Web provide RSS 1.0 feeds. <a
href="#example40">Example 40</a> is an example of the <a
href="http://www.w3.org/2000/08/w3c-synd/home.rss">W3C
feed</a> (from a different date):</p>
<div class="exampleOuter">
<div class="c1">
<a id="example40" name="example40">Example 40: An Example
of the W3C RSS 1.0 Feed</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel rdf:about="http://www.w3.org/2000/08/w3c-synd/home.rss">
<title>The World Wide Web Consortium</title>
<description>Leading the Web to its Full Potential...</description>
<link>http://www.w3.org/</link>
<dc:date>2002-10-28T08:07:21Z</dc:date>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.w3.org/News/2002#item164"/>
<rdf:li rdf:resource="http://www.w3.org/News/2002#item168"/>
<rdf:li rdf:resource="http://www.w3.org/News/2002#item167"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://www.w3.org/News/2002#item164">
<title>User Agent Accessibility Guidelines Become a W3C
Proposed Recommendation</title>
<description>17 October 2002: W3C is pleased to announce the
advancement of User Agent Accessibility Guidelines 1.0 to
Proposed Recommendation. Comments are welcome through 14 November.
Written for developers of user agents, the guidelines lower
barriers to Web accessibility for people with disabilities
(visual, hearing, physical, cognitive, and neurological).
The companion Techniques Working Draft is updated. Read about
the Web Accessibility Initiative. (News archive)</description>
<link>http://www.w3.org/News/2002#item164</link>
<dc:date>2002-10-17</dc:date>
</item>
<item rdf:about="http://www.w3.org/News/2002#item168">
<title>Working Draft of Authoring Challenges for Device
Independence Published</title>
<description>25 October 2002: The Device Independence
Working Group has released the first public Working Draft of
Authoring Challenges for Device Independence. The draft describes
the considerations that Web authors face in supporting access to
their sites from a variety of different devices. It is written
for authors, language developers, device experts and developers
of Web applications and authoring systems. Read about the Device
Independence Activity (News archive)</description>
<link>http://www.w3.org/News/2002#item168</link>
<dc:date>2002-10-25</dc:date>
</item>
<item rdf:about="http://www.w3.org/News/2002#item167">
<title>CSS3 Last Call Working Drafts Published</title>
<description>24 October 2002: The CSS Working Group has
released two Last Call Working Drafts and welcomes comments
on them through 27 November. CSS3 module: text is a set of
text formatting properties and addresses international contexts.
CSS3 module: Ruby is properties for ruby, a short run of text
alongside base text typically used in East Asia. CSS3 module:
The box model for the layout of textual documents in visual
media is also updated. Cascading Style Sheets (CSS) is a
language used to render structured documents like HTML and
XML on screen, on paper, and in speech. Visit the CSS home
page. (News archive)</description>
<link>http://www.w3.org/News/2002#item167</link>
<dc:date>2002-10-24</dc:date>
</item>
</rdf:RDF>
</pre>
</div>
</div>
<p>As <a href="#example40">Example 40</a> shows, the format is
designed for content that can be packaged into easily
distinguishable sections. News sites, Web logs, sports scores,
stock quotes, and the like are all use-cases for RSS 1.0.</p>
<p>The RSS feed can be requested by any application able to
"speak" HTTP. More recently, however, RSS 1.0 applications are
splitting into three different categories:</p>
<ul>
<li>On-line aggregators - Sites such as <a
href="http://www.oreillynet.com/meerkat/index.php?&c=4743&t=ALL">
Meerkat</a> and <a
href="http://www.newsisfree.com/sources/info/906/">NewsIsFree</a>,
shown side-by-side in <a href="#figure20">Figure 20</a> (each
mirroring W3C's column of news). These gather feeds from
thousands of sources, separate each of the
<code><item></code>s out, and add them together again into
one large group. The whole group is then made searchable. In
this way, one can search for the latest news on, for example,
"Java" from perhaps thousands of sites, without having to
search them all.</li>
<li>Desktop Readers - Utilities such as <a
href="http://www.disobey.com/amphetadesk/">Amphetadesk</a>
and <a
href="http://ranchero.com/netnewswire/">NetNewsWire
Lite</a> allow their users to subscribe to hundreds of feeds
from their desktop. Readers customarily refresh each feed
once an hour, allowing users to stay up to date.</li>
<li>Scripts - RSS's original purpose was to allow Webmasters
to include the content of another's site within their own.
RSS 1.0 is still used in this way, with many sites (<a
href="http://slashdot.org">Slashdot</a> for example)
incorporating RSS feeds on their front page.</li>
</ul>
<div class="figure">
<a href="meerkat-rss.crop.gif"><img src="fig19Adec16.gif"
alt="Meerkat RSS" /></a> <a
href="newsisfree-rss.crop.gif"><img src="fig19Bdec16.gif"
alt="NewsIsFree RSS" /></a><br />
<br />
<a id="figure20" name="figure20">Figure 20: MeerKat and
NewsIsFree</a>
</div>
<p>RSS 1.0 is extensible by design. By importing additional RDF
vocabularies (or <em>modules</em> as they are known within the
RSS development community), the RSS 1.0 author can provide
large amounts of metadata and handling instructions to the
recipient of the file. Modules can, as with more general RDF
vocabularies, be written by anyone. Currently there are <a
href="http://web.resource.org/rss/1.0/">3 official modules</a>
and <a
href="http://web.resource.org/rss/1.0/modules/proposed.html">19
proposed modules</a> readily recognized by the community at
large. These modules range from the complete <a
href="http://web.resource.org/rss/1.0/modules/dc/">Dublin Core
module</a> to more specialized RSS-centric modules such as the
<a
href="http://web.resource.org/rss/1.0/modules/aggregation/">Aggregation
module</a>.</p>
<p>Care should be taken when discussing "RSS" in the scope of
RDF. There are currently two RSS specification strands. One
strand (RSS 0.91,0.92,0.93,0.94 and 2.0) does not use RDF. The
other strand (RSS 0.9 and 1.0) does.</p>
</div>
<div class="section">
<h3><a id="cimxml" name="cimxml"></a>6.5 CIM/XML</h3>
<p>Electric utilities use power system models for a number of
different purposes. For example, simulations of power systems
are necessary for planning and security analysis. Power system
models are also used in actual operations, e.g., by the Energy
Management Systems (EMS) used in energy control centers. An
operational power system model can consist of thousands of
classes of information. In addition to using these models
in-house, utilities need to exchange system modeling
information, both in planning, and for operational purposes,
e.g., for coordinating transmission and ensuring reliable
operations. However, individual utilities use different
software for these purposes, and as a result the system models
are stored in different formats, making the exchange of these
models difficult.</p>
<p>In order to support the exchange of power system models,
utilities needed to agree on common definitions of power system
entities and relationships. To support this, the <a
href="http://www.epri.com/">Electric Power Research
Institute</a> (EPRI) a non-profit energy research consortium,
developed a Common
Information Model (CIM) <a href="#ref-cim">[CIM]</a>.
The CIM specifies common semantics
for power system resources, their attributes, and
relationships. In addition, to further support the ability to
electronically exchange CIM models, the power industry has
developed <a
href="http://www.langdale.com.au/CIMXML/">CIM/XML</a>, a
language for expressing CIM models in XML. CIM/XML is an RDF
application, using RDF and RDF Schema to organize its XML
structures. The <a href="http://www.nerc.com/">North American
Electric Reliability Council</a> (NERC) (an industry-supported
organization formed to promote the reliability of electricity
delivery in North America) has adopted CIM/XML as the standard
for exchanging models between power transmission system
operators. The CIM/XML format is also going through an IEC
international standardization process. An excellent discussion
of CIM/XML can be found in <a href="#ref-devos">[DWZ01]</a>.
[NB: This power industry CIM should not be confused with the
CIM developed by the <a href="http://www.dmtf.org/">Distributed
Management Task Force</a> for
representing management information for distributed software,
network, and enterprise environments. The DMTF CIM also has an
XML representation, but does not currently use RDF, although
independent research is underway in that direction.]</p>
<p>The CIM can represent all of the major objects of an
electric utility as object classes and attributes, as well as
their relationships. CIM uses these object classes and
attributes to support the integration of independently
developed applications between vendor specific EMS systems, or
between an EMS system and other systems that are concerned with
different aspects of power system operations, such as
generation or distribution management.</p>
<p>The CIM is specified as a set of class diagrams using the
<a href="http://www.uml.org/">Unified Modeling Language</a>
(UML). The base class of the CIM is
the <code>PowerSystemResource</code> class, with other more
specialized classes such as <code>Substation</code>,
<code>Switch</code>, and <code>Breaker</code> being defined as
subclasses. CIM/XML represents the CIM as an RDF Schema
vocabulary, and uses RDF/XML as the language for exchanging
specific system models. <a href="#example41">Example 41</a>
shows examples of CIM/XML class and property definitions:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example41" name="example41">Example 41: Examples of
CIM/XML Class and Property Definitions</a>
</div>
<div class="exampleInner">
<pre>
<rdfs:Class rdf:ID="PowerSystemResource">
<rdfs:label xml:lang="en">PowerSystemResource</rdfs:label>
<rdfs:comment>"A power system component that can be either an
individual element such as a switch or a set of elements
such as a substation. PowerSystemResources that are sets
could be members of other sets. For example a Switch is a
member of a Substation and a Substation could be a member
of a division of a Company"</rdfs:comment>
</rdfs:Class>
<rdfs:Class rdf:ID="Breaker">
<rdfs:label xml:lang="en">Breaker</rdfs:label>
<rdfs:subClassOf rdf:resource="#Switch" />
<rdfs:comment>"A mechanical switching device capable of making,
carrying, and breaking currents under normal circuit conditions
and also making, carrying for a specified time, and breaking
currents under specified abnormal circuit conditions e.g. those
of short circuit. The typeName is the type of breaker, e.g.,
oil, air blast, vacuum, SF6."</rdfs:comment>
</rdfs:Class>
<rdf:Property rdf:ID="Breaker.ampRating">
<rdfs:label xml:lang="en">ampRating</rdfs:label>
<rdfs:domain rdf:resource="#Breaker" />
<rdfs:range rdf:resource="#CurrentFlow" />
<rdfs:comment>"Fault interrupting rating in amperes"</rdfs:comment>
</rdf:Property>
</pre>
</div>
</div>
<p>CIM/XML uses only a subset of the complete RDF/XML syntax,
in order to simplify expressing the models. In addition,
CIM/XML implements some extensions to the RDF Schema vocabulary.
These extensions support the description of inverse
roles and multiplicity (cardinality) constraints describing how
many instances of a given property are allowed for a given
resource (allowable values for a
multiplicity declaration are zero-or-one, exactly-one,
zero-or-more, one-or-more). The properties in <a
href="#example42">Example 42</a> illustrate these
extensions (which are identified by a <code>cims:</code> QName prefix):</p>
<div class="exampleOuter">
<div class="c1">
<a id="example42" name="example42">Example 42: Some CIM/XML
Extensions of RDF Schema</a>
</div>
<div class="exampleInner">
<pre>
<rdf:Property rdf:ID="Breaker.OperatedBy">
<rdfs:label xml:lang="en">OperatedBy</rdfs:label>
<rdfs:domain rdf:resource="#Breaker" />
<rdfs:range rdf:resource="#ProtectionEquipment" />
<cims:inverseRoleName rdf:resource="#ProtectionEquipment.Operates" />
<cims:multiplicity rdf:resource="http://www.cim-logic.com/schema/990530#M:0..n" />
<rdfs:comment>"Circuit breakers may be operated by
protection relays."</rdfs:comment>
</rdf:Property>
<rdf:Property rdf:ID="ProtectionEquipment.Operates">
<rdfs:label xml:lang="en">Operates</rdfs:label>
<rdfs:domain rdf:resource="#ProtectionEquipment" />
<rdfs:range rdf:resource="#Breaker" />
<cims:inverseRoleName rdf:resource="#Breaker.OperatedBy" />
<cims:multiplicity rdf:resource="http://www.cim-logic.com/schema/990530#M:0..n" />
<rdfs:comment>"Circuit breakers may be operated by
protection relays."</rdfs:comment>
</rdf:Property>
</pre>
</div>
</div>
<p>EPRI has conducted successful interoperability tests using
CIM/XML to exchange real-life, large-scale models (involving,
in the case of one test, data describing over 2000 substations)
between a variety of vendor products, and validating that these
models would be correctly interpreted by typical utility
applications. Although the CIM was originally intended for EMS
systems, it is also being extended to support power
distribution and other applications as well.</p>
<p>The <a href="http://www.omg.org/">Object Management
Group</a> has adopted an object interface standard to access
CIM power system models called the Data Access Facility <a
href="#ref-daf">[DAF]</a>. Like the CIM/XML language, the DAF
is based on the RDF model and shares the same CIM schema.
However, while CIM/XML enables a model to be exchanged as a
document, DAF enables an application to access the model as a
set of objects.</p>
<p>CIM/XML illustrates the useful role RDF can play in
supporting XML-based exchange of information that is naturally
expressed as entity-relationship or object-oriented classes,
attributes, and relationships (even when that information will
not necessarily be Web-accessible). In these cases, RDF
provides a basic structure for the XML in support of
identifying objects, and using them in structured
relationships. This connection is illustrated by a number of
applications using RDF/XML for information interchange, as well
as a number of projects investigating linkages between RDF (or
ontology languages such as OWL) and UML (and its XML
representations).
CIM/XML's need to extend RDF Schema to support cardinality
constraints and inverse relationships also illustrates the kinds
of requirements
that have led to the development of more powerful
RDF-based schema/ontology languages such as DAML+OIL and OWL
described in <a href="#richerschemas">Section 5.5</a>. Such
languages may be appropriate in supporting many similar
modeling applications in the future.</p>
<p>Finally, CIM/XML also illustrates an important fact for
those looking for additional examples of "RDF in the Field":
sometimes languages are described as "XML" languages, or
systems are described as using "XML", and the "XML" they are
actually using is RDF/XML, i.e., they are RDF applications.
Sometimes it is necessary to go fairly far into the description
of the language or system in order to find this out (in some
examples that have been found, RDF is never explicitly
mentioned at all, but sample data clearly shows it is RDF/XML).
Moreover, in applications such as CIM/XML, the RDF that is
created will not be readily found on the Web, since it is
intended for information exchange between software components
rather than for general access (although future scenarios could
be imagined in which more of this type of RDF would become
Web-accessible).</p>
</div>
<div class="section">
<h3><a id="geneont" name="geneont"></a>6.6 Gene Ontology
Consortium</h3>
<p>Structured metadata using controlled vocabularies such as <a
href="http://www.snomed.org/">SNOMED RT</a> (Systematized
Nomenclature of Medicine Reference Terminology) and <a
href="http://www.nlm.nih.gov/mesh/meshhome.html">MeSH</a>
(Medical Subject Headings) plays an important role in medicine,
enabling more efficient literature searches and aiding in the
distribution and exchange of medical knowledge <a
href="#ref-cowan">[COWAN]</a>. At the same time, the field of
medicine is rapidly changing, and with that comes the need to
develop additional vocabularies.</p>
<p>The objective of the <a
href="http://www.geneontology.org/">Gene Ontology (GO)
Consortium</a> <a href="#ref-go">[GO]</a> is to provide controlled vocabularies to
describe specific aspects of gene products. Collaborating
databases annotate their gene products (or genes) with GO
terms, providing references and indicating what kind of
evidence is available to support the annotations. The use of
common GO terms by these databases facilitates uniform queries
across them. The GO ontologies are structured to allow both
attribution and querying to be performed at different levels of
granularity. The GO vocabularies are dynamic, since knowledge
of gene and protein roles in cells is accumulating and
changing.</p>
<p>The three organizing principles of the GO are <em>molecular
function</em>, <em>biological process</em>, and <em>cellular component</em>.
A gene
product has one or more molecular functions and is used in one
or more biological processes; it may be, or may be associated
with, one or more cellular components. Definitions of the terms
within all three of these ontologies are contained in a single
(text) definition file. XML formatted
versions, containing all three ontology files and all available
definitions, are generated monthly.</p>
<p>Function, process and component are represented as directed
acyclic graphs (DAGs) or networks. A child term may be an
"instance" of its parent term (isa relationship) or a component
of its parent term (part-of relationship). A child term may
have more than one parent term and may have a different class
of relationship with its different parents. Synonyms and
cross-references to external databases are also represented in
the ontologies.
<span class="newstuff">GO uses RDF/XML facilities to represent the relationships
between terms in the XML versions of
the ontologies, because of its flexibility in representing these
graph structures, as well as its widespread tool support.
At the same time, GO currently uses <em>non</em>-RDF nested XML structures
within the term descriptions, so the language used is not
pure RDF/XML.</span></p>
<p><a href="#example43">Example 43</a> shows some sample GO
information from the <a
href="http://www.geneontology.org/GO.doc.html">GO
documentation</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example43" name="example43">Example 43: Sample GO
Information</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE go:go>
<go:go xmlns:go="http://www.geneontology.org/xml-dtd/go.dtd#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<go:version timestamp="Wed May 9 23:55:02 2001" />
<rdf:RDF>
<go:term rdf:about="http://www.geneontology.org/go#GO:0003673">
<go:accession>GO:0003673</go:accession>
<go:name>Gene_Ontology</go:name>
<go:definition></go:definition>
</go:term>
<go:term rdf:about="http://www.geneontology.org/go#GO:0003674">
<go:accession>GO:0003674</go:accession>
<go:name>molecular_function</go:name>
<go:definition>The action characteristic of a gene product.</go:definition>
<go:part-of rdf:resource="http://www.geneontology.org/go#GO:0003673" />
<go:dbxref>
<go:database_symbol>go</go:database_symbol>
<go:reference>curators</go:reference>
</go:dbxref>
</go:term>
<go:term rdf:about="http://www.geneontology.org/go#GO:0016209">
<go:accession>GO:0016209</go:accession>
<go:name>antioxidant</go:name>
<go:definition></go:definition>
<go:isa rdf:resource="http://www.geneontology.org/go#GO:0003674" />
<go:association>
<go:evidence evidence_code="ISS">
<go:dbxref>
<go:database_symbol>fb</go:database_symbol>
<go:reference>fbrf0105495</go:reference>
</go:dbxref>
</go:evidence>
<go:gene_product>
<go:name>CG7217</go:name>
<go:dbxref>
<go:database_symbol>fb</go:database_symbol>
<go:reference>FBgn0038570</go:reference>
</go:dbxref>
</go:gene_product>
</go:association>
<go:association>
<go:evidence evidence_code="ISS">
<go:dbxref>
<go:database_symbol>fb</go:database_symbol>
<go:reference>fbrf0105495</go:reference>
</go:dbxref>
</go:evidence>
<go:gene_product>
<go:name>Jafrac1</go:name>
<go:dbxref>
<go:database_symbol>fb</go:database_symbol>
<go:reference>FBgn0040309</go:reference>
</go:dbxref>
</go:gene_product>
</go:association>
</go:term>
</rdf:RDF>
</go:go>
</pre>
</div>
</div>
<p><a href="#example43">Example 43</a> illustrates that
<code>go:term</code> is the basic element. In some cases, the GO has
defined its own terms rather than using RDF Schema. For
example, term <code>GO:0016209</code> has the element
<code><go:isa
rdf:resource="http://www.geneontology.org/go#GO:0003674"
/></code>. This tag represents the relationship
"<code>GO:0016209</code> isa <code>GO:0003674</code>", or, in English,
"Antioxidant is a molecular function." Another specialized
relationship is <code>go:part-of</code>. For example,
<code>GO:0003674</code> has the element <code><go:part-of
rdf:resource="http://www.geneontology.org/go#GO:0003673"
/></code>. This says that "Molecular function is part of the
Gene Ontology".</p>
<p>Every annotation must be attributed to a source, which may
be a literature reference, another database or a computational
analysis. The annotation must indicate what kind of evidence is
found in the cited source to support the association between
the gene product and the GO term. A simple controlled
vocabulary is used to record evidence. Examples include:</p>
<ul>
<li>ISS means "inferred from sequence similarity [with
<database:sequence_id>]"</li>
<li>IDA means "inferred from direct assay"</li>
<li>TAS means "traceable author statement"</li>
</ul>
<p>The <code>go:dbxref</code> element represents the term in an
external database, and <code>go:association</code> represents the
gene associations of each term. <code>go:association</code> can
have both <code>go:evidence</code>, which holds a
<code>go:dbxref</code> to the evidence supporting the association,
and a <code>go:gene_product</code>, which contains the gene symbol
and <code>go:dbxref</code>.
<span class="newstuff">
These elements illustrate
that the GO XML syntax is not "pure" RDF/XML, since the
nesting of other elements within these elements does not
conform to the alternate node/predicate arc "stripes" described in
Sections 2.1 and 2.2 of <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a>.</span></p>
<p>The GO illustrates a number of interesting points. First, it
shows that the value of using XML for information exchange can
be enhanced by structuring that XML using RDF. This is
particularly true for data that has an overall graph or network
structure, rather than being a strict hierarchy. The GO is also
another example in which data using RDF will not necessarily appear
for direct use on the Web (although the files are
Web-accessible). It is also another example of data which is,
on the surface, described as "XML", but on closer examination
uses RDF/XML facilities (albeit not "pure" RDF/XML).
Finally, the GO illustrates the role RDF can
play as a basis for representing ontologies. This role will be
further enhanced once richer RDF-based languages for specifying
ontologies, such as the DAML+OIL or OWL languages discussed in
<a href="#richerschemas">Section 5.5</a>, become more widely
used. <span class="newstuff">In fact, a <a href="http://gong.man.ac.uk/">Gene Ontology
Next Generation</a> project is
currently developing a representation of the GO ontologies in
these richer languages.</span></p>
</div>
<div class="section">
<h3><a id="devcap" name="devcap">6.7 Describing Device
Capabilities and User Preferences</a></h3>
<p>In recent years a large number of new mobile devices for
browsing the Web have appeared. Many of these devices have
highly divergent capabilities including a wide range of input
and output capabilities as well as different levels of language
support. Mobile devices may also have widely differing network
connectivity capabilities. Users of these new devices expect a
usable presentation regardless of the device's capabilities or
the current network characteristics. Likewise, users want their
dynamically changing preferences (e.g. turn audio on/off) to be
considered when content or an application is presented. The
reality, however, is that device heterogeneity, and the lack of
a standard way for users to convey their preferences to the
server, may result in: content that cannot be stored on the
device, content that cannot be displayed, or content that
violates the desires of the user. Additionally, the resulting
content may take too long to convey over the network to the
client device.</p>
<p>A solution for addressing these problems is for a client to
encode its <em>delivery context</em> - the device's
capabilities, the user's preferences, the network
characteristics, etc. - in such a way that a server can use the
context to customize content for the device and user (see <a
href="#ref-diprinc">[DIPRINC]</a> for a definition of delivery
context). The W3C's Composite Capabilities/Preferences Profile
(CC/PP) specification <a href="#ref-ccpp">[CC/PP]</a> helps to
address this problem by defining a generic framework for
describing a delivery context.</p>
<p>The CC/PP framework defines a relatively simple structure -
a two-level hierarchy of components and attribute/value pairs.
A <em>component</em> may be used to capture a part of a
delivery context (e.g. network characteristics, software
supported by a device, or the hardware characteristics of a
device). A component may contain one or more
<em>attributes</em>. For example a component that encodes user
preferences may contain an attribute to specify whether or not
<em>AudioOutput</em> is desired.</p>
<p>CC/PP defines its structure (the hierarchy described above)
using RDF Schema (see <a href="#ref-ccpp">[CC/PP]</a> for
details of the structure schema). A CC/PP <em>vocabulary</em>
defines specific components and their attributes. <a
href="#ref-ccpp">[CC/PP]</a>, however, does not define such
vocabularies. Instead, vocabularies are defined by other
organizations or applications (as described below). <a
href="#ref-ccpp">[CC/PP]</a> also does not define a protocol
for transporting an instance of a CC/PP vocabulary.</p>
<p>An instance of a CC/PP vocabulary is called a
<em>profile</em>. CC/PP attributes are encoded as RDF
properties in a profile. <a href="#example44">Example 44</a>
shows a profile fragment of user preferences for a user that
prefers an audio presentation:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example44" name="example44">Example 44: A CC/PP
Profile Fragment</a>
</div>
<div class="exampleInner">
<pre>
<ccpp:component>
<rdf:Description rdf:ID="UserPreferences">
<rdf:type rdf:resource="http://www.example.org/profiles/prefs/v1_0#UserPreferences"/>
<ex:AudioOutput>Yes</ex:AudioOutput>
<ex:Graphics>No</ex:Graphics>
<ex:Languages>
<rdf:Seq>
<rdf:li>en-cockney</rdf:li>
<rdf:li>en</rdf:li>
</rdf:Seq>
</ex:Languages>
</rdf:Description>
</ccpp:component>
</pre>
</div>
</div>
<p>There are several advantages to using RDF in this
application. First, a profile encoded via CC/PP may include
attributes that were defined in schemas created by different
organizations. RDF is a natural fit for these profiles because
no single organization is likely to create a <em>super</em>
schema for the aggregated profile data. A second advantage of
RDF is that it facilitates (by virtue of its graph-based data
model) the insertion of arbitrary attributes (RDF properties)
into a profile. This is particularly useful for profiles that
include frequently changing data such as location
information.</p>
<p>The Open Mobile Alliance has defined the User Agent Profile
(UAProf) <a href="#ref-uaprof">[UAPROF]</a> - a CC/PP-based
framework that includes a vocabulary for describing device
capabilities, user agent capabilities, network characteristics,
etc., as well as a protocol for transporting a profile. UAProf
defines six components including: <em>HardwarePlatform</em>,
<em>SoftwarePlatform</em>, <em>NetworkCharacteristics</em> and
<em>BrowserUA</em>. It also defines several attributes for each
of its components although a component's attributes are not
fixed - they may be supplemented or overridden. <a
href="#example45">Example 45</a> shows a fragment of UAProf's
<em>HardwarePlatform</em> component:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example45" name="example45">Example 45: A Fragment
of UAProf's HardwarePlatform Component</a>
</div>
<div class="exampleInner">
<pre>
<prf:component>
<rdf:Description rdf:ID="HardwarePlatform">
<rdf:type rdf:resource="http://www.openmobilealliance.org/profiles/UAPROF/ccppschema-20021113#HardwarePlatform"/>
<prf:ScreenSizeChar>15x6</prf:ScreenSizeChar>
<prf:BitsPerPixel>2</prf:BitsPerPixel>
<prf:ColorCapable>No</prf:ColorCapable>
<prf:BluetoothProfile>
<rdf:Bag>
<rdf:li>headset</rdf:li>
<rdf:li>dialup</rdf:li>
<rdf:li>lanaccess</rdf:li>
</rdf:Bag>
</prf:BluetoothProfile>
</rdf:Description>
</prf:component>
</pre>
</div>
</div>
<p>The UAProf protocol supports both <em>static</em> profiles
and <em>dynamic</em> profiles. A <em>static</em> profile is
accessed via a URI. This has several advantages: a client's
request to a server only contains a URI rather a potentially
verbose XML document (thus minimizing over the air traffic);
the client does not have to store and/or create the profile;
the implementation burden on a client is relatively
light-weight. <em>Dynamic</em> profiles are created on-the-fly
and consequently do not have an associated URI. They may
consist of a profile fragment containing a <em>difference</em>
from a static profile, but they may also contain unique data
that is not included in the client's static profile. A request
may contain any number of static profiles and dynamic profiles.
However, the ordering of the profiles is important as later
profiles override earlier profiles in the request. See <a
href="#ref-uaprof">[UAPROF]</a> for more information about
UAProf's protocol and its rules for resolving multiple
profiles.</p>
<p>Several other communities (i.e. 3GPP's TS 26.234 <a
href="#ref-3gpp">[3GPP]</a> and the WAP Forum's Multimedia
Messaging Service Client Transactions Specification <a
href="#ref-mms">[MMS-CTR]</a>) have defined vocabularies based
on CC/PP. As a result, a profile may take advantage of the
distributed nature of RDF and include components defined from
various vocabularies. <a href="#example46">Example 46</a>
shows such a profile:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example46" name="example46">Example 46: A Profile
Using Several Vocabularies</a>
</div>
<div class="exampleInner">
<pre>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:prf="http://www.wapforum.org/profiles/UAPROF/ccppschema-20010330#"
xmlns:mms="http://www.wapforum.org/profiles/MMS/ccppschema-20010111#"
xmlns:pss="http://www.3gpp.org/profiles/PSS/ccppschema-YYYYMMDD#">
<rdf:Description rdf:ID="SomeDevice">
<prf:component>
<rdf:Description rdf:ID="Streaming">
<rdf:type rdf:resource="http://www.3gpp.org/profiles/PSS/ccppschema-PSS5#Streaming"/>
<pss:AudioChannels>Stereo</pss:AudioChannels>
<pss:VideoPreDecoderBufferSize>30720</pss:VideoPreDecoderBufferSize>
<pss:VideoInitialPostDecoderBufferingPeriod>0</pss:VideoInitialPostDecoderBufferingPeriod>
<pss:VideoDecodingByteRate>16000</pss:VideoDecodingByteRate>
</rdf:Description>
</prf:component>
<prf:component>
<rdf:Description rdf:ID="MmsCharacteristics">
<rdf:type rdf:resource="http://www.wapforum.org/profiles/MMS/ccppschema-20010111#Streaming"/>
<mms:MmsMaxMessageSize>2048</mms:MmsMaxMessageSize>
<mms:MmsMaxImageResolution>80x60</mms:MmsMaxImageResolution>
<mms:MmsVersion>2.0</mms:MmsVersion>
</rdf:Description>
</prf:component>
<prf:component>
<rdf:Description rdf:ID="PushCharacteristics">
<rdf:type rdf:resource="http://www.openmobilealliance.org/profiles/UAPROF/ccppschema-20010330#PushCharacteristics"/>
<prf:Push-MsgSize>1024</prf:Push-MsgSize>
<prf:Push-MaxPushReq>5</prf:Push-MaxPushReq>
<prf:Push-Accept>
<rdf:Bag>
<rdf:li>text/html</rdf:li>
<rdf:li>text/plain</rdf:li>
<rdf:li>image/gif</rdf:li>
</rdf:Bag>
</prf:Push-Accept>
</rdf:Description>
</prf:component>
</rdf:Description>
</rdf:RDF>
</pre>
</div>
</div>
<p>The definition of a delivery context and the data within a
context will continually evolve. Consequently, RDF's inherent
extensibility, and thus support for dynamically changing
vocabularies, make RDF a good framework for encoding a delivery
context.</p>
</div>
</div>
<div class="section">
<h2><a id="otherparts" name="otherparts">7. Other Parts of the
RDF Specification</a></h2>
<p><a href="#intro">Section 1</a> indicated that the RDF
Specification consists of a number of documents (in addition to
this Primer):</p>
<ul>
<li><a href="http://www.w3.org/TR/rdf-concepts/">RDF Concepts
and Abstract Syntax</a> <a
href="#ref-rdf-concepts">[RDF-CONCEPTS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML
Syntax Specification</a> <a
href="#ref-rdf-syntax">[RDF-SYNTAX]</a></li>
<li><a href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary
Description Language 1.0: RDF Schema</a> <a
href="#ref-rdf-vocabulary">[RDF-VOCABULARY]</a></li>
<li><a href="http://www.w3.org/TR/rdf-mt/">RDF Semantics</a> <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a></li>
<li><a href="http://www.w3.org/TR/rdf-testcases/">RDF Test
Cases</a> <a href="#ref-rdf-tests">[RDF-TESTS]</a></li>
</ul>
<p>The Primer has already discussed the subjects of several of
these documents, basic RDF concepts (in <a
href="#statements">Section 2</a>), the RDF/XML syntax (in <a
href="#rdfxml">Section 3</a>) and RDF Schema (in <a
href="#rdfschema">Section 5</a>). This section briefly
describes the remaining documents (even though there have already
been numerous references to <a href="#ref-rdf-semantics">[RDF-SEMANTICS]</a>
as well), in order to explain their role
in the complete specification of RDF.</p>
<div class="section">
<h3><a id="semantics" name="semantics">7.1 RDF
Semantics</a></h3>
<p>As discussed in the preceding sections, RDF is intended to
be used to express statements about resources in the form of a
graph, using specific vocabularies (names of resources,
properties, classes, etc.). RDF is also intended to be the
foundation for more advanced languages, such as those discussed
in <a href="#richerschemas">Section 5.5</a>. In order to serve
these purposes, the "meaning" of an RDF graph must be defined
in a very precise manner.</p>
<p>Exactly what constitutes the "meaning" of an RDF graph in a
very general sense may depend on many factors, including
conventions within a user community to interpret user-defined
RDF classes and properties in specific ways,
comments in natural language, or links to other
content-bearing documents. As noted briefly in
<a href="#rdfmodel">Section 2.2</a>, much of
the meaning conveyed in these forms will not be directly
accessible to machine processing, although this meaning may be
used by human interpreters of the RDF information, or by
programmers writing software to perform various kinds of
processing on that RDF information. However, RDF statements
also have a <em>formal</em> meaning which determines, with
mathematical precision, the conclusions (or
<em>entailments</em>) that machines can draw from a given RDF graph.
The <a href="http://www.w3.org/TR/rdf-mt/">RDF Semantics</a> <a
href="#ref-rdf-semantics">[RDF-SEMANTICS]</a> document defines this
formal meaning, using a technique called <em>model theory</em>
for specifying the semantics of a formal language.
<span class="newstuff">
<a href="#ref-rdf-semantics">[RDF-SEMANTICS]</a> also defines the
semantic extensions to the RDF language represented by RDF Schema, and by
individual datatypes.
</span>
In other
words, the RDF model theory provides the formal underpinnings
for all RDF concepts. Based on the
semantics defined in the model theory, it is simple to
translate an RDF graph into a logical expression with
essentially the same meaning.</p>
</div>
<div class="section">
<h3><a id="testcases" name="testcases">7.2 Test Cases</a></h3>
<p>The <a href="http://www.w3.org/TR/rdf-testcases/">RDF Test
Cases</a> <a href="#ref-rdf-tests">[RDF-TESTS]</a> supplement
the textual RDF specifications with test cases (examples)
corresponding to particular technical issues addressed by the
RDF Core Working Group. To help describe these examples, the
Test Cases document introduces a notation called <a
href="http://www.w3.org/TR/rdf-testcases/#ntriples">
N-Triples</a>, which provides the basis for the triples
notation used throughout this Primer. The test cases are
published in machine-readable form at Web locations referenced
by the Test Cases document, so developers can use these as the
basis for automated testing of RDF software.</p>
<p>The test cases are divided into a number of categories:</p>
<ul>
<li>Positive and Negative Parser Tests: These test whether
RDF/XML parsers produce a correct N-Triples output graph from
legal RDF/XML input documents, or correctly report errors if
the input documents are not legal RDF/XML.</li>
<li>Positive and Negative Entailment Tests: These test
whether proper entailments (conclusions) are or are not drawn
from sets of specified RDF statements.</li>
<li>Datatype-aware Entailment Tests: These are positive or
negative entailment tests that involve the use of datatypes,
and hence require additional support for the specific
datatypes involved in the tests.</li>
<li>Miscellaneous Tests: These are tests that do not fall
into one of the other categories.</li>
</ul>
<p>The test cases are not a complete specification of RDF, and
are not intended to take precedence over the other
specification documents. However, they are intended to
illustrate the intent of the RDF Core Working Group with
respect to the design of RDF, and developers may find these
test cases helpful should the wording of the specifications be
unclear on any point of detail.</p>
</div>
</div>
<div class="section">
<h2><a name="references" id="references">8. References</a></h2>
<div class="section">
<h3><a name="normative-references"
id="normative-references">8.1 Normative References</a></h3>
<dl>
<dt><a id="ref-rdf-concepts"
name="ref-rdf-concepts"></a>[RDF-CONCEPTS]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/">Resource
Description Framework (RDF): Concepts and Abstract
Syntax</a></cite>, Klyne G., Carroll J. (Editors), W3C Recommendation, 10 February 2004. <a href ="http://www.w3.org/TR/2004/REC-rdf-primer-20040210/">This version</a> is http://www.w3.org/TR/2004/REC-rdf-primer-20040210/. The <a
href="http://www.w3.org/TR/rdf-concepts/">latest version</a>
is http://www.w3.org/TR/rdf-concepts/.</dd>
<dt><a id="ref-rdf-mime-type"
name="ref-rdf-mime-type"></a>[RDF-MIME-TYPE]</dt>
<dd>
<cite><a href="http://www.iana.org/assignments/media-types/">MIME Media Types</a></cite>, The Internet Assigned Numbers Authority (IANA). This document is http://www.iana.org/assignments/media-types/ . The <a href="http://www.w3.org/2001/sw/RDFCore/mediatype-registration">registration for <code>application/rdf+xml</code></a> is archived at http://www.w3.org/2001/sw/RDFCore/mediatype-registration .
</dd>
<dt><a id="ref-rdfms" name="ref-rdfms">[RDF-MS]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">Resource
Description Framework (RDF) Model and Syntax
Specification</a></cite>, Lassila O., Swick R. (Editors),
World Wide Web Consortium, 22 February 1999. <a href = "http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">This version</a> is http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/. The <a
href="http://www.w3.org/TR/REC-rdf-syntax/">latest
version</a> is http://www.w3.org/TR/REC-rdf-syntax/.</dd>
<dt><a id="ref-rdf-semantics"
name="ref-rdf-semantics"></a>[RDF-SEMANTICS]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-mt-20040210/">RDF
Semantics</a></cite>, Hayes P. (Editor), W3C Recommendation,
10 February 2004. <a href =
"http://www.w3.org/TR/2004/REC-rdf-mt-20040210/">This
version</a> is
http://www.w3.org/TR/2004/REC-rdf-mt-20040210/. The <a
href="http://www.w3.org/TR/rdf-mt/">latest version</a>
is http://www.w3.org/TR/rdf-mt/.</dd>
<dt><a id="ref-rdf-syntax"
name="ref-rdf-syntax"></a>[RDF-SYNTAX]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/">
RDF/XML Syntax Specification (Revised)</a></cite>, Beckett
D. (Editor), W3C Recommendation, 10 February 2004. <a href = "http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/">This version</a> http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/. The <a
href="http://www.w3.org/TR/rdf-syntax-grammar/">latest
version</a> is
http://www.w3.org/TR/rdf-syntax-grammar/.</dd>
<dt><a id="ref-rdf-tests"
name="ref-rdf-tests"></a>[RDF-TESTS]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/">RDF
Test Cases</a></cite>, Grant J., Beckett D. (Editors), W3C
Recommendation, 10 February 2004. <a href = "http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/">This version</a> is http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/. The <a
href="http://www.w3.org/TR/rdf-testcases/">latest
version</a> is http://www.w3.org/TR/rdf-testcases/.</dd>
<dt><a id="ref-rdf-vocabulary"
name="ref-rdf-vocabulary"></a>[RDF-VOCABULARY]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210/">RDF
Vocabulary Description Language 1.0: RDF Schema</a></cite>,
Brickley D., Guha R.V. (Editors), W3C Recommendation, 10 February 2004.
<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210/">This version</a> is http://www.w3.org/TR/2004/REC-rdf-schema-20040210/. The <a
href="http://www.w3.org/TR/rdf-schema/">latest version</a>
is http://www.w3.org/TR/rdf-schema/.</dd>
<dt><a id="ref-unicode" name="ref-unicode"></a>[UNICODE]</dt>
<dd><cite>The Unicode Standard, Version 3</cite>, The Unicode
Consortium, Addison-Wesley, 2000. ISBN 0-201-61633-5, as updated
from time to time by the publication of new versions. (See <a
href=
"http://www.unicode.org/unicode/standard/versions/">http://www.unicode.org/unicode/standard/versions/</a>
for the latest version and additional information on versions of
the standard and of the Unicode Character Database).</dd>
<dt><a id="ref-uri" name="ref-uri">[URIS]</a></dt>
<dd><cite><a
href="http://www.isi.edu/in-notes/rfc2396.txt">RFC 2396 -
Uniform Resource Identifiers (URI): Generic
Syntax</a></cite>, Berners-Lee T., Fielding R., Masinter L.,
IETF, August 1998, http://www.isi.edu/in-notes/rfc2396.txt.</dd>
<dt><a id="ref-xml" name="ref-xml">[XML]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2000/REC-xml-20001006">Extensible
Markup Language (XML) 1.0, Second Edition</a></cite>, Bray
T., Paoli J., Sperberg-McQueen C.M., Maler E. (Editors),
World Wide Web Consortium, 6 October 2000. <a
href="http://www.w3.org/TR/2000/REC-xml-20001006">This
version</a> is http://www.w3.org/TR/2000/REC-xml-20001006.
The <a href="http://www.w3.org/TR/REC-xml">latest version</a>
is http://www.w3.org/TR/REC-xml.</dd>
<dt><a id="ref-xml-base"
name="ref-xml-base">[XML-BASE]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML
Base</a></cite>, Marsh J. (Editor), World Wide Web Consortium, 27 June 2001. <a
href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">This
version</a> is
http://www.w3.org/TR/2001/REC-xmlbase-20010627/. The <a
href="http://www.w3.org/TR/xmlbase/">latest version</a> is
http://www.w3.org/TR/xmlbase/.</dd>
<dt><a id="ref-namespaces"
name="ref-namespaces">[XML-NS]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">Namespaces
in XML</a></cite>, Bray T., Hollander D., Layman A.
(Editors), World Wide Web Consortium, 14 January 1999. <a
href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">This
version</a> is
http://www.w3.org/TR/1999/REC-xml-names-19990114/. The <a
href="http://www.w3.org/TR/REC-xml-names/">latest version</a>
is http://www.w3.org/TR/REC-xml-names/.</dd>
<dt><a id="ref-xml-xc14n"
name="ref-xml-xc14n">[XML-XC14N]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">Exclusive
XML Canonicalization Version 1.0</a></cite>, Boyer J., Eastlake D.E. 3rd,
Reagle J. (Authors/Editors), World Wide Web Consortium, 18 July 2002. <a
href="http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">This
version</a> is http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/.
The <a href="http://www.w3.org/TR/xml-exc-c14n/">latest version</a> is
http://www.w3.org/TR/xml-exc-c14n/.</dd>
</dl>
</div>
<div class="section">
<h3><a name="informational-references"
id="informational-references">8.2 Informational
References</a></h3>
<dl>
<dt><a id="ref-3gpp" name="ref-3gpp">[3GPP]</a></dt>
<dd><cite><a href="http://www.3gpp.org/specs/specs.htm">3GPP
TS 26.234.</a></cite> 3rd Generation Partnership Project;
Technical Specification Group Services and System Aspects;
Transparent end-to-end packet switched streaming service;
Protocols and codecs V5.2.0 (2002-09). <a
href="http://www.3gpp.org/specs/specs.htm">This document</a>
is available at http://www.3gpp.org/specs/specs.htm via
directory
ftp://ftp.3gpp.org/specs/2002-09/Rel-5/26_series/.</dd>
<dt><a id="ref-address-schemes"
name="ref-address-schemes">[ADDRESS-SCHEMES]</a></dt>
<dd><cite><a
href="http://www.w3.org/Addressing/schemes.html">Addressing
Schemes</a></cite>, Connolly D., 2001. <a
href="http://www.w3.org/Addressing/schemes.html">This
document</a> is
http://www.w3.org/Addressing/schemes.html.</dd>
<dt><a id="ref-bates96" name="ref-bates96">[BATES96]</a></dt>
<dd><cite><a
href="http://is.gseis.ucla.edu/research/mjbates.html">Indexing
and Access for Digital Libraries and the Internet: Human,
Database, and Domain Factors</a></cite>, Bates M.J., 1996. <a
href="http://is.gseis.ucla.edu/research/mjbates.html">This
document</a> is
http://is.gseis.ucla.edu/research/mjbates.html.</dd>
<dt><a id="ref-berners-lee98"
name="ref-berners-lee98">[BERNERS-LEE98]</a></dt>
<dd><cite><a
href="http://www.w3.org/DesignIssues/RDFnot.html">What the
Semantic Web can represent</a></cite>, Berners-Lee T., 1998.
<a href="http://www.w3.org/DesignIssues/RDFnot.html">This
document</a> is
http://www.w3.org/DesignIssues/RDFnot.html.</dd>
<dt><a id="ref-ccpp" name="ref-ccpp">[CC/PP]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-CCPP-struct-vocab-20040115/">
Composite Capability/Preference Profiles (CC/PP): Structure
and Vocabularies</a></cite>, Klyne G., Reynolds F., Woodrow
C., Ohto H., Hjelm J., Butler M., Tran, L., W3C Recommendation, 15 January 2004. <a href = "http://www.w3.org/TR/2004/REC-CCPP-struct-vocab-20040115/">This version</a> is http://www.w3.org/TR/2004/REC-CCPP-struct-vocab-20040115/. The
<a href="http://www.w3.org/TR/CCPP-struct-vocab/">latest
version</a> is http://www.w3.org/TR/CCPP-struct-vocab/.</dd>
<dt><a id="ref-cg" name="ref-cg">[CG]</a></dt>
<dd><cite>Conceptual Graphs</cite>, Sowa J., ISO working
document ISO/JTC1/SC32/WG2 N 000, 2 April 2001 (work in
progress). Available at <a
href="http://users.bestweb.net/~sowa/cg/cgstand.htm">http://users.bestweb.net/~sowa/cg/cgstand.htm</a>.</dd>
<dt><a id="ref-charmod" name="ref-charmod">[CHARMOD]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/2002/WD-charmod-20020220/">Character
Model for the World Wide Web 1.0</a></cite>, Dürst M., Yergeau F.,
Ishida R., Wolf M., Freytag A., Texin T. (Editors), World Wide Web Consortium,
20 February 2002 (work in progress).
<a href="http://www.w3.org/TR/2002/WD-charmod-20020220/">This version</a>
is http://www.w3.org/TR/2002/WD-charmod-20020220/. The
<a href="http://www.w3.org/TR/charmod/">latest version</a> is
http://www.w3.org/TR/charmod/.</dd>
<dt><a id="ref-cim" name="ref-cim">[CIM]</a></dt>
<dd><cite>Common Information Model (CIM): CIM 10 Version</cite>,
EPRI, Palo Alto, CA: 2001, 1001976. <a
href="http://www.epri.com/attachments/286161_1001976(1).pdf">This document</a>
is available at
http://www.epri.com/attachments/286161_1001976(1).pdf (267pp.).</dd>
<dt><a id="ref-cowan" name="ref-cowan">[COWAN]</a></dt>
<dd><cite><a
href="http://seminars.seyboldreports.com/2002_new_york/files/presentations/014/cowan_john.ppt">
Metadata, Reuters Health Information, and Cross-Media
Publishing</a></cite> , Cowan J., 2002. Presentation at
Seybold New York 2002 Enterprise Publishing Conference. <a
href="http://seminars.seyboldreports.com/2002_new_york/files/presentations/014/cowan_john.ppt">
This document</a> is
http://seminars.seyboldreports.com/seminars/2002_new_york/presentations/014/cowan_john.ppt.
An accompanying <a
href="http://seminars.seyboldreports.com/2002_new_york/files/transcripts/doc/transcript_EP7.doc">
transcript</a> is
http://seminars.seyboldreports.com/2002_new_york/files/transcripts/doc/transcript_EP7.doc</dd>
<dt><a id="ref-daf" name="ref-daf">[DAF]</a></dt>
<dd><cite><a
href="http://www.omg.org/technology/documents/formal/UMS_Data_Access_Facility.htm">Utility
Management System (UMS) Data Access Facility</a></cite>, version 2.0,
Object Management Group, November 2002. <a
href="http://www.omg.org/technology/documents/formal/UMS_Data_Access_Facility.htm">This
document</a> is available at
http://www.omg.org/technology/documents/formal/UMS_Data_Access_Facility.htm.</dd>
<dt><a id="ref-damloil"
name="ref-damloil">[DAML+OIL]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/daml+oil-reference">DAML+OIL
(March 2001) Reference Description</a></cite>, Connolly D.,
van Harmelen F., Horrocks I., McGuinness D.L.,
Patel-Schneider P.F., Stein L.A., World Wide Web Consortium,
18 December 2001. <a
href="http://www.w3.org/TR/daml+oil-reference">This
document</a> is http://www.w3.org/TR/daml+oil-reference.</dd>
<dt><a id="ref-dublin-core"
name="ref-dublin-core">[DC]</a></dt>
<dd><cite><a
href="http://dublincore.org/documents/2003/06/02/dces/">Dublin Core
Metadata Element Set, Version 1.1: Reference
Description</a></cite>, 02 June 2003. <a
href="http://dublincore.org/documents/2003/06/02/dces/">This
version</a> is http://dublincore.org/documents/2003/06/02/dces/.
The <a
href="http://dublincore.org/documents/dces/">latest
version</a> is http://dublincore.org/documents/dces/.</dd>
<dt><a id="ref-diprinc" name="ref-diprinc">[DIPRINC]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/di-princ/">Device
Independence Principles.</a></cite> Gimson, R., Finkelstein,
S., Maes, S., Suryanarayana, L., World Wide Web Consortium,
18 September 2001 (work in progress). <a
href="http://www.w3.org/TR/2001/WD-di-princ-20010918/">This
version</a> is
http://www.w3.org/TR/2001/WD-di-princ-20010918. The <a
href="http://www.w3.org/TR/di-princ/">latest version</a> is
http://www.w3.org/TR/di-princ/.</dd>
<dt><a id="ref-devos" name="ref-devos">[DWZ01]</a></dt>
<dd><cite><a href="http://www.langdale.com.au/PICA/">XML for
CIM Model Exchange</a></cite> , deVos A., Widergreen S.E.,
Zhu J., Proc. IEEE Conference on Power Industry Computer
Systems, Sydney, Australia, 2001. <a
href="http://www.langdale.com.au/PICA/">This document</a> is
http://www.langdale.com.au/PICA/.</dd>
<dt><a id="ref-go" name="ref-go">[GO]</a></dt>
<dd><cite><a href="http://www.geneontology.org/GO_nature_genetics_2000.pdf">Gene
Ontology: tool for the unification of biology</a></cite>,
The Gene Ontology Consortium, <em>Nature Genetics</em>, Vol. 25: 25-29, May 2000.
Available at <a href="http://www.geneontology.org/GO_nature_genetics_2000.pdf">http://www.geneontology.org/GO_nature_genetics_2000.pdf</a></dd>
<dt><a id="ref-gray" name="ref-gray">[GRAY]</a></dt>
<dd><cite>Logic, Algebra and Databases</cite>, Gray P., Ellis
Horwood Ltd., 1984. ISBN 0-85312-709-3, 0-85312-803-0,
0-470-20103-7, 0-470-20259-9.</dd>
<dt><a id="ref-hayes" name="ref-hayes">[HAYES]</a></dt>
<dd><cite>In Defense of Logic</cite>, Hayes P., Proceedings
from the International Joint Conference on Artificial
Intelligence, 1975, San Francisco. Morgan Kaufmann Inc.,
1977. Also in <cite>Computation and Intelligence: Collected
Readings</cite>, Luger G. (ed), AAAI press/MIT press, 1995.
ISBN 0-262-62101-0.</dd>
<dt><a id="ref-kif" name="ref-kif">[KIF]</a></dt>
<dd><cite>Knowledge Interchange Format</cite>, Genesereth M.,
draft proposed American National Standard NCITS.T2/98-004.
Available at <a
href="http://logic.stanford.edu/kif/dpans.html">http://logic.stanford.edu/kif/dpans.html</a>.</dd>
<dt><a id="ref-lbase"
name="ref-lbase"></a>[LBASE]</dt>
<dd><cite><a
href="http://www.w3.org/TR/2003/NOTE-lbase-20031010/">LBase:
Semantics for Languages of the Semantic Web</a></cite>, Guha R. V., Hayes P.,
W3C Note, 10 October 2003. <a
href="http://www.w3.org/TR/2003/NOTE-lbase-20031010/">This
version</a> is http://www.w3.org/TR/2003/NOTE-lbase-20031010/.
The <a href="http://www.w3.org/TR/lbase/">latest version</a>
is http://www.w3.org/TR/lbase/.</dd>
<dt><a id="ref-luger" name="ref-luger">[LUGER]</a></dt>
<dd><cite>Artificial Intelligence: Structures and Strategies
for Complex Problem Solving</cite> (3rd ed.), Luger G.,
Stubblefield W., Addison Wesley Longman, 1998. ISBN
0-805-31196-3.</dd>
<dt><a id="ref-mathml" name="ref-mathml">[MATHML]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/2001/REC-MathML2-20010221/">Mathematical
Markup Language (MathML) Version 2.0</a></cite>, Carlisle D., Ion P.,
Miner R., Poppelier N. (Editors); Ausbrooks R., Buswell S., Dalmas S.,
Devitt S., Diaz A., Hunter R., Smith B., Soiffer N., Sutor R.,
Watt S. (Principal Authors), World Wide Web Consortium, 21 February 2001.
<a href="http://www.w3.org/TR/2001/REC-MathML2-20010221/">This
version</a> is http://www.w3.org/TR/2001/REC-MathML2-20010221/.
The <a href="http://www.w3.org/TR/MathML2/">latest version</a> is
http://www.w3.org/TR/MathML2/.</dd>
<dt><a id="ref-mms" name="ref-mms">[MMS-CTR]</a></dt>
<dd><cite><a
href="http://www.openmobilealliance.org/">Multimedia
Messaging Service Client Transactions
Specification.</a></cite> WAP-206-MMSCTR-20020115-a.
This document is available at
http://www.openmobilealliance.org/.</dd>
<dt><a id="ref-nameaddress"
name="ref-nameaddress">[NAMEADDRESS]</a></dt>
<dd><cite><a href="http://www.w3.org/Addressing/">Naming and
Addressing: URIs, URLs, ...</a></cite>, Connolly D., 2002. <a
href="http://www.w3.org/Addressing/">This document</a> is
http://www.w3.org/Addressing/.</dd>
<dt><a id="ref-owl" name="ref-owl">[OWL]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2004/REC-owl-ref-20040210/">OWL Web
Ontology Language Reference</a></cite>, Dean M.,
Schreiber G (Editors); van Harmelen F., Hendler J., Horrocks I.,
McGuinness D.L., Patel-Schneider P.F., Stein L.A. (Authors),
W3C Recommendation, 10 February 2004. The <a
href="http://www.w3.org/TR/owl-ref/">latest version</a> is
http://www.w3.org/TR/owl-ref/.</dd>
<dt><a id="ref-prism" name="ref-prism">[PRISM]</a></dt>
<dd><cite><a
href="http://www.prismstandard.org/">PRISM:
Publishing Requirements for Industry Standard
Metadata</a></cite>, Version 1.1, 19 February 2002. The <a
href="http://www.prismstandard.org/">latest version</a>
of the PRISM specification is available at
http://www.prismstandard.org/.</dd>
<dt><a id="ref-rdf-issue"
name="ref-rdf-issue">[RDFISSUE]</a></dt>
<dd><cite><a
href="http://www.w3.org/2000/03/rdf-tracking/">RDF Issue
Tracking</a></cite>, McBride B., 2002. <a
href="http://www.w3.org/2000/03/rdf-tracking/">This
document</a> is http://www.w3.org/2000/03/rdf-tracking/.</dd>
<dt><a id="ref-rdf-s"
name="ref-rdf-s">[RDF-S]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/">
Resource Description Framework (RDF) Schema Specification 1.0</a>
</cite>, Brickley D., Guha, R.V. (Editors), World Wide Web Consortium.
27 March 2000. <a href="http://www.w3.org/TR/2000/CR-rdf-schema-20000327/">
This version</a> is http://www.w3.org/TR/2000/CR-rdf-schema-20000327/.</dd>
<dt><a id="ref-rss" name="ref-rss">[RSS]</a></dt>
<dd><cite><a href="http://purl.org/rss/1.0/spec">RDF Site
Summary (RSS) 1.0</a></cite>, Beged-Dov G., Brickley D.,
Dornfest R., Davis I., Dodds L., Eisenzopf J., Galbraith D.,
Guha R.V., MacLeod K., Miller E., Swartz A., van der Vlist
E., 2000. <a href="http://purl.org/rss/1.0/spec">This
document</a> is http://purl.org/rss/1.0/spec.</dd>
<dt><a id="ref-ruby" name="ref-ruby">[RUBY]</a></dt>
<dd><cite><a href="http://www.w3.org/TR/2001/REC-ruby-20010531/">Ruby
Annotation</a></cite>, Sawicki M., Suignard M., Ishikawa M., Dürst M.,
Texin T. (Editors), World Wide Web Consortium, 31 May 2001.
<a href="http://www.w3.org/TR/2001/REC-ruby-20010531/">This version</a>
is http://www.w3.org/TR/2001/REC-ruby-20010531/. The
<a href="http://www.w3.org/TR/ruby/">latest version</a> is
http://www.w3.org/TR/ruby/.</dd>
<dt><a id="ref-sowa" name="ref-sowa">[SOWA]</a></dt>
<dd><cite>Knowledge Representation: Logical, Philosophical
and Computational Foundations</cite>, Sowa J., Brookes/Cole,
2000. ISBN 0-534-94965-7.</dd>
<dt><a id="ref-svg" name="ref-svg">[SVG]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2003/REC-SVG11-20030114/">Scalable
Vector Graphics (SVG) 1.1 Specification</a></cite>, Ferraiolo J.,
Fujisawa J., Jackson D. (Editors), World Wide Web Consortium, 14
January 2003. <a
href="http://www.w3.org/TR/2003/REC-SVG11-20030114/">This
version</a> is http://www.w3.org/TR/2003/REC-SVG11-20030114/.
The <a href="http://www.w3.org/TR/SVG11/">latest version</a>
is http://www.w3.org/TR/SVG11/.</dd>
<dt><a id="ref-uaprof" name="ref-uaprof">[UAPROF]</a></dt>
<dd><cite><a href="http://www.openmobilealliance.org/">User
Agent Profile.</a></cite> OMA-WAP-UAProf-v1_1. This document
is available at http://www.openmobilealliance.org/.</dd>
<dt><a id="ref-webdata" name="ref-webdata">[WEBDATA]</a></dt>
<dd><cite><a href="http://www.w3.org/1999/04/WebData">Web
Architecture: Describing and Exchanging Data</a></cite>,
Berners-Lee T., Connolly D., Swick R., World Wide Web Consortium, 7 June 1999. <a
href="http://www.w3.org/1999/04/WebData">This document</a> is
http://www.w3.org/1999/04/WebData.</dd>
<dt><a id="ref-xlink" name="ref-xlink">[XLINK]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2001/REC-xlink-20010627/">XML
Linking Language (XLink) Version 1.0</a></cite>, DeRose S.,
Maler E., Orchard D. (Editors), World Wide Web Consortium, 27
June 2001. <a
href="http://www.w3.org/TR/2001/REC-xlink-20010627/">This
version</a> is http://www.w3.org/TR/2001/REC-xlink-20010627/.
The <a href="http://www.w3.org/TR/xlink/">latest version</a>
is http://www.w3.org/TR/xlink/.</dd>
<dt><a id="ref-xmlschema2"
name="ref-xmlschema2">[XML-SCHEMA2]</a></dt>
<dd><cite><a
href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">XML
Schema Part 2: Datatypes</a></cite>, Biron P., Malhotra A.
(Editors), World Wide Web Consortium. 2 May 2001. <a
href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">This
version</a> is
http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/. The <a
href="http://www.w3.org/TR/xmlschema-2/">latest version</a>
is http://www.w3.org/TR/xmlschema-2/.</dd>
<dt><a id="ref-xpackage"
name="ref-xpackage">[XPACKAGE]</a></dt>
<dd><cite><a
href="http://www.xpackage.org/specification/xpackage-draft-20030306.html">
XML Package (XPackage) 1.0</a></cite> , Wilson G., Editor's Working Draft,
6 March 2003. <a
href="http://www.xpackage.org/specification/xpackage-draft-20030306.html">
This version</a> is
http://www.xpackage.org/specification/xpackage-draft-20030306.html.
The <a href="http://www.xpackage.org/specification/">latest
version</a> is http://www.xpackage.org/specification/.</dd>
</dl>
</div>
</div>
<div class="section">
<h2><a id="acknowledgements" name="acknowledgements">9.
Acknowledgments</a></h2>
<p>This document has benefited from inputs from many members of
the <a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working
Group</a>. Specific thanks are due to Art Barstow, Dave Beckett,
Dan Brickley, Ron Daniel, Ben Hammersley, Martyn Horner, Graham
Klyne, Sean Palmer, Patrick Stickler, Aaron Swartz, Ralph Swick,
and Garret Wilson who, together with the many people who
commented on earlier versions of the Primer, provided valuable
contributions to this document.</p>
<p>In addition, this document contains a significant contribution
from Pat Hayes, Sergey Melnik, and Patrick Stickler, who led the
development of the RDF datatype facilities described in the RDF
family of specifications.</p>
<p>Frank Manola also thanks
<a href="http://www.mitre.org/">The MITRE Corporation</a>, Frank's employer
during most of the preparation of this document, for its support of
his RDF Core Working Group activities under a MITRE Sponsored Research
grant.</p>
</div>
<hr />
<div class="section">
<h2><a id="identifiers" name="identifiers"></a>Appendix
A: More on Uniform Resource Identifiers (URIs)</h2>
<p class="newstuff">Note: This section is intended to provide a
brief introduction to URIs. The definitive specification
of URIs is <a
href="http://www.isi.edu/in-notes/rfc2396.txt">RFC 2396</a> <a
href="#ref-uri">[URIS]</a>, which should be consulted for further
details. Additional discussion of URIs
can also be found in <a href="http://www.w3.org/Addressing/">Naming
and Addressing: URIs, URLs, ...</a> <a
href="#ref-nameaddress">[NAMEADDRESS]</a>.</p>
<p>As discussed in <a href="#basicconcepts">Section 2.1</a>, the Web
provides a general form of identifier, called the <a
href="http://www.isi.edu/in-notes/rfc2396.txt">Uniform Resource
Identifier</a> (URI), for identifying (naming) resources on the
Web. Unlike URLs, URIs are not limited to identifying things that
have network locations, or use other computer access mechanisms.
A number of different <em>URI schemes</em> (URI forms) have been
already been developed, and are being used, for various purposes.
Examples include:</p>
<ul>
<li><code>http:</code> (Hypertext Transfer Protocol, for Web
pages)</li>
<li><code>mailto:</code> (email addresses), e.g.,
<code>mailto:em@w3.org</code></li>
<li><code>ftp:</code> (File Transfer Protocol)</li>
<li><code>urn:</code> (Uniform Resource Names, intended to be
persistent location-independent resource identifiers), e.g.,
<code>urn:isbn:0-520-02356-0</code> (for a book)</li>
</ul>
<p>A list of existing URI schemes can be found in <a
href="http://www.w3.org/Addressing/schemes.html">Addressing
Schemes</a> <a href="#ref-address-schemes">[ADDRESS-SCHEMES]</a>,
and it is a good idea to consider adapting one of the existing
schemes for any specialized identification purposes,
rather than trying to invent a new one.</p>
<p>No one person or organization controls who makes URIs or how
they can be used. While some URI schemes, such as URL's
<code>http:</code>, depend on centralized systems such as DNS, other
schemes, such as <code>freenet:</code>, are completely decentralized.
This means that, as with any other kind of name, no one needs
special authority or permission to create a URI for something.
Also, anyone can create URIs to refer to things they do not own, just as in
ordinary language anyone can use whatever name they like for things
they do not own.</p>
<p>As also noted in <a href="#basicconcepts">Section 2.1</a>,
RDF uses <em>URI references</em> <a href="#ref-uri">[URIS]</a> to
name subjects, predicates, and objects in RDF statements. A URI
reference (or <em>URIref</em>) is a URI, together with an
optional <em>fragment identifier</em> at the end. For example,
the URI reference
<code>http://www.example.org/index.html#section2</code> consists of
the URI <code>http://www.example.org/index.html</code> and (separated
by the "#" character) the fragment identifier
<code>Section2</code>.
RDF URIrefs can contain
Unicode <a href="#ref-unicode">[UNICODE]</a> characters (see <a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a>), allowing many languages to be reflected in URIrefs.
</p>
<p>URIrefs may be either <em>absolute</em> or <em>relative</em>.
An <em>absolute</em> URIref refers to a resource independently of
the context in which the URIref appears, e.g., the URIref
<code>http://www.example.org/index.html</code>. A <em>relative</em>
URIref is a shorthand form of an absolute URIref, where some
prefix of the URIref is missing, and information from the context
in which the URIref appears is required to fill in the missing
information. For example, the relative URIref
<code>otherpage.html</code>, when appearing in a resource
<code>http://www.example.org/index.html</code>, would be filled out
to the absolute URIref
<code>http://www.example.org/otherpage.html</code>. A URIref without
a URI part is considered a reference to the current document (the
document in which it appears). So, an empty URIref within a
document is considered equivalent to the URIref of the document
itself. A URIref consisting of just a fragment identifier is
considered equivalent to the URIref of the document in which it
appears, with the fragment identifier appended to it. For
example, within <code>http://www.example.org/index.html</code>, if
<code>#section2</code> appeared as a URIref, it would be considered
equivalent to the absolute URIref
<code>http://www.example.org/index.html#section2</code>.</p>
<p><a href="#ref-rdf-concepts">[RDF-CONCEPTS]</a> notes that RDF
graphs (the abstract models) do not use relative URIrefs, i.e.,
the subjects, predicates, and objects (and datatypes in typed
literals) in RDF statements must always be identified
independently of any context. However, a specific concrete RDF
syntax, such as RDF/XML, may allow relative URIrefs to be used as
a shorthand for absolute URIrefs in certain situations. RDF/XML
does permit such use of relative URIrefs, and some of the RDF/XML
examples in this Primer illustrate such uses.
<a href="#ref-rdf-syntax">[RDF-SYNTAX]</a> should be
consulted for further details.</p>
<p>Both RDF and Web browsers use URIrefs to identify things.
However, RDF and browsers interpret URIrefs in slightly different
ways. This is because RDF uses URIrefs <em>only</em> to identify
things, while browsers also use URIrefs to <em>retrieve</em>
things. Often there is no effective difference, but in some cases
the difference can be significant. One obvious difference is that when
a URIref is used in a browser, there is the expectation that it
identifies a resource that can actually be retrieved: that
something is actually "at" the location identified by the URI.
However, in RDF a URIref may be used to identify something, such
as a person, that <em>cannot</em> be retrieved on the Web. People
sometimes use RDF together with a convention that, when a URIref
is used to identify an RDF resource, a page containing
descriptive information about that resource will be placed on the
Web "at" that URI, so that the URIref can be used in a browser to
retrieve that information. This can be a useful convention in
some circumstances, although it creates a difficulty in
distinguishing the identity of the original resource from the
identity of the Web page describing it (a subject discussed
further in <a href="#structuredproperties">Section 2.3</a>).
However, this convention is not an explicit part of the
definition of RDF, and RDF itself does not assume that a URIref
identifies something that can be retrieved.</p>
<p>Another difference is in the way URIrefs with fragment
identifiers are handled. Fragment identifiers are often seen in
the URLs that identify HTML documents, where they serve to
identify a specific place within the document identified by the
URL. In normal HTML usage, where URI references are used to
retrieve the indicated resources, the two URIrefs:</p>
<p><code>http://www.example.org/index.html</code><br />
<code>http://www.example.org/index.html#Section2</code></p>
<p>are related (they both refer to the same document, the second
one identifying a location within the first one). However, as
noted already, RDF uses URI references purely to
<em>identify</em> resources, not to retrieve them, and RDF
assumes no particular relationship between these two URIrefs. As
far as RDF is concerned, they are syntactically different URI
references, and hence may refer to unrelated things. This
does not mean that the HTML-defined containment relationship might
not exist, just that RDF does not assume that a relationship
exists based only on the fact that the URI parts of the URI
references are the same.</p>
<div class="newstuff">
<p>Carrying this point further, RDF
does not assume that there is any relationship between URI references
that share a common leading string, whether there is a fragment
identifier or not. For example, as far as RDF is concerned, the
two URIrefs:</p>
<p><code>http://www.example.org/foo.html</code><br />
<code>http://www.example.org/bar.html</code></p>
<p>have no particular relationship even though both of them start
with the string <code>http://www.example.org/</code>. To RDF, they
are simply different resources, because their URIrefs are different.
(They may in fact be two files located in the same directory, but
RDF does not assume this or any other relationship exists.)</p>
</div>
</div>
<div class="section">
<h2><a id="documents" name="documents"></a>Appendix B:
More on the Extensible Markup Language (XML)</h2>
<p class="newstuff">Note: This section is intended to provide a
brief introduction to XML. The definitive specification
of XML is <a href="#ref-xml">[XML]</a>, which should be consulted for
further details. </p>
<p>The <a
href="http://www.w3.org/TR/2000/REC-xml-20001006">Extensible
Markup Language</a> <a href="#ref-xml">[XML]</a> was designed to
allow anyone to design their own document format and then write a
document in that format. Like HTML documents (Web pages), XML
documents contain text. This text consists primarily of plain
text content, and markup in the form of <em>tags</em>. This
markup allows a processing program to interpret the various
pieces of content (called <em>elements</em>).
Both XML content and (with certain exceptions) tags can contain Unicode <a href="#ref-unicode">[UNICODE]</a> characters, allowing information from many languages to be directly represented.
In HTML, the set of
permissible tags, and their interpretation, is defined by the
HTML specification. However, XML allows users to define their own
markup languages (tags and the structures in which they can
appear) adapted to their own specific requirements
(the RDF/XML language described in <a href="#rdfxml">Section
3</a> is one such XML markup language). For example,
the following is a simple passage marked up using an XML-based
markup language:</p>
<div class="exampleOuter exampleInner">
<pre>
<sentence><person webid="http://example.com/#johnsmith">I</person>
just got a new pet <animal>dog</animal>.</sentence>
</pre>
</div>
<p>Elements delimited by tags (<code><sentence></code>,
<code><person></code>, etc.) are introduced to reflect a
particular structure associated with the passage. The tags allow
a program written with an understanding of these particular
elements, and the way they are structured, to properly interpret
the passage. For example, one of the elements in this example is
<code><animal>dog</animal></code>. This consists of the
<em>start-tag</em> <code><animal></code>, the element
<em>content</em>, and a matching <em>end-tag</em>
<code></animal></code>. This <code>animal</code> element, together
with the <code>person</code> element, are nested as part of the
content of the <code>sentence</code> element. The nesting is possibly
clearer (and closer to some of the more "structured" XML
contained in the rest of this Primer) if the sentence is
written:</p>
<div class="exampleOuter exampleInner">
<pre>
<sentence>
<person webid="http://example.com/#johnsmith">I</person>
just got a new pet
<animal>dog</animal>.
</sentence>
</pre>
</div>
<p>In some cases, an element may have no content. This can be
written either by enclosing no content within the pair of
delimiting start- and end-tags, as in
<code><animal></animal></code>, or by using a shorthand
form of tag called an <em>empty-element tag</em>, as in
<code><animal/></code>.</p>
<p>In some cases, a start-tag (or empty-element tag) may contain
qualifying information other than the tag name, in the form of
<em>attributes</em>. For example, the start-tag of the
<code><person></code> element contains the attribute
<code>webid="http://example.com/#johnsmith"</code> (presumably
identifying the specific person referred to). An attribute
consists of a name, an equal sign, and a value (enclosed in
quotes).</p>
<p>This particular markup language uses the words "sentence,"
"person," and "animal" as tag names in an attempt to convey some
of the meaning of the elements; and they <em>would</em> convey
meaning to an English-speaking person reading it, or to a program
specifically written to interpret this vocabulary. However, there
is no built-in meaning here. For example, to non-English
speakers, or to a program not written to understand this markup,
the element <code><person></code> may mean absolutely nothing.
Take the following passage, for example:</p>
<div class="exampleOuter exampleInner">
<pre>
<dfgre><reghh bjhbw="http://example.com/#johnsmith">I</reghh>
just got a new pet <yudis>dog</yudis>.</dfgre>
</pre>
</div>
<p>To a machine, this passage has exactly the same structure as
the previous example. However, it is no longer clear to an
English-speaker what is being said, because the tags are no
longer English words. Moreover, others may have used the same
words as tags in their own markup languages, but with completely
different intended meanings. For example, "sentence" in another
markup language might refer to the amount of time that a
convicted criminal must serve in a penal institution. So
additional mechanisms must be provided to help keep XML
vocabulary straight.</p>
<p>To prevent confusion, it is necessary to uniquely identify
markup elements. This is done in XML using <a
href="http://www.w3.org/TR/REC-xml-names/">XML Namespaces</a> <a
href="#ref-namespaces">[XML-NS]</a>. A <em>namespace</em> is just
a way of identifying a part of the Web (space) which acts as a
qualifier for a specific set of names. A namespace is created for
an XML markup language by creating a URI for it. By qualifying
tag names with the URIs of their namespaces, anyone can create
their own tags and properly distinguish them from tags with
identical spellings created by others. A convention that is
sometimes followed is to
create a Web page to describe the markup language (and the
intended meaning of the tags) and use the URL of that Web page as
the URI for its namespace. However, this is just a convention, and
neither XML nor RDF assumes that a namespace URI identifies a
retrievable Web resource.
The following example illustrates the
use of an XML namespace.</p>
<div class="exampleOuter exampleInner">
<pre>
<user:sentence xmlns:user="http://example.com/xml/documents/">
<user:person user:webid="http://example.com/#johnsmith">I</user:person>
just got a new pet <user:animal>dog</user:animal>.
</user:sentence>
</pre>
</div>
<p>In this example, the attribute
<code>xmlns:user="http://example.com/xml/documents/"</code> declares a
namespace for use in this piece of XML. It maps the
<em>prefix</em> <code>user</code> to the namespace URI
<code>http://example.com/xml/documents/</code>. The XML content can
then use <em>qualified names</em> (or <em>QNames</em>) like
<code>user:person</code> as tags. A QName contains a prefix that
identifies a namespace, followed by a colon, and then a <em>local
name</em> for an XML tag or attribute name. By using namespace
URIs to distinguish specific groups of names, and qualifying tags
with the URIs of the namespaces they come from, as in this
example, there is no need to worry about tag names conflicting. Two
tags having the same spelling are considered the same only if
they also have the same namespace URIs.</p>
<p>Every XML document is required to be <dfn>well-formed</dfn>.
This means the XML document must satisfy a number of syntactic
conditions, for example, that every start-tag must have a matching
end-tag, and that elements must be properly nested within other elements
(elements may not overlap). The complete set of well-formedness
conditions is defined in <a href="#ref-xml">[XML]</a>.</p>
<p>In addition, an XML document may optionally include an XML
<dfn>document type declaration</dfn> to define additional constraints
on the structure of the document, and to support the use of
predefined units of text within the document.
The document type declaration (introduced with <code>DOCTYPE</code>)
contains or points to declarations that define a grammar for the
document. This grammar is known as a <dfn>document type definition</dfn>,
or <dfn>DTD</dfn>.
The declarations in a DTD specify such things as
which XML elements and attributes
may appear in XML documents corresponding to the DTD, the relationships
of these elements and attributes (e.g., which elements can be nested within
which other elements, or which attributes may appear with which elements),
and whether elements or attributes are required or optional.
The document type declaration can point to a set of declarations located
outside the document (called the <dfn>external subset</dfn>, which can
be used to allow common declarations to be shared among multiple
documents), can include
the declarations directly in the document (called the
<dfn>internal subset</dfn>), or can have both internal and external
DTD subsets.
The complete DTD for a document consists of both subsets taken together.
A simple example of an XML document with a document type declaration
is shown in <a href="#example47">Example 47</a>:</p>
<div class="exampleOuter">
<div class="c1">
<a id="example47" name="example47">Example 47: An XML Document
With a Document Type Declaration</a>
</div>
<div class="exampleInner">
<pre>
<?xml version="1.0"?>
<!DOCTYPE greeting SYSTEM "http://www.example.org/dtds/hello.dtd">
<greeting>Hello, world!</greeting>
</pre>
</div>
</div>
<p>In this case, the document has only an external DTD subset, and the
<dfn>system identifier</dfn> <code>http://www.example.org/dtds/hello.dtd</code>
provides its location (a URIref).</p>
<p>An XML document
is <dfn>valid</dfn> if it has an associated document type declaration
and the document complies with the constraints defined by the document
type declaration.</p>
<div class="newstuff">
<p>An RDF/XML document is only required to be well-formed XML; it is not
intended to be validated against an XML DTD (or an XML Schema), and
<a href="#ref-rdf-syntax">[RDF-SYNTAX]</a> does not specify a normative
DTD that could be used for validating arbitrary RDF/XML (an appendix of
<a href="#ref-rdf-syntax">[RDF-SYNTAX]</a> does provide a non-normative
example schema for RDF/XML). As a result, more detailed
discussion of XML DTD grammars is beyond the scope of this Primer.
Further information on XML DTDs and XML validation can be found in
<a href="#ref-xml">[XML]</a>, and the numerous books on XML.</p>
<p>However, there is one use of XML document type declarations
that <em>is</em> relevant to RDF/XML, and that is their use in defining XML
<em>entities</em>. An XML entity
declaration essentially associates a name with a string of characters.
When the entity name is used elsewhere within an XML document, XML
processors replace the entity name with the corresponding string.
This provides a way to abbreviate long strings such as URIrefs, and can
help make XML documents containing such strings more readable.
Using a document type declaration just to declare
XML entities is allowed, and can be useful, even when (as in
RDF/XML) the documents are not intended to be validated.</p>
<p>In RDF/XML documents, entities are generally declared within the
document itself, i.e., using only an internal DTD subset (one reason
for this is that RDF/XML is not intended to be validated, and non-validating
XML processors are not required to process external DTD subsets).
For example, providing the document type declaration
shown in <a href="#example48">Example 48</a>
at the beginning of an RDF/XML document allows the URIrefs in that document
for the <code>rdf</code>,
<code>rdfs</code>, and <code>xsd</code> namespaces to be abbreviated as
<code>&rdf;</code>, <code>&rdfs;</code>, and <code>&xsd;</code> respectively,
as shown in the example.</p>
<div class="exampleOuter">
<div class="c1">
<a id="example48" name="example48">Example 48: Some XML Entity
Declarations</a>
</div>
<div class="exampleInner">
<pre>
<?xml version='1.0'?>
<!DOCTYPE rdf:RDF [
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
]>
<rdf:RDF
xmlns:rdf = "&rdf;"
xmlns:rdfs = "&rdfs;"
xmlns:xsd = "&xsd;">
...RDF statements...
</rdf:RDF></pre>
</div>
</div>
</div>
</div>
<div class="section">
<h2><a id="changes" name="changes"></a>Appendix C: Changes</h2>
<p>Only minor editorial and typographic changes have been made since
the <a href="http://www.w3.org/TR/2003/PR-rdf-primer-20031215/">
Proposed Recommendation version</a>. Older changes are detailed in its
<a href="http://www.w3.org/TR/2003/PR-rdf-primer-20031215/#changes">
change log</a>.</p>
</div>
<hr />
<div class="metadata">
<p><a href="metadata.rdf"><img border="0"
src="http://www.w3.org/RDF/icons/rdf_metadata_button.40"
alt="RDF/XML Metadata" /></a></p>
</div>
</body>
</html>