index.html 126 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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta name="rcsid" content="$Id: index.html,v 1.2 2001/12/18 19:17:59 dom Exp $"/>
  <title>RDF/XML Syntax Specification (Revised)</title>
  <style type="text/css">
.added {
   color: green;
   text-decoration: underline;
   background: white;
}
.removed {
   color: red;
   background: white;
   text-decoration: line-through;
}

.actionLabel {
   font-weight: bold
}

.actionDecision {
   color: black;
   background: #99ffff;
}

div.issue,
div.block,
div.note  { margin-left: 2em; }



div.productionOuter {
/*
   border: 4px double gray;
*/
   margin: 0em;
   padding: 0em;
}

div.productionInner {
   color: black;
   /* tan */
   /* background-color: #d2b48c; */
   /* cyan */
   /* background-color: #99ffff; */
   /* mauve */
   background-color: #efeff8;
/*
   border-top-style: double;
   border-top-color: #d3d3d3;
   border-bottom-width: 4px;
   border-bottom-style: double;
   border-bottom-color: #d3d3d3;
*/
   padding: 0.5em;
   margin: 0em;
}

div.productionInner p {
   margin-left: 0em;
   margin-top: 0em;
   margin-bottom: 0em
}

div.ntripleOuter {
/*
   border: 4px double gray;
*/
   margin: 0em;
   padding: 0em;
}

div.ntripleInner {
   color: black;
   /* tan */
   /* background-color: #d2b48c; */
   /* cyan */
   /* background-color: #99ffff; */
   /* mauve */
   /* background-color: #efeff8; */
   /* LightGoldenrod1 */
   background-color: #ffec8b;
/*
   border-top-style: double;
   border-top-color: #d3d3d3;
   border-bottom-width: 4px;
   border-bottom-style: double;
   border-bottom-color: #d3d3d3;
*/
   padding: 0.5em;
   margin: 0em;
}

div.ntripleInner p {
   margin-left: 0em;
   margin-top: 0em;
   margin-bottom: 0em
}

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: #efeff8; */
   border-top-style: double;
   border-top-color: #d3d3d3;
   border-bottom-width: 4px;
   border-bottom-style: double;
   border-bottom-color: #d3d3d3;
   padding: 4px;
   margin: 0em;
}

div.exampleInner pre {
  margin-left: 0em;
  margin-top: 0em;
  margin-bottom: 0em;
  font-family: monospace;
  /* font-size: smaller */
}

</style>
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD" />
</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/XML Syntax Specification (Revised)</h1>

<h2 id="doctype">W3C Working Draft 18 December 2001</h2>

<dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20011218">http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20011218</a><br />
</dd>

<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/rdf-syntax-grammar">http://www.w3.org/TR/rdf-syntax-grammar</a><br />
</dd>

<dt>Previous version:</dt>
<dd><a href="http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20010906">http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20010906</a>
</dd>

<dt>Editor:</dt>
<dd>Dave Beckett (University of Bristol)</dd>
</dl>

<p class="copyright">
<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright"> 
Copyright</a> &copy;2001 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup>
(<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, 
<a href="http://www.inria.fr/"><abbr lang="fr" title="Institut National de Recherche en Informatique et Automatique">INRIA</abbr></a>, 
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. 
W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Legal_Disclaimer">liability</a>, 
<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#W3C_Trademarks">trademark</a>, 
<a href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document use</a> and 
<a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software licensing</a> rules apply.</p>

<hr title="Separator for header" />
</div>


<h2 class="nonum">
<a id="abstract" name="abstract">Abstract</a>
</h2>

<p>This W3C Working Draft revises the specification of the XML syntax
of RDF as originally described in
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">RDF Model &amp; Syntax</a>.
This document presents the syntax as amended and clarified by the 
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
with the specification now based on the
<a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024">XML Information Set</a>
along with mapping rules for creating RDF models as described in the
<a href="http://www.w3.org/TR/2001/WD-rdf-mt-20010925">RDF Model Theory</a>
W3C Working Draft.
</p>


<h2 class="nonum">
<a id="status" name="status">Status of this Document</a>
</h2>

<p><em>This section describes the status of this document at the time
of its publication. Other documents may supersede this document. The
latest status of this document series is maintained at the W3C.</em></p>

<p>This is a W3C Working Draft for the
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
produced as part of the W3C
<a href="http://www.w3.org/2001/sw/">Semantic Web Activity</a>.
It incorporates decisions made by the Working Group
updating the XML syntax for RDF from the original 
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222">RDF Model &amp; Syntax</a> (<a href="#ref-rdfms">[RDFMS])</a> document
and includes a re-representing of the syntax in terms
of the
<a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024">XML Information Set</a>
with rules for generation of RDF models.
</p>

<p>This document is being released for review by W3C members and
other interested parties to encourage feedback and comments,
especially with regard to how the changes affect existing
implementations.  This is the current state of an ongoing work on the
syntax and mapping process and may not yet record all of the work
in the
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#grammar">grammar section</a>
of the original document.
</p>

<p>
This is a draft document and may be updated, replaced, or obsoleted by
other documents at any time. It is inappropriate to use it as reference
material or to cite as other than "work in progress".  A list of current
W3C Recommendations and other technical documents can be found at <a
href="/TR/">http://www.w3.org/TR/</a>.
</p>

<p>Comments on this document are invited and should be sent to the
public mailing list
<a href="mailto:www-rdf-comments@w3.org">www-rdf-comments@w3.org</a>.
An archive of comments is available at
<a href="http://lists.w3.org/Archives/Public/www-rdf-comments/">http://lists.w3.org/Archives/Public/www-rdf-comments/</a>.
</p>

<div class="toc">
<h2 class="nonum">
<a id="contents" name="contents">Table of contents</a>
</h2>

<p class="toc">
1 <a href="#section-Introduction">Introduction</a><br />
2 <a href="#section-Syntax">An XML syntax for RDF</a><br />
3 <a href="#section-Data-Model">Data Model</a><br />
&#160;&#160;3.1 <a href="#section-root-node">Root Node</a><br />
&#160;&#160;3.2 <a href="#section-element-node">Element Node</a><br />
&#160;&#160;3.3 <a href="#section-end-element-node">End Element Node</a><br />
&#160;&#160;3.4 <a href="#section-attribute-node">Attribute Node</a><br />
&#160;&#160;3.5 <a href="#section-text-node">Text Node</a><br />
&#160;&#160;3.6 <a href="#section-identifier-node">Identifier Node</a><br />
&#160;&#160;3.7 <a href="#section-Infoset-Mapping">Information Set Mapping</a><br />
&#160;&#160;3.8 <a href="#section-Namespace">The RDF Namespace</a><br />
&#160;&#160;3.9 <a href="#section-Identifiers">Identifiers</a><br />
4 <a href="#section-Notation">Notation</a><br />
&#160;&#160;4.1 <a href="#section-Terminology">Terminology</a><br />
&#160;&#160;4.2 <a href="#section-Infoset-Grammar-Notation">Grammar Notation</a><br />
&#160;&#160;4.3 <a href="#section-Notation-Forms">Notation Forms</a><br />
5 <a href="#section-Infoset-Grammar">RDF/XML Grammar</a><br />
6 <a href="#section-Serialising">Serialising an RDF Graph to RDF/XML</a><br />
7 <a href="#section-Acknowledgments">Acknowledgments</a><br />
8 <a href="#section-References">References</a></p>

<h3><a id="section-Appendices-TOC" name="section-Appendices-TOC">Appendices</a></h3>

<p class="toc">
A <a href="#section-Updated-Grammar-changes">Issues affecting RDF/XML Syntax</a> (Non-Normative)<br />
&#160;&#160;A.1 <a href="#section-Doc-Issues">Document Issues / Tasks</a> (Non-Normative)<br />
&#160;&#160;A.2 <a href="#section-Open-Issues">RDF Core WG Open Issues affecting RDF/XML Syntax</a> (Non-Normative)<br />
&#160;&#160;A.3 <a href="#section-Decided-Issues">RDF Core WG Decided Issues affecting RDF/XML Syntax</a> (Non-Normative)<br />
&#160;&#160;A.4 <a href="#section-Postponed-Issues">RDF Core WG Postponed Issues affecting RDF/XML Syntax</a> (Non-Normative)<br />
B <a href="#section-Schemas">Syntax Schemas</a> (Non-Normative)<br />
&#160;&#160;B.1 <a href="#section-RELAXNG-Schema">RELAX&#160;NG Syntax Schema</a> (Non-Normative)<br />
&#160;&#160;B.2 <a href="#section-Other-Schemas">Other Syntax Schemas</a> (Non-Normative)<br />
C <a href="#section-Grammar">Original Grammar</a> (Non-Normative)<br />
D <a href="#section-Updated-Grammar">Updated Grammar after RDF Core decisions</a> (Non-Normative)<br />
E <a href="#section-Changes">Changes</a> (Non-Normative)
</p>

</div>

<hr />

<h2>
<a id="section-Introduction" name="section-Introduction">1 Introduction</a>
</h2>

<p>This document describes the
<a href="http://www.w3.org/TR/2000/REC-xml-20001006">XML</a>
(<a href="#ref-xml">[XML]</a>)
syntax for RDF as
originally defined in the
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222">RDF Model &amp; Syntax</a> (<a href="#ref-rdfms">[RDFMS]</a>) W3C
Recommendation.  Subsequent implementations of this syntax and
comparison of the resulting RDF models have shown that there was
ambiguity - implementations generated different models and certain
syntax forms were not widely implemented.  These issues were
generally made as either feedback to the
<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>)
or from discussions on the RDF Interest Group list
<a href="mailto:www-rdf-interest@w3.org">www-rdf-interest@w3.org</a>
(<a href="http://lists.w3.org/Archives/Public/www-rdf-interest/">archive</a>)
.</p>

<p>The 
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core Working Group</a>
is <a href="http://www.w3.org/2001/sw/RDFCoreWGCharter">chartered</a>
to respond to the need for a number of fixes, clarifications and
improvements to the specification of RDF's abstract model and XML
syntax.  The working group invites feedback from the developer
community on the effects of its proposals on existing implementations
and documents.</p>

<p>Several decisions including amendments and deletions to the
grammar are referred to
<a href="#section-Updated-Grammar-changes">below</a>.
The definitive record of the decisions is the
<a href="http://www.w3.org/2000/03/rdf-tracking/">RDF Core WG issues list</a>.
</p>

<p>This document re-represents the original EBNF grammar in terms of
the <a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024">XML Information Set</a>
(<a href="#ref-xml-infoset">[INFOSET]</a>) items which moves
from the rather low-level details, such as particular forms of empty
elements.  This allows the grammar to be more precisely recorded and
the mapping from the XML syntax to the RDF model more clearly shown.
The mapping to the RDF model (a graph) is done by emitting statements
in the form defined in the
<a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>
section of
<a href="http://www.w3.org/TR/2001/WD-rdf-testcases-20011115/">RDF Test Cases</a> (<a href="#ref-test-cases">[RDF-TESTS]</a>) Working Draft
which creates an RDF model, that has semantics defined by
<a href="http://www.w3.org/TR/2001/WD-rdf-mt-20010925">RDF Model Theory</a> (<a href="#ref-rdf-model">[RDF-MODEL]</a>) Working Draft.
</p>

<p>This document illustrates one way to create triples from the XML -
any other method that results in the same RDF graph may be used.</p>

<p>In particular:</p>
<ul>
<li>triples may be generated in any order</li>
<li>duplicates may be eliminated at any point</li>
<li>there is no requirement to support N-Triples in any way</li>
</ul>


<h2>
<a id="section-Syntax" name="section-Syntax">2 An XML syntax for RDF</a>
</h2>

<p>The
<a href="http://www.w3.org/TR/2001/WD-rdf-mt-20010925">RDF Model Theory</a> (<a href="#ref-rdf-model">[RDF-MODEL]</a>) provides a formal description
of RDF. This can be thought of as a graph consisting of <em>nodes</em>
and <em>arcs</em>.  The <em>node</em>
describe resources that can be labelled with URIs, string literals
or are blank. The <em>arcs</em> connect the nodes and are all
labelled with URIs.  This graph is more precisely called a directed
edge-labelled graph; each edge is an arc with a direction (an arrow)
connecting two nodes.  These edges can be described as triples of
<em>subject node</em>, at the blunt end of the arrow/arc,
<em>property arc</em> and an <em>object node</em> at the sharp end of
the arrow/arc.  The property arc is also interpreted as an attribute,
relationship or predicate of the resource with a value given by the
object node content.</p>

<p>In order to encode the graph in XML, the nodes and arcs are turned
into XML elements, attributes, element content and attribute values.
The URI labels for properties and object nodes are written in XML via
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114">XML Namespaces</a> (<a href="#ref-namespaces">[XML-NS]</a>)
which gives a namespace URI for a short prefix
along with namespace-qualified elements and attributes names
called local names.  The (namespace URI, local name) pair
are chosen such that concatenating them forms the original node URI.
The URIs labelling subject nodes are stored in XML attribute values.
The nodes labelled by string literals (which are always
object nodes) become element text content or attribute values.</p>

<p>This transformation turns paths in the graph of the form
Node, Arc, Node, Arc, Node, Arc, ...
into sequences of elements inside elements.  This
results in a <em>striping</em> when the elements are written down;
alternating between <a href="#nodeElement">node elements</a> and
<a href="#propertyElt">property elements</a>.  The Node at the
start of the sequence is always a subject node and turns into
a containing element called an <code>rdf:Description</code> that
is written at the top level of RDF/XML, below the XML document element
(in this case <code>rdf:RDF</code>).  So the chains of stripes
start at the top of an RDF/XML document and always begin with nodes.
</p>

<p>For example, here is a graph written as ASCII saying "there exists
a document (this one) with a title, RDF/XML Syntax Specification (Revised)" and
"this document has an editor, the editor has a name "Dave Beckett"
and a home page http://purl.org/net/dajobe/.
<code>[URI]</code> is used for a node with a URI,
<code>[]</code> for a blank node, and
<code>--[property]--&gt;</code> is used for an arc.</p>

<pre>
 [http://www.w3.org/TR/rdf-syntax-grammar] --[has a title]  -&gt; "RDF/XML Syntax Specification (Revised)"
                                           --[has an editor]-&gt; [] --[has a name]     -&gt; "Dave Beckett"
                                                                  --[has a home page]-&gt; [http://purl.org/net/dajobe/]
</pre>

<p>Taking one path through the graph:</p>

<pre>
 [http://www.w3.org/TR/rdf-syntax-grammar]                                                       
                                           --[has an editor]-&gt; []
                                                                  --[has a home page]-&gt; [http://purl.org/net/dajobe/]
</pre>

<p>This corresponds to the node/arc stripes:</p>

<ol>
<li>Node <code>[http://www.w3.org/TR/rdf-syntax-grammar]</code></li>
<li>Arc  <code>-[has an editor]-&gt;</code></li>
<li>Node <code>[]</code></li>
<li>Arc  <code>-[has a home page]-&gt;</code></li>
<li>Node <code>[http://purl.org/net/dajobe/]</code></li>
</ol>

<p>In RDF/XML this sequence of 5 nodes and arcs correponds to 5
XML elements:</p>
<pre>
&lt;rdf:Description&gt;
  &lt;ex:editor&gt;
    &lt;rdf:Description&gt;
      &lt;ex:homePage&gt;
        &lt;rdf:Description&gt;
        &lt;/rdf:Description&gt;
      &lt;/ex:homePage&gt;
    &lt;/rdf:Description&gt;
  &lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
</pre>

<p>Which consists of some nodes with known URIs that can be filled in
and others that remain blank:</p>
<pre>
&lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
  &lt;ex:editor&gt;
    &lt;rdf:Description&gt;
      &lt;ex:homePage&gt;
        &lt;rdf:Description rdf:about="http://purl.org/net/dajobe/"&gt;
        &lt;/rdf:Description&gt;
      &lt;/ex:homePage&gt;
    &lt;/rdf:Description&gt;
  &lt;/ex:editor&gt;
&lt;/rdf:Description&gt;
</pre>

<p>There are several abbreviations that can be used to make very
common uses more easy to write down.  It is typical for the same
resource to be described with multiple properties and values at the
same time, so multiple child elements can be put inside
<code>rdf:Description</code>, all of which are properties of that
node.</p>

<p>When the property value is a string it can be encoded more simply
as an XML attribute and value, as an attribute of the node element.
This is known as a <a href="#propertyAttr">property attribute</a>.</p>

<p>Another very common use is when a node is an instance of a class
with <code>rdf:type</code> relationship, usually called a <em>typed
node</em>.  This shorthand is done by replacing the
<code>rdf:Description</code> element name with the namespaced-element
corresponding to the URI of the value of the type relationship.</p>

<p>The above forms the basis of the RDF/XML syntax and although there
are some other abbreviated forms, such as for generating the RDF list
properties and for skipping having to write down a blank element
node, which breaks the striping but is useful for, amongst other
uses, encoding properties with multiple-values.</p>

<p>The example above filled out and completed, using some
abbreviations gives:</p>

<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:ex="http://example.org/stuff/1.0/"&gt;
  &lt;rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"&gt;
    &lt;dc:title&gt;RDF/XML Syntax Specification (Revised)&lt;/dc:title&gt;
    &lt;ex:editor rdf:parseType="Resource"&gt;
      &lt;ex:fullName&gt;Dave Beckett&lt;/ex:fullName&gt;
      &lt;ex:homePage rdf:resource="http://purl.org/net/dajobe/" /&gt;
    &lt;/ex:editor&gt;
  &lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</pre>


<p>For a longer introduction to the RDF/XML <em>striped</em> syntax
with a historical perspective, see <a href="http://www.w3.org/2001/10/stripes/">RDF: Understanding the Striped RDF/XML Syntax</a> (<a href="#ref-stripedrdf">[STRIPEDRDF]</a>).</p>

<div class="note"><p><strong>Note:</strong>
This section is still under development and the working group
is working on an RDF primer document.
</p></div>



<h2>
<a id="section-Data-Model" name="section-Data-Model">3 Data Model</a>
</h2>

<p>This syntax operates on an XML document as a sequence of nodes
in document order in the style of
<a href="#ref-xpath">[XPATH]</a>&#160;
<a href="http://www.w3.org/TR/xpath#infoset">Information Set Mapping</a>
serialised into document-order.
The resulting nodes are intended to be similar to the events that are
produced by the <a href="#ref-sax">[SAX2]</a> XML API.
This model is conceptual only and does not mandate any
implementation method; in particular <a href="#ref-xpath">[XPATH]</a>
is not required.</p>

<p>The syntax does not support non-well-formed XML documents, nor
documents that otherwise don't have an XML Information Set; for
example, that don't conform to
<a href="http://www.w3.org/TR/1999/REC-xml-names-19990114">XML Namespaces</a>
W3C Recommendation (<a href="#ref-namespaces">[XML-NS]</a>).
</p>

<p>This specification requires an information set as defined in
<a href="#ref-xml-infoset">[INFOSET]</a>
which supports at least the following information items and
properties:</p>

<dl>
<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a></dt>
<dd>[document element], [children], [base URI]</dd>

<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">Element Information Item</a></dt>
<dd>[local name], [namespace name], [children], [attributes], [parent]</dd>

<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">Attribute Information Item</a></dt>
<dd>[local name], [namespace name], [normalized value], [owner element]</dd>

<dt><a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">Character Information Item</a></dt>
<dd>[character code]</dd>

</dl>

<p>This specification does not require any destructive alterations to
the input information set; no items are added, removed or modified..</p>

<p>This section is intended to satisfy the requirements for
<a href="http://www.w3.org/TR/xml-infoset/#conformance">Conformance</a>
in the <a href="#ref-xml-infoset">[INFOSET]</a> specification.
</p>


<p>There are six types of node defined in the following subsections.
Most nodes are constructed from an Infoset information item (except
for <a href="#section-identifier-node">Identifier</a>).  The effect
of a node constructor is to create a new node with a unique identity,
distinct from all other nodes.  Nodes have properties, and all have
the <em>string-value</em> property that may be part of the node or
computed from the <em>string-value</em> of contained nodes.</p>


<h3>
<a id="section-root-node" name="section-root-node">3.1 Root Node</a>
</h3>

<p>Created from an 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a>
and takes the following properties and their values from the element
information item:
<a name="nodeterm-document-element">document-element</a>,
<a name="nodeterm-children">children</a> and
<a name="nodeterm-base-uri">base-uri</a>.
</p>

<h3>
<a id="section-element-node" name="section-element-node">3.2 Element Node</a>
</h3>

<p>Created from an 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">Element Information Item</a>
and takes the following properties and their values from the element
information item: local-name, namespace-name, children,
<a name="nodeterm-attributes">attributes</a> and parent.  When this node is created from such values, the
<a name="nodeterm-URI">URI</a> property
is defined with a string value of the concatenation of the
value of the namespace-name property and the value of the
local-name property.
On creation the <a name="nodeterm-liCounter">li-counter</a>
property is added with initial integer value 1.</p>

<p>The <a name="nodeterm-subject">subject</a>
property may be added and takes the value of an
<a href="#section-identifier-node">Identifier</a> node.
This is used on elements that deal with one node in the RDF model,
this generally being the subject of a statement.</p>



<h3>
<a id="section-end-element-node" name="section-end-element-node">3.3 End Element Node</a>
</h3>

<p>Takes no properties but marks the end of the containing element in
the sequence.</p>


<h3>
<a id="section-attribute-node" name="section-attribute-node">3.4 Attribute Node</a>
</h3>

<p>Created from an 
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">Attribute Information Item</a>
and takes the properties 
local-name, namespace-name and owner element
and their values from respective element information item properties.
When this node is created from such values, two properties and values
are defined. Firstly the
<a name="nodeterm-string-value">string-value</a> property
is defined with the normalized value as specified by
<a href="#ref-xml">[XML]</a>. An attribute whose normalized
value is a zero-length string is not treated specially: it results in
an attribute node whose string-value is a zero-length string.
Secondly the
<a href="#nodeterm-URI">URI</a> property
is defined with a string value of the concatenation of the
value of the namespace-name property and the value of the
local-name property.
</p>


<h3>
<a id="section-text-node" name="section-text-node">3.5 Text Node</a>
</h3>

<p>Created from a sequence of one or more consecutive
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">Character Information Items</a>.
Has the single property
<a href="#nodeterm-string-value">string-value</a>
which has the value of the string made from concatenating the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">character code</a> property of each of the character information items.
[NOTE: Identical to XPath.]
</p>

<h3>
<a id="section-identifier-node" name="section-identifier-node">3.6 Identifier Node</a>
</h3>

<p>A node for a typed identifier which can have the following three properties:
<a href="#nodeterm-identifier">identifier</a> and
<a name="nodeterm-identifier-type">identifier-type</a> and
<a href="#nodeterm-string-value">string-value</a>.
These nodes are created by giving two values
for the <a href="#nodeterm-identifier">identifier</a> and
<a href="#nodeterm-identifier-type">identifier-type</a> properties.
The <a name="nodeterm-identifier">identifier</a>
property takes a string value and the
<a name="nodeterm-identifierType">identifier-type</a>
property can take values "URI" or "bnodeID".</p>

<p>The <a href="#nodeterm-string-value">string-value</a> property
is defined from the other properties as follows:  If
<a href="#nodeterm-identifier-type">identifier-type</a> is "URI"
then the value is the concatenation of "&lt;",
the value of the
<a href="#nodeterm-identifier-type">identifier</a> property
and "&gt;".   If
<a href="#nodeterm-identifier-type">identifier-type</a> is "bnodeID"
then the value is the concatenation of "_:" and
the value of the <a href="#nodeterm-identifier-type">identifier</a>
property.
</p>

<p>For further information on identifiers in the RDF model, see
<a href="#section-Identifiers">section 3.9</a>.</p>


<h3>
<a id="section-Infoset-Conformance" name="section-Infoset-Conformance"></a>
<a id="section-Infoset-Mapping" name="section-Infoset-Mapping">3.7 Information Set Mapping</a>
</h3>

<p>To transform the Infoset into the sequence of nodes, each
information item is transformed as described above to generate a
tree of nodes with properties and values.  Each element node is
then replaced as described below to turn the tree of nodes
into a sequence in document order.</p>

<ol>
<li>The original <a href="#section-element-node">element node</a></li>
<li>The value of the
<a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">children</a>
property, a possibly empty ordered list of nodes.</li>
<li>An <a href="#section-end-element-node">end element node</a></li>
</ol>


<h3><a id="section-Namespace" name="section-Namespace">3.8 The RDF Namespace</a></h3>

<p>The RDF Namespace URI is
<a name="rdf-ns-uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>
and is typically used in XML with the prefix <code>rdf</code> although
this is not required.  The namespace contains the following names only:</p>
  <div class="block"><p>
  RDF Description<br />
  ID about bagID parseType resource<br />
  subject predicate object<br />
  Seq Bag Alt Statement Property<br />
  type value<br />
  li _<em>n</em><br />
  </p></div>
<p>where <em>n</em> is a non-negative integer.</p>

<p>Throughout this document the terminology rdf:<em>name</em>
will be used to indicate <em>name</em> is from the RDF namespace
and it has a URI of the concatenation of the
<a href="#rdf-ns-uri">RDF Namespace URI</a> and <em>name</em>.
For example, rdf:type has the URI 
http://www.w3.org/1999/02/22-rdf-syntax-ns#type</p>

<div class="note"><p><strong>Implementors Note:</strong>
The names aboutEach and aboutEachPrefix were removed
from the language by the RDF Core WG - see the issues
<a href="#rdfms-abouteach">rdfms-abouteach</a> and
<a href="#rdfms-abouteachprefix">rdfms-abouteachprefix</a>
for further information.
</p></div>


<h3><a id="section-Identifiers" name="section-Identifiers">3.9 Identifiers</a></h3>

<p>The RDF model uses three types of identifiers (or labels) for
nodes and arcs in the graph - absolute URI references, literals and
unlabelled or blank nodes.  The latter are given local identifiers
in the N-Triples serialisation of the model in order to represent
the graph correctly.  These identifiers can be generated and must
match the <a href="http://www.w3.org/TR/rdf-testcases/#name">name</a>
production in
<a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>.
</p>

<p>The URI references can be either given as absolute URIs, relative
URIs that have to be resolved from the document URI, or constructed.
The constructed URIs in RDF are either made from XML Namespace
qualified element or attributes names (QNames) or from the value of
rdf:ID or rdf:bagID attribute values.</p>

<p>XML QNames give URIs by concatenating the namespace URI and
the XML local name.  For example, if the XML Namespace prefix
<code>foo</code> has URI http://example.org/somewhere/ then the QName
<code>foo:bar</code> would correspond to the URI
http://example.org/somewhere/bar.  Note that this restricts which
URIs can be made and the same URI can be given in multiple ways.</p>

<p>The rdf:ID and rdf:bagID values generate URIs by considering them
as equivalent to the relative URI "#" concatenated with the attribute
value.  This can then be resolved relative to the document URI to
give the absolute URI.</p>


<h2>
<a id="section-Notation" name="section-Notation">4 Notation</a>
</h2>


<h3>
<a id="section-Terminology" name="section-Terminology">4.1 Terminology</a>
</h3>

<p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in
<a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119</a>
(<a href="#ref-keywords">[KEYWORDS]</a>).</p>


<h3>
<a id="section-Infoset-Grammar-Notation" name="section-Infoset-Grammar-Notation">4.2 Grammar Notation</a>
</h3>

<p>The following notation is used for describing the nodes and grammar EBNF.</p>

<table border="1" summary="This table describes the notation used in the following sections to describe the grammar in nodes along with the meaning of that notation.">
<caption>Notation for nodes and grammar EBNF.</caption>
<tr>
<th>Notation</th>
<th>Meaning</th>
</tr>
<tr>
<td>property=value</td>
<td>A node property with a given value</td>
</tr>
<tr>
<td><em>node</em>.<em>property</em></td>
<td>Returns the value of the given node property</td>
</tr>
<tr>
<td>root(prop1=value1,<br />
&#160;&#160;&#160;&#160;prop2=value2, ...)</td>
<td>A <a href="#section-root-node">root node</a> with properties
</td>
</tr>
<tr>
<td>start_element(prop1=value1,<br />
&#160;&#160;&#160;&#160;prop2=value2, ...)<br />
<em>children</em><br />
end_element()</td>
<td>A sequence of
<a href="#section-element-node">element node</a> with properties,
a possibly empty list of nodes as element content and an
<a href="#section-end-element-node">end element node</a>
</td>
</tr>
<tr>
<td>attribute(prop1=value1,<br />
&#160;&#160;&#160;&#160;prop2=value2, ...)</td>
<td>An <a href="#section-attribute-node">attribute node</a>
with properties</td>
</tr>
<tr>
<td>identifier(prop1=value1,<br />
&#160;&#160;&#160;&#160;prop2=value2, ...)</td>
<td>An <a href="#section-identifier-node">identifier node</a>
with properties</td>
</tr>
<tr>
<td>text()</td>
<td>A <a href="#section-text-node">text node</a></td>
</tr>
<tr>
<td>base-uri</td>
<td>The value of the <a href="#nodeterm-base-uri">base-uri</a> property of the <a href="#section-root-node">root node</a></td>
</tr>
<tr>
<td>list(item1, item2, ...); list()</td>
<td>An ordered list of items in document order; an empty list</td>
</tr>
<tr>
<td>set(item1, item2, ...); set()</td>
<td>An unordered set of items; an empty set</td>
</tr>
<tr>
<td>*</td>
<td>Zero or more of preceding term</td>
</tr>
<tr>
<td>?</td>
<td>Zero or one of preceding term</td>
</tr>
<tr>
<td>+</td>
<td>One or more of preceding term</td>
</tr>
<tr>
<td>A | B | ...</td>
<td>The A, B, ... terms are alternatives.</td>
</tr>
<tr>
<td>A - B</td>
<td>The term A but not the term B</td>
</tr>
<tr>
<td>"ABC"</td>
<td>A string of characters A, B, C in order.</td>
</tr>
<tr>
<td>concat(A, B, ..)</td>
<td>A string created by concatenating the terms in order.</td>
</tr>
<tr>
<td><a name="anyURI">anyURI</a></td>
<td>Any legal URI.</td>
</tr>
<tr>
<td><a name="anyString">anyString</a></td>
<td>Any string.</td>
</tr>
<tr>
<td>rdf:<em>X</em></td>
<td>See <a href="#section-Namespace">section 3.8</a></td>
</tr>
</table>


<h3>
<a id="section-Notation-Forms" name="section-Notation-Forms">4.3 Notation Forms</a>
</h3>

<p>The following notation forms are used to indicate</p>

<div class="productionOuter"><div class="productionInner"><p>
A grammar production over a sequence of nodes derived from the
<a href="http://www.w3.org/TR/xpath#infoset">Infoset</a>
in the notation described in section
<a href="#section-Infoset-Grammar-Notation">4.2</a>.
</p></div></div>

<p>&#160;</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt>
A sequence of lines of
<a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a> output
from a grammar production adding to an RDF model.
</tt>
</p></div></div>



<h2>
<a id="section-Infoset-Grammar" name="section-Infoset-Grammar">5 RDF/XML Grammar</a>
</h2>

<h3><a id="start" name="start">5.1 Grammar start</a></h3>

<p>If the RDF/XML is a standalone XML content, then
the grammar starts with <a href="#section-root-node">Root Node</a>&#160;
<a href="#doc">doc</a>.</p>

<p>If the content is known to be RDF/XML by context, such as when
RDF/XML is embedded inside other XML content, then the grammar
can either start 
at <a href="#section-element-node">Element Node</a>&#160;
<a href="#RDF">RDF</a>
(only when an element is legal at that point in the XML)
or at production <a href="#nodeElementList">nodeElementList</a>
(only when element content is legal, since this is a list of elements).
For such embedded RDF/XML, the <a href="#nodeterm-base-uri">base-uri</a>
value must be initialised from the containing XML since no
<a href="#section-root-node">Root Node</a>&#160; will be available.
Note that if such embedding occurs, the grammar may be entered
several times but no state is expected to be preserved.
</p>


<h3><a id="doc" name="doc">5.2 Production doc</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
root(<a href="#nodeterm-document-element">document-element</a>=<a href="#RDF">RDF</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-children">children</a>=list(<a href="#RDF">RDF</a>))
</p></div></div>


<h3><a id="RDF" name="RDF">5.3 Production RDF</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a> = rdf:RDF,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set())<br />
<a href="#nodeElementList">nodeElementList</a><br />
end_element()
</p></div></div>


<h3><a id="nodeElementList" name="nodeElementList">5.4 Production nodeElementList</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
<a href="#ws">ws</a>* (<a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>* )*
</p></div></div>


<h3><a id="nodeElement" name="nodeElement">5.5 Production nodeElement</a><a id="description" name="description"></a><a id="typedNode" name="typedNode"></a></h3>


<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set((<a href="#idAttr">idAttr</a> | <a href="#aboutAttr">aboutAttr</a> )?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end_element()
</p></div></div>

<p>The processing of some of the attributes have to be done before other
work such as dealing with children nodes or other attributes.
These can be processed in any order:</p>

<ul>

<li>If there is an attribute <em>a</em> with
 <em>a</em>.<a href="#nodeterm-URI">URI</a> = rdf:ID,
set <em>e</em>.<a href="#nodeterm-subject">subject</a> to 
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI").</li>

<li>If there is an attribute <em>a</em> with
<em>a</em>.<a href="#nodeterm-URI">URI</a> = rdf:about,
set <em>e</em>.<a href="#nodeterm-subject">subject</a> to 
identifier(<a href="#nodeterm-identifier">identifier</a>=<em>a</em>.<a href="#nodeterm-string-value">string-value</a>, <a href="#nodeterm-identifier-type">identifier-type</a>="URI").</li>

<li>If <em>e</em>.<a href="#nodeterm-subject">subject</a>
is empty, generate a local blank node identifier <em>i</em> 
and use it to create a new node <em>n</em> with the value of identifier(<a href="#nodeterm-identifier">identifier</a>=<em>i</em>, <a href="#nodeterm-identifier-type">identifier-type</a>="bnodeID"). Set <em>e</em>.<a href="#nodeterm-subject">subject</a> to be <em>n</em>.</li>

</ul>

<p>The following can then be performed in any order:</p>

<ul>

<li>Handle the
<a href="#propertyEltList">propertyEltList</a> children nodes</li>

<li>If there is an attribute <em>a</em> 
in <a href="#propertyAttr">propertyAttr</a> with
<em>a</em>.<a href="#nodeterm-URI">URI</a> = rdf:type
then the following statement is added to the model:
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>a</em>.<a href="#nodeterm-URI">URI</a>&gt; &lt;<em>a</em>.<a href="#nodeterm-string-value">string-value</a>&gt; .</tt>
</p></div></div>
</li>

<li>For each attribute <em>a</em> matching
<a href="#propertyAttr">propertyAttr</a> (and not rdf:type)
the following statement is added to the model:

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>a</em>.<a href="#nodeterm-URI">URI</a>&gt; "<em>a</em>.<a href="#nodeterm-string-value">string-value</a>" .</tt>
</p></div></div>
</li>

<li>If for element <em>e</em>,
<em>e</em>.<a href="#nodeterm-URI">URI</a> != rdf:Description
then the following statement is added to the model:

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; .</tt>
</p></div></div>
</li>

</ul>


<p>If an attribute <em>a</em> with
<em>a</em>.<a href="#nodeterm-URI">URI</a> = rdf:bagID
is present, create a new node
<em>n</em> = identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
and add the following statement to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>n</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag&gt; .</tt>
</p></div></div>

<p>Then for all statements generated above (except the immediately previous
statement) are reified with node <em>n</em> using the reification
rules in <a href="#section-Reification">section 5.26</a>.</p>

<div class="note"><p><strong>WARNING</strong>
The rules for rdf:bagID given here are known to be
incomplete in this draft and this is under consideration by the
RDF Core working group.
</p></div>



<h3><a id="ws" name="ws">5.6 Production ws</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
White space as defined by
<a href="#ref-xml">[XML]</a> definition <em>White Space</em>
Rule [3] <a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-S">S</a>
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn">Common Syntactic Constructs</a>
</p></div></div>


<h3><a id="propertyEltList" name="propertyEltList">5.7 Production propertyEltList</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
<a href="#ws">ws</a>* (<a href="#propertyElt">propertyElt</a> <a href="#ws">ws</a>* ) *
</p></div></div>


<h3><a id="propertyElt" name="propertyElt">5.8 Production propertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
<a href="#resourcePropertyElt">resourcePropertyElt</a> |
<a href="#literalPropertyElt">literalPropertyElt</a> |
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a> |
<a href="#parseTypeResourcePropertyElt">parseTypeResourcePropertyElt</a> |
<a href="#parseTypeOtherPropertyElt">parseTypeOtherPropertyElt</a> |
<a href="#emptyPropertyElt">emptyPropertyElt</a>
</p></div></div>

<p>If element <em>e</em> has <em>e</em>.<a href="#nodeterm-URI">URI</a> =
rdf:li then apply the list expansion rules on element <em>e</em>.parent in
<a href="#section-List-Expand">section 5.27</a>
to give a new URI <em>u</em> and set the value of
<em>e</em>.<a href="#nodeterm-URI">URI</a> to be <em>u</em>.</p>

<div class="note"><p><strong>Note:</strong>
It is expected that in future the number of values of the rdf:parseType
attribute will increase, and those values will probably be XML namespace-qualified names (QNames).
</p></div>


<h3><a id="resourcePropertyElt" name="resourcePropertyElt">5.9 Production resourcePropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set(<a href="#idAttr">idAttr</a>?))<br />
<a href="#ws">ws</a>* <a href="#nodeElement">nodeElement</a> <a href="#ws">ws</a>*<br />
end_element()
</p></div></div>

<p>For element <em>e</em>, and the single contained nodeElement <em>n</em>
the following statement is added to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
&#160;&#160;<tt> <em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; <em>n</em>.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> .</tt>
</p></div></div>

<p>If the rdf:ID attribute <em>a</em> is given, the above
statement is reified with
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
using the reification rules in
<a href="#section-Reification">section 5.26</a>.</p>


<h3><a id="literalPropertyElt" name="literalPropertyElt">5.10 Production literalPropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set(<a href="#idAttr">idAttr</a>?))<br />
<a href="#section-text-node">text()</a><br />
end_element()
</p></div></div>

<div class="note"><p><strong>Note:</strong>
The empty literal case is defined in production
<a href="#emptyPropertyElt">emptyPropertyElt</a>
</p></div>

<p>For element <em>e</em>, and the text node <em>t</em>
the following statement is added to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; "<em>t</em>.<a href="#nodeterm-string-value">string-value</a>" .</tt>
</p></div></div>

<p>If the rdf:ID attribute <em>a</em> is given, the above
statement is reified with
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
using the reification rules in
<a href="#section-Reification">section 5.26</a>.</p>


<h3><a id="parseTypeLiteralPropertyElt" name="parseTypeLiteralPropertyElt">5.11 Production parseTypeLiteralPropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set(<a href="#idAttr">idAttr</a>?, <a href="#parseLiteral">parseLiteral</a>))<br />
<a href="#literal">literal</a><br />
end_element()
</p></div></div>

<p>For element <em>e</em> and the literal <em>l</em>,
if <em>l</em> is empty then
the statement object value is "" and the following statement is added
to the model:
</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; "" .</tt>
</p></div></div>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test009.rdf">test009.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test009.nt">test009.nt</a>
</p></div>

<p>Otherwise, the following statement is added to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; <em>l</em>.<a href="#nodeterm-string-value">string-value</a> .</tt>
</p></div></div>

<p>If the rdf:ID attribute <em>a</em> is given, the above
statement is reified with
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
using the reification rules in
<a href="#section-Reification">section 5.26</a>.</p>

<div class="issue"><p><strong>Open Issue:</strong>
The result of a <a href="#literal">literal</a> from
rdf:parseType="Literal" content
has not yet been decided by the RDF Core WG; it is dependent on the
resolution of several open issues. One possible method would be to
serialise it into a string but that has several problems
including use of namespaces.   Another could be to use the 
<a href="http://www.w3.org/TR/xml-c14n">XML Canonicalisation W3C Recommendation</a>
but since this document is a revision of an earlier syntax, it may be
difficult to require the use of this newer standard.
</p></div>


<h3><a id="parseTypeResourcePropertyElt" name="parseTypeResourcePropertyElt">5.12 Production parseTypeResourcePropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set(<a href="#idAttr">idAttr</a>?, <a href="#parseResource">parseResource</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end_element()
</p></div></div>

<p>Generate a local blank node identifier <em>i</em> 
and use it to create a new node <em>n</em> with the value of identifier(<a href="#nodeterm-identifier">identifier</a>=<em>i</em>, <a href="#nodeterm-identifier-type">identifier-type</a>="bnodeID").</p>

<p>Add the following statement to the model:
</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; <em>n</em>.<a href="#nodeterm-string-value">string-value</a> .</tt>
</p></div></div>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test004.rdf">test004.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test004.nt">test004.nt</a>
</p></div>

<p>If the rdf:ID attribute <em>a</em> is given, the
statement above is reified with
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>a</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
using the reification rules in
<a href="#section-Reification">section 5.26</a>.</p>

<p>If the element content <em>c</em> is not an empty, then use node
<em>n</em> to create a new sequence of nodes as follows:</p>
<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=rdf:Description,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-subject">subject</a>=<em>n</em>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set())<br />
  <em>c</em><br />
end_element()
</p></div></div>

<p>Then 
process the resulting sequence using production
<a href="#nodeElementList">nodeElement</a>.</p>


<h3><a id="parseTypeOtherPropertyElt" name="parseTypeOtherPropertyElt">5.13 Production parseTypeOtherPropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set(<a href="#idAttr">idAttr</a>?, <a href="#parseOther">parseOther</a>))<br />
<a href="#propertyEltList">propertyEltList</a><br />
end_element()
</p></div></div>


<p>The processing of rdf:parseType string values other than
"Resource" or "Literal" is currently to treat the content as if it
were "Literal".  Processing MUST then continue at production
<a href="#parseTypeLiteralPropertyElt">parseTypeLiteralPropertyElt</a>.
</p>

<div class="note"><p><strong>Note:</strong>
It is RECOMMENDED, but not REQUIRED that the rdf:parseType value
is made available to user applications, possibly as
part of the literal value.  This note depends on the resolution of
some open RDF Core WG issues so may be clarified further in future drafts.
</p></div>




<h3><a id="emptyPropertyElt" name="emptyPropertyElt">5.14 Production emptyPropertyElt</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
start_element(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a>,<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-attributes">attributes</a>=set((<a href="#idAttr">idAttr</a> | <a href="#resourceAttr">resourceAttr</a>)?, <a href="#bagIdAttr">bagIdAttr</a>?, <a href="#propertyAttr">propertyAttr</a>*))<br />
end_element()
</p></div></div>

<p>Choose one of the following combinations of allowed
attributes. Note in particular that rdf:ID and rdf:resource are
alternatives, or both can be omitted and furthermore that bagID
cannot be used when there are no propertyAttr given.</p>


<ul>

<li>
<p>If there are no attributes <strong>or</strong> only the
optional rdf:ID attribute <em>i</em>
then the following statement is added to the model:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; "" .</tt>
</p></div></div>

<p>and then if <em>i</em> is given, the above statement is reified with
identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>i</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
using the reification rules in
<a href="#section-Reification">section 5.26</a>.</p>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test002.rdf">test002.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test002.nt">test002.nt</a>
</p></div>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test005.rdf">test005.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test005.nt">test005.nt</a>
</p></div>

</li>

<li>

<p>If there is an rdf:resource attribute <em>a</em> and no other
attributes then add the following statement to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; &lt;<em>a</em>.<a href="#nodeterm-string-value">string-value</a>&gt; .</tt>
</p></div></div>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test001.rdf">test001.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test001.nt">test001.nt</a>
</p></div>

</li>

<li>
  <p>If there is one or more propertyAttr; an rdf:ID attribute, an
  rdf:resource attribute or neither; and optionally an rdf:bagID attribute
  <em>b</em>, then:</p>

  <ul>
    <li>If rdf:resource attribute <em>i</em> is present, then
    set <em>r</em> to a new identifier(<a href="#nodeterm-identifier">identifier</a>=<em>i</em>.<a href="#nodeterm-string-value">string-value</a>, <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
    </li>

    <li>If rdf:ID attribute <em>i</em> set <em>r</em> to a new identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>i</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
    </li>

    <li>Otherwise,  generate a local blank node identifier <em>i</em> and
    set <em>r</em> to a new identifier(<a href="#nodeterm-identifier">identifier</a>=<em>i</em>, <a href="#nodeterm-identifier-type">identifier-type</a>="bnodeID")
    </li>
  </ul>

<p>Then add the following statement to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>e</em>.parent.<a href="#nodeterm-subject">subject</a>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>e</em>.<a href="#nodeterm-URI">URI</a>&gt; <em>r</em>.<a href="#nodeterm-string-value">string-value</a> .</tt>
</p></div></div>

<p>For all propertyAttr <em>a</em></p>
  <ul>

    <li><p>If <em>a</em>.<a href="#nodeterm-URI">URI</a> = rdf:type
    then the following statement is added to the model:</p>
    <div class="ntripleOuter"><div class="ntripleInner"><p>
    <tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>a</em>.<a href="#nodeterm-URI">URI</a>&gt; &lt;<em>a</em>.<a href="#nodeterm-string-value">string-value</a>&gt; .</tt>
    </p></div></div>
    </li>

    <li><p>Otherwise the following statement is added to the model:</p>
    <div class="ntripleOuter"><div class="ntripleInner"><p>
    <tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;<em>a</em>.<a href="#nodeterm-URI">URI</a>&gt; "<em>a</em>.<a href="#nodeterm-string-value">string-value</a>" .</tt>
    </p></div></div>
    </li>
  </ul>

<p>If <em>b</em> is given, create a new node
<em>n</em> = identifier(<a href="#nodeterm-identifier">identifier</a>=concat(<a href="#nodeterm-base-uri">base-uri</a>, "#", <em>b</em>.<a href="#nodeterm-string-value">string-value</a>), <a href="#nodeterm-identifier-type">identifier-type</a>="URI")
and add the following statement to the model:</p>

<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>n</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag&gt; .</tt>
</p></div></div>

<p>Then all statements generated from the propertyAttr attributes
are reified with node <em>n</em> using the reification rules in <a
href="#section-Reification">section 5.26</a>.</p>


<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test013.rdf">test013.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test013.nt">test013.nt</a>
</p></div>

<div class="note"><p><strong>Test:</strong>
Indicated by
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test014.rdf">test014.rdf</a>
and
<a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/test014.nt">test014.nt</a>
</p></div>

</li>


</ul>

<div class="note"><p><strong>WARNING</strong>
The use of rdf:ID given here is still under consideration by the
RDF Core working group - see the issue
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-not-id-and-resource-attr">rdfms-not-id-and-resource-attr</a>.
</p></div>

<div class="note"><p><strong>WARNING</strong>
The rules for rdf:bagID given here are known to be
incomplete in this draft and this is under consideration by the
RDF Core working group.
</p></div>


<!-- idAboutAttr one has gone; id is closest thing replacing it -->
<h3><a id="idAboutAttr" name="idAboutAttr"></a>
<a id="idAttr" name="idAttr">5.15 Production idAttr</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:ID<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>=<a href="#rdf-id">rdf-id</a>)
</p></div></div>

<p>Note that the names used as values of rdf:ID and rdf:bagID attributes
must be unique in a single RDF/XML document since they come from the
same set of names.</p>

<h3><a id="aboutAttr" name="aboutAttr">5.16 Production aboutAttr</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:about<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>=<a href="#URI-reference">URI-reference</a>)
</p></div></div>


<h3><a id="bagIdAttr" name="bagIdAttr">5.17 Production bagIdAttr</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:bagID<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>=<a href="#rdf-id">rdf-id</a>)
</p></div></div>

<p>Note that the names used as values of rdf:ID and rdf:bagID attributes
must be unique in a single RDF/XML document since they come from the
same set of names.</p>


<h3><a id="propertyAttr" name="propertyAttr">5.18 Production propertyAttr</a><a id="propAttr" name="propAttr"></a><a id="typeAttr" name="typeAttr"></a></h3>


<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a>=<a href="#anyURI">anyURI</a> - ( rdf:RDF | rdf:Description | rdf:ID | rdf:about | rdf:bagID | rdf:parseType | rdf:resource | rdf:li),<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>=<a href="#anyString">anyString</a>)
</p></div></div>


<h3><a id="resourceAttr" name="resourceAttr">5.19 Production resourceAttr</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:resource<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>=<a href="#URI-reference">URI-reference</a>)
</p></div></div>


<h3><a id="parseLiteral" name="parseLiteral">5.20 Production parseLiteral</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:parseType<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>="Literal")
</p></div></div>


<h3><a id="parseResource" name="parseResource">5.21 Production parseResource</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:parseType<br />
&#160;&#160;&#160;&#160;<a href="#nodeterm-string-value">string-value</a>="Resource")
</p></div></div>


<h3><a id="parseOther" name="parseOther">5.22 Production parseOther</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
attribute(<a href="#nodeterm-URI">URI</a> = rdf:parseType<br />
&#160;&#160;&#160;&#160;<a
href="#nodeterm-string-value">string-value</a>=<a href="#anyString">anyString</a> - ("Resource" | "Literal") )
</p></div></div>


<h3><a id="URI-reference" name="URI-reference">5.23 Production URI-reference</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
CDATA interpreted as a URI reference defined in
<a href="http://www.isi.edu/in-notes/rfc2396.txt">Uniform Resource Identifiers (URI)</a> (<a href="#ref-uri">[URIS]</a>)
BNF production URI-reference.
</p></div></div>


<h3><a id="literal" name="literal">5.24 Production literal</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
Any XML element content that is allowed according to
<a href="#ref-xml">[XML]</a> definition <em>Content of Elements</em>
Rule [43]
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-content">content</a>.
in section
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-starttags">3.1 Start-Tags, End-Tags, and Empty-Element Tags</a>
</p></div></div>


<h3><a id="rdf-id" name="rdf-id">5.25 Production rdf-id</a></h3>

<div class="productionOuter"><div class="productionInner"><p>
CDATA
matching any legal
<a href="#ref-xml">[XML]</a> token
<a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">Nmtoken</a>
</p></div></div>

<div class="note"><p><strong>ISSUE:</strong>
Should this be changed from any legal
<a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">XML Nmtoken</a>
to be the same as that for XML IDs?  In
<a href="#ref-xml">[XML]</a>
XML IDs must match
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#id">Validity constraint: ID</a>
which requires the identifiers to match the
<a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-Name">Name</a>
production - a more restricted identifier than Nmtoken.
</p></div>


<h3><a id="section-Reification" name="section-Reification">5.26 Reification Rules</a></h3>

<p>For a statement with terms <em>s</em>, <em>p</em> and <em>o</em>
corresponding to the N-Triples:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>s</em> <em>p</em> <em>o</em>  .</tt>
</p></div></div>

<p>add the following statements to the model using the given
<a href="#section-identifier-node">Identifier Node</a> <em>r</em>:</p>
<div class="ntripleOuter"><div class="ntripleInner"><p>
<tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#subject&gt; <em>s</em> .</tt><br />
<tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate&gt; <em>p</em> .</tt><br />
<tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#object&gt; <em>o</em> .</tt><br />
<tt><em>r</em>.<a href="#nodeterm-string-value">string-value</a> &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement&gt; .</tt><br />
</p></div></div>


<h3><a id="section-List-Expand" name="section-List-Expand">5.27 List Expansion Rules</a></h3>

<p>For the given element <em>e</em>, generate a new URI <em>u</em> with value
concat("http://www.w3.org/1999/02/22-rdf-syntax-ns#_",
<em>e</em>.<a href="#nodeterm-liCounter">li-counter</a>)
property, increment the value of the 
<em>e</em>.<a href="#nodeterm-liCounter">li-counter</a>
property by 1 and return <em>u</em>.</p>



<h2>
<a id="section-Serialising" name="section-Serialising">6 Serialising an RDF Graph to RDF/XML</a>
</h2>

<p>It is not possible for all graphs that can be expressed in the 
<a href="http://www.w3.org/TR/2001/WD-rdf-mt-20010925">RDF Model Theory</a> (<a href="#ref-rdf-model">[RDF-MODEL]</a>) to be encoded
in this syntax.  If you do a round trip from RDF/XML to RDF graph
and then back to RDF/XML the meaning will be the same but don't
expect the RDF/XML that comes out to be exactly the same.</p>


<p>
There are two different approaches to serialising RDF.
</p>

<p>The basic approach uses the basic RDF syntax from
<a href="#ref-rdfms">[RDFMS]</a>. In this:</p>

<ul>
<li>All blank nodes are assigned arbitrary URIs.</li>

<li>Each resource is listed in turn as the subject of a top-level
<code>rdf:Description</code> element, using an <code>rdf:about</code>
attribute.<br />
For each triple, with this resource as subject, an appropriate
property element production is used, with either string content
(possibly empty) or an <code>rdf:resource</code> attribute specifying
the object of the triple.</li>
</ul>

<p>The basic serialisation is recommended for applications in which
the output RDF/XML is to be used only in further RDF processing.
Where the intent is for the output RDF/XML file to be read by people, the
basic serialisation proves unsatisfactory.
The basic serialisation does not conform to more restricted
sub-dialects of RDF, such as RSS<a href="#ref-rss">[RSS]</a> or
CC/PP<a href="#ref-ccpp">[CC/PP]</a>.
Hence, it is not appropriate for such applications, for which dialect
specific serialisers are needed.</p>

<p>If more human readable output is needed the following factors
should be considered:</p>

<ul>

<li>There are many choices, with many RDF/XML documents corresponding
to identical RDF graphs. Individual triples can be represented in
numerous ways. High quality RDF serialisation requires that these
choices are considered by the serialising code.  Some are more
appropriate than others in an application dependent fashion.</li>

<li>The triples in the graph need to be considered in an appropriate
order.  There are many choices of order, some being more appropriate
than others in an application dependent fashion.</li>

</ul>

<p>It is not possible to use the RDF/XML serialisation for
serialising an RDF graph in which any triple has a property label
which cannot be expressed as a XML namespace-qualified name (QName).</p> 

<p>An approach to serialising RDF/XML using the full grammar in a
top-down recursive descent fashion is discussed in
<a href="#ref-unparsing">[UNPARSING]</a>.</p>



<h2 class="nonum">
<a id="section-Acknowledgments" name="section-Acknowledgments"></a>7 Acknowledgments (Informative)
</h2>

<p>The following people provided valuable contributions to the document:</p>

<ul>
  <li>Dan Brickley, W3C/ILRT</li>
  <li>Jeremy Carroll, HP Labs Bristol</li>
</ul>


<h2 class="nonum">
<a id="section-References" name="section-References"></a>8 References
</h2>

<h3>
<a id="section-Normative-References" name="section-Normative-References"></a>Normative References
</h3>

<dl>
  <dt>
  <a id="ref-rdfms" name="ref-rdfms">[RDFMS]</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>, O. Lassila and R. Swick, Editors.  World Wide Web Consortium. 22 February 1999.  This version is http://www.w3.org/TR/1999/REC-rdf-syntax-19990222.  The <a href="http://www.w3.org/TR/REC-rdf-syntax">latest version of RDF M&amp;S</a> is available at http://www.w3.org/TR/REC-rdf-syntax.
  </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>, T. Bray, J. Paoli, C.M. Sperberg-McQueen and E. Maler, Editors.  World Wide Web Consortium.  6 October 2000. This version is http://www.w3.org/TR/2000/REC-xml-20001006. <a href="http://www.w3.org/TR/REC-xml">latest version of XML</a> is available at http://www.w3.org/TR/REC-xml.
  </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>, T. Bray, D. Hollander and A. Layman, Editors.  World Wide Web Consortium.  14 January 1999.  This version is http://www.w3.org/TR/1999/REC-xml-names-19990114.  The <a href="http://www.w3.org/TR/REC-xml-names">latest version of Namespaces in XML</a> is available at http://www.w3.org/TR/REC-xml-names.
  </dd>

  <dt>
  <a id="ref-xml-infoset" name="ref-xml-infoset">[INFOSET]</a>
  </dt>
  <dd>
  <cite><a href="http://www.w3.org/TR/2001/REC-xml-infoset-20011024">XML Information Set</a></cite>, J. Cowan and R. Tobin, Editors.  World Wide Web Consortium.  24 October 2001.  This version is http://www.w3.org/TR/2001/REC-xml-infoset-20011024.  The <a href="http://www.w3.org/TR/xml-infoset">latest version of XML Information set</a> is available at http://www.w3.org/TR/xml-infoset.
  </dd>

  <dt>
  <a 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>, T. Berners-Lee, R. Fielding and L. Masinter, IETF, August 1998.  This document is http://www.isi.edu/in-notes/rfc2396.txt.
   </dd>

  <dt>
    <a name="ref-test-cases">[RDF-TESTS]</a>
  </dt>
  <dd><cite><a href="http://www.w3.org/TR/2001/WD-rdf-testcases-20011115/">RDF Test Cases</a></cite>, A. Barstow and D. Beckett, Editors.  Work in progress.  World Wide Web Consortium, 15 November 2001.  This version of the RDF Test Cases is http://www.w3.org/TR/2001/WD-rdf-testcases-20011115/.  The <a href="http://www.w3.org/TR/rdf-testcases/">latest version of the RDF Test Cases</a> is at http://www.w3.org/TR/rdf-testcases.
  </dd>

  <dt>
    <a name="ref-rdf-model">[RDF-MODEL]</a>
  </dt>
  <dd>
    <cite><a href="http://www.w3.org/TR/2001/WD-rdf-mt-20010925">RDF Model Theory</a></cite>, P. Hayes, Editor.  Work in progress.  World Wide Web Consortium,  25 September 2001.  This version of the RDF Model Theory is http://www.w3.org/TR/2001/WD-rdf-mt-20010925. The <a href="http://www.w3.org/TR/rdf-mt">latest version of the RDF Model Theory</a> is at http://www.w3.org/TR/2001/WD-rdf-mt.
  </dd>

  <dt>
    <a name="ref-keywords">[KEYWORDS]</a>
  </dt>
  <dd>
    <cite><a href="http://www.ietf.org/rfc/rfc2119.txt">RDF 2119 - Key words for use in RFCs to Indicate Requirement Levels</a></cite>, S. Bradner, IETF. March 1997.  This document is http://www.ietf.org/rfc/rfc2119.txt.
  </dd>

</dl>


<h3>
<a id="section-Informative-References" name="section-Informative-References"></a>Informational References
</h3>

<dl>

  <dt>
    <a name="ref-stripedrdf">STRIPEDRDF</a>
  </dt>
  <dd><cite><a href="http://www.w3.org/2001/10/stripes/">RDF: Understanding the Striped RDF/XML Syntax</a></cite>, D. Brickley, W3C, 2001.  This
  document is http://www.w3.org/2001/10/stripes/.
  </dd>

  <dt>
    <a name="ref-xpath">XPATH</a>
  </dt>
  <dd><cite><a href="http://www.w3.org/TR/1999/REC-xpath-19991116">XML Path Language (XPath) Version 1.0</a></cite>, J. Clark and S. DeRose, Editors.   World Wide Web Consortium, 16 November 1999.  This version of XPath is http://www.w3.org/TR/1999/REC-xpath-19991116.  The <a href="http://www.w3.org/TR/xpath">latest version of XPath</a> is at http://www.w3.org/TR/xpath.
</dd>

  <dt>
    <a name="ref-sax">SAX2</a>
  </dt>
  <dd><cite><a href="http://sax.sourceforge.net/">SAX Simple API for XML, version 2</a></cite>, D. Megginson, SourceForge, 5 May 2000.  This document is http://sax.sourceforge.net/.</dd>

  <dt>
    <a 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>, G. Beged-Dov, D. Brickley, R. Dornfest, I. Davis, L. Dodds, J. Eisenzopf, D. Galbraith, R.V. Guha, K. MacLeod, E. Miller, A. Swartz, E. van der Vlist,  2000.  This document is http://purl.org/rss/1.0/spec.
  </dd>

  <dt>
    <a name="ref-ccpp">CC/PP</a>
  </dt>
  <dd><cite><a href="http://www.w3.org/TR/2001/WD-CCPP-struct-vocab-20010315/">Composite Capability/Preference Profiles (CC/PP): Structure and Vocabularies</a></cite>, G. Klyne, F. Reynolds, C. Woodrow, H. Ohto,  World Wide Web Consortium Working Draft, 15 March 2001. This version is http://www.w3.org/TR/2001/WD-CCPP-struct-vocab-20010315/.  The <a href="http://www.w3.org/TR/CCPP-struct-vocab">latest version of CC/PP structure and Vocabularies</a> is available at http://www.w3.org/TR/CCPP-struct-vocab.
  </dd>

  <dt>
    <a name="ref-unparsing">UNPARSING</a>
  </dt>
  <dd><cite>Unparsing RDF/XML</cite>, J. J. Carroll, HP Labs Technical Report, HPL-2001-294, 2001
  </dd>

  <dt>
    <a name="ref-relaxng">RELAXNG</a>
  </dt>
  <dd><cite><a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">RELAX NG Specification</a></cite>, James Clark and MURATA Makoto, editors, OASIS, 3 December 2001.  This version of RELAX&#160;NG is http://www.oasis-open.org/committees/relax-ng/spec-20011203.html.  The <a href="http://relaxng.org/">latest</a> is at http://relaxng.org/.</dd>

  <dt>
    <a name="ref-relaxng-nx">RELAXNG-NX</a>
  </dt>
  <dd><cite><a href="http://www.thaiopensource.com/relaxng/nonxml/">RELAX NG Non-XML Syntax</a></cite>, James Clark, 3 December 2001.  This document is http://www.thaiopensource.com/relaxng/nonxml/.</dd>

  <dt>
    <a name="ref-xmlschema0">XML Schema Part 0: Primer</a>
  </dt>
  <dd>
  <cite><a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0: Primer - W3C Recommendation</a></cite>, World Wide Web Consortium, 2 May 2001.
  </dd>

  <dt>
    <a name="ref-xmlschema1">XML Schema Part 1: Structures</a>
  </dt>
  <dd>
  <cite><a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures - W3C Recommendation</a></cite>, World Wide Web Consortium, 2 May 2001.
  </dd>

  <dt>
    <a name="ref-xmlschema2">XML Schema Part 2: Datatypes</a>
  </dt>
  <dd>
  <cite><a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes - W3C Recommendation</a></cite>, World Wide Web Consortium, 2 May 2001.
  </dd>

  <dt>
    <a name="ref-schematron">Schematron</a>
  </dt>
  <dd><cite><a href="http://xml.ascc.net/xml/resource/schematron/schematron.html">Schematron</a></cite>, Rick Jelliffe, Academia Sinica Computing Centre, Taibei.
  </dd>

</dl>


<hr />

<h2>
<a id="section-Updated-Grammar-changes" name="section-Updated-Grammar-changes">Appendix A: Issues affecting RDF/XML Syntax (Non-Normative)</a>
</h2>

<p>This section records local issues to be resolved
and issues that were reported to the RDF Core WG
related to the XML syntax and their disposition.  This section is not
the definitive list or description of the latter - see the
<a href="http://www.w3.org/2000/03/rdf-tracking/">RDF Core WG issues list</a>.
Decided issues may also have associated test cases which can be
found in the <a href="#ref-test-cases">RDF Test Cases</a>
W3C Working Draft.
</p>


<h3>
<a id="section-Doc-Issues" name="section-Doc-Issues">A.1: Document Issues / Tasks (Non-Normative)</a>
</h3>


<dl>

<dt><a name="task-striping">task-striping</a><br /></dt>
<dd>
<p><em>Add more an introductory section on how the syntax works including
examples (graph, XML elements) based on
the descriptive version in Dan Brickley's
<a href="http://www.w3.org/2001/10/stripes/">RDF: Understanding the Striped RDF/XML Syntax</a></em></p>
</dd>

<dt><a name="task-bagid">task-bagid</a><br /></dt>
<dd>
<p><em>rdf:bagID specification is incomplete and wrong.</em></p>
</dd>

</dl>


<h3>
<a id="section-Open-Issues" name="section-Open-Issues">A.2: RDF Core WG Open Issues affecting RDF/XML Syntax (Non-Normative)</a>
</h3>

<p>The resolution texts here are suggestions only and not agreed by
the working group.</p>

<dl>

<dt><a name="rdfms-nested-bagIDs"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-nested-bagIDs">rdfms-nested-bagIDs</a><br /></dt>
<dd>
<p><em>What triples are generated for nested description elements with bagIDs?</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Nested description elements with bagIDs generate the same triples as
top-level description elements with bagIDs. Specifically triples
generated as a result of the parent propertyElt element do not get
reified and included in the bag.
</span></p>
</dd>


<dt><a name="rdfms-replace-value"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-replace-value">rdfms-replace-value</a><br /></dt>
<dd>

<p><em>Suggestion that the rdf:value property be replaced by rdf:toString.</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
This will not be changed in the syntax but the usage of the rdf:value
property will be described in the RDF primer and/or Model Theory.
</span></p>
</dd>


<dt><a name="rdfms-xml-literal-namespaces"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-xml-literal-namespaces">rdfms-xml-literal-namespaces</a><br /></dt>
<dd>
<p><em>How should a parser process namespaces in a literal which is XML markup?</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
?
</span></p>
</dd>


<dt><a name="rdfms-qname-uri-mapping"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-qname-uri-mapping">rdfms-qname-uri-mapping</a><br /></dt>
<dd>
<p><em>The mapping of QNames to URI's generates incorrect URI's.</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
The algorithm to generate URIs for RDF concepts cannot be changed in
the current syntax without breaking existing applications.
To address the specific example in the issue of XML Schemas, RDF
applications can use the namespace URI
<em>http://www.w3.org/2000/10/XMLSchema#</em> in RDF/XML to generate
the correct XML Schema concept URIs for properties and classes etc.
This approach has been successfully with the 
<a href="http://www.daml.org/2001/03/model-theoretic-semantics.html">DAML+OIL</a>
using RDF, RDFS and DAML terms along with XML schema data types.
</span></p>
</dd>


<dt><a name="rdfms-validating-embedded-rdf"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-validating-embedded-rdf">rdfms-validating-embedded-rdf</a><br /></dt>
<dd>

<p><em>RDF embedded in XHTML and other XML documents is hard to validate</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Will not be addressed in the current RDF/XML syntax since it
is likely to require changes that would not be backwards compatible.
Some help with validation can be found with the schemas for XML validation
in <a href="#section-Schemas">Appendix D</a>.
</span></p>
</dd>


<dt><a name="rdfms-xml-base"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-xml-base">rdfms-xml-base</a><br /></dt>
<dd>
<p><em>How does xml-base affect RDF</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
?
</span></p>
</dd>

<dt><a name="mime-types-for-rdf-docs"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#mime-types-for-rdf-docs">mime-types-for-rdf-docs</a><br /></dt>
<dd>
<p><em>What mime type should RDF Schema and other RDF documents have?</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
This document [will] defines the syntax for
Internet Media Type (or MIME Type) for application/rdf+xml
and the registration of this type will be done when this document
is stable.  NOTE: This is an unregistered type at this time and should
not be used in applications.  See also the
<a href="http://blogspace.com/rdf/mimetype">Draft for RDF Media Type
registration</a> by Aaron Swartz.
</span></p>
</dd>


<dt><a name="rdfms-reification-required"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-reification-required">rdfms-reification-required</a><br /></dt>
<dd>
<p><em>MUST a parser created bags of reified statements for all Description elements?</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
No, only those which are explicitly reified using an rdf:ID on a
propertyElt or by an rdf:bagID on the description.
</span></p>
</dd>


<dt><a name="rdfms-not-id-and-resource-attr"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-not-id-and-resource-attr">rdfms-not-id-and-resource-attr</a><br /></dt>
<dd>
<p><em>The propertyElt production 6.12 of the grammar does not allow both an ID attribute and a resource attribute to be specified.</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Action: The grammar has[will be] been modified to forbid the use
of an rdf:ID attribute on an empty property element. This is
consistent with using rdf:ID="attr" as an abbreviation for
rdf:about="#attr" and removes the suggestion that it reifys a
statement, which it never did in the original grammar form.
</span></p>
</dd>


<dt><a name="rdfms-difference-between-ID-and-about"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-difference-between-ID-and-about">rdfms-difference-between-ID-and-about</a><br /></dt>
<dd>
<p><em>What is the difference between using and ID attribute to 'create' a new resource and an about attribute to refer to it?</em></p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
rdf:ID="attr" is an abbreviation for rdf:about="#attr" and
the handling of rdf:ID has been[will be] updated to show this.
</span></p>
</dd>

</dl>


<h3>
<a id="section-Decided-Issues" name="section-Decided-Issues">A.3: RDF Core WG Decided Issues affecting RDF/XML Syntax (Non-Normative)</a>
</h3>


<dl>
<dt><a name="rdf-ns-prefix-confusion"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdf-ns-prefix-confusion">rdf-ns-prefix-confusion</a><br /></dt>
<dd>
<p>On 25th May 2001, the WG decided that ALL attributes must be namespace qualified. There is a <a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001May/0278.html">description</a> of the decision, including detail on the grammar productions affected and a collection of <a href="http://ilrt.org/people/cmdjb/2001/05/rdf-ns-prefix-confusion/">test cases</a></p>
<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Removal of original grammar productions 6.6, 6.7, 6.8, 6.9, 6.11, 6.18, 6.32, 6.33</span></p>
</dd>


<dt><a name="rdfms-abouteachprefix"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteachprefix">rdfms-abouteachprefix</a><br /></dt>
<dd>
<p>On 1st June 2001, the WG <a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jun/0008.html">decided</a> that aboutEachPrefix would be
removed from the RDF Model and Syntax Recommendation on the grounds
that there is a lack of implementation experience, and it therefore
should not be in the recommendation. A future version of RDF may
consider support for this feature.</p>
<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Removal of original grammar production 6.8</span></p>
</dd>


<dt><a name="rdf-containers-syntax-ambiguity"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdf-containers-syntax-ambiguity">rdf-containers-syntax-ambiguity</a><br />
<a name="containers-syntax-vs-schema"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdf-containers-syntax-vs-schema">rdf-containers-syntax-vs-schema</a><br /></dt>
<dd>
<p>On 29th June 2001, the WG <a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jul/0000.html">decided</a> that containers will match the typed node production in the grammar (production 6.13) and that the container specific productions (productions 6.25 to 6.31) and any references to them be removed from the grammar. rdf:li elements will be translated to rdf:_nnn elements when they are found matching either a propertyElt (production 6.12) or a a typedNode (production 6.13).  The decision includes a set of <a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdf-containers-syntax-vs-schema/">test cases</a>.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Removal of original grammar productions 6.25, 6.26, 6.27, 6.28, 6.29, 6.30, 6.31</span></p>
</dd>


<dt><a name="rdfms-empty-property-elements"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-empty-property-elements">rdfms-empty-property-elements</a><br /></dt>
<dd>
<p>On 8th June 2001 the WG <a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jun/0109.html">decided</a> how empty property elements should be interpreted. The decision is fully represented by the <a href="http://www.w3.org/2000/10/rdf-tests/rdfcore/rdfms-empty-property-elements/">test cases</a>.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Inserted pointers to the the test cases into the grammar at the
places where empty property elements are recognised.</span></p>
</dd>


<dt><a name="rdfms-aboutEach-on-object"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-aboutEach-on-object">rdfms-aboutEach-on-object</a><br /></dt>
<dd>

<p>On 29th June 2001, the WG <a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Jul/0000.html">decided</a> that rdf:aboutEach attributes
are not allowed on an rdf:Description (or typed node) element which
is the object of a statement.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None needed - rdf:aboutEach <a href="#rdfms-abouteach">removed</a> from the language on 7th December 2001.
</span></p>
</dd>

<dt><a name="rdfms-syntax-desc-clarity"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-syntax-desc-clarity">rdfms-syntax-desc-clarity</a><br /></dt>
<dd>
<p><em>The language describing the syntax is unclear</em> [in section 6]</p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue is closed by the new approach
to defining the syntax in this document.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
A main goal of this document is to make the syntax clearer and
more precise.  In particular
the <a href="#section-Infoset-Grammar">grammar section</a> and the
<a href="#section-Schemas">pointers to schemas for XML validation</a>
help address this.
</span></p>
</dd>

<dt><a name="rdfms-formal-grammar"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-formal-grammar">rdfms-formal-grammar</a><br /></dt>
<dd>

<p><em>A formal grammar for RDF.</em></p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue is closed by the new approach
to defining the syntax in this document.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
A main goal of this document is to make the syntax clearer and
more precise.  In particular
the <a href="#section-Infoset-Grammar">grammar section</a> and the
<a href="#section-Schemas">pointers to schemas for XML validation</a>
help address this.
</span></p>
</dd>


<dt><a name="rdfms-rdf-names-use"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-rdf-names-use">rdfms-rdf-names-use</a><br /></dt>
<dd>
<p>On 30th November 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Nov/0651.html">decided</a> that this issue was closed by the following resolution.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
The use of rdf:RDF, rdf:ID, rdf:about, rdf:resource, rdf:bagID,
rdf:parseType, rdf:aboutEach and rdf:li except as reserved names as
specified in the grammar is an error.  [Later rdf:aboutEach was
<a href="#rdfms-abouteach">removed</a> from the language on 7th December 2001]
</span></p>
</dd>


<dt><a name="rdfms-abouteach"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteach">rdfms-abouteach</a><br /></dt>
<dd>
<p><em>processing rdf:aboutEach requires a processing of sub-property relations.</em></p>

<p>On 7th December 2001, the WG 
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Dec/0020.html">decided</a>
to remove rdf:aboutEach from the language on the grounds
it is not widely used, it is not widely implemented correctly,
it has confusing interactions with bagID as recorded in
<a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-abouteach">rdfms-abouteach</a>, it does not scale as parsers have to save state,
this is the wrong layer in which to implement such functionality.
<!-- FIXME -->
(Note: This is an unofficial record of the resolution since at
publication date, the issue list has not been updated to record it.)
</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
Removed from the grammar.
</span></p>
</dd>


<dt><a name="rdfms-propElt-id-with-dr"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-propElt-id-with-dr">rdfms-propElt-id-with-dr</a><br /></dt>
<dd>

<p>On 7th December 2001, the WG 
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Dec/0020.html">decided</a>
to remove rdf:aboutEach from the language and consequently
this issue was closed.
</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None needed.
</span></p>

</dd>

</dl>


<h3>
<a id="section-Postponed-Issues" name="section-Postponed-Issues">A.4: RDF Core WG Postponed Issues affecting RDF/XML Syntax (Non-Normative)</a>
</h3>

<dl>

<dt><a name="rdfms-quoting"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-quoting">rdfms-quoting</a><br /></dt>
<dd>

<p><em>The syntax needs a more convenient way to express the
reification of a statement.</em></p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue was postponed for consideration by
a future working group.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None required.
</span></p>
</dd>

<dt><a name="rdfms-qnames-cant-represent-all-uris"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-qnames-cant-represent-all-uris">rdfms-qnames-cant-represent-all-uris</a><br /></dt>
<dd>
<p><em>The RDF XML syntax cannot represent all possible Property URI's.</em></p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue was postponed for consideration by
a future working group.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None required.
</span></p>
</dd>

<dt><a name="rdfms-qnames-as-attrib-values"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-qnames-as-attrib-values">rdfms-qnames-as-attrib-values</a><br /></dt>
<dd>
<p><em>Suggestion that Qnames should be allowed as values for attributes such as rdf:about.</em></p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue was postponed for consideration by
a future working group.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None required.
</span></p>
</dd>

<dt><a name="rdfms-syntax-incomplete"></a><a href="http://www.w3.org/2000/03/rdf-tracking/#rdfms-syntax-incomplete">rdfms-syntax-incomplete</a><br /></dt>
<dd>
<p><em>The RDF/XML syntax can't represent an an arbritary graph structure.</em></p>

<p>On 26th October 2001, the WG
<a href="http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Oct/0581.html">decided</a> that this issue was postponed for consideration by
a future working group.</p>

<p><span class="actionLabel">Action</span>: <span class="actionDecision">
None required.
</span></p>

</dd>



</dl>




<h2>
<a id="section-Schemas" name="section-Schemas"></a>B Syntax Schemas (Non-Normative)
</h2>

<p>Two schema language authors submitted schemas for RDF/XML based on
the revised grammar in the previous version of this draft.  We
include pointers to these schemas for information purposes and an
example schema; they are not part of this specification.</p>


<h3>
<a id="section-RELAXNG-Schema" name="section-RELAXNG-Schema"></a>B.1
RELAX&#160;NG Schema - Non XML (Non-Normative)
</h3>

<p>This is an example schema in RELAX&#160;NG's 
non-XML format (for ease of reading)
but applications should use the <a href="rdfxml.xml">standard XML version</a>.
These formats are described in
<a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">RELAX&#160;NG</a> (<a href="#ref-relaxng">[RELAXNG]</a>)
and <a href="http://www.thaiopensource.com/relaxng/nonxml/">RELAX&#160;NG
Non-XML Syntax</a> (<a href="#ref-relaxng-nx">[RELAXNG-NX]</a>).</p>

<div class="exampleOuter">
<div style="align:center"><a href="rdfxml.rng">RELAX NG Schema (Non-XML) for RDF/XML</a></div>

<div class="exampleInner">
<pre>
#
# RELAX NG Schema (non-XML) for RDF/XML Syntax
#
# This schema is for information only and NON-NORMATIVE
#
# It is based on one originally written by James Clark in
# http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0248.html
# and updated with later changes.
#

namespace local = ""
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"

start = doc
doc = 
  RDF

RDF =
  element rdf:RDF { nodeElementList }

nodeElementList = 
  nodeElement*

  # Should be something like:
  #  ws* , (  nodeElement , ws* )*
  # but RELAXNG does this by default, ignoring whitespace separating tags.

nodeElement =
  element * - (local:*
               |rdf:RDF
	       |rdf:ID|rdf:about
	       |rdf:bagID|rdf:parseType|rdf:resource
               |rdf:li ) {
      (idAttr | aboutAttr )?, bagIdAttr?, propertyAttr*, propertyEltList
  }

  # FIXME: Not sure if it is possible to say "and not things
  # beginning with _ in the rdf: namespace".

ws = 
  " "

  # Not used in this RELAX NG schema; but should be any legal XML
  # whitespace defined by http://www.w3.org/TR/2000/REC-xml-20001006#NT-S


propertyEltList = 
  propertyElt*

  # Should be something like:
  #  ws* , ( propertyElt , ws* )*
  # but RELAXNG does this by default, ignoring whitespace separating tags.

propertyElt = 
  resourcePropertyElt | 
  literalPropertyElt | 
  parseTypeLiteralPropertyElt |
  parseTypeResourcePropertyElt |
  parseTypeOtherPropertyElt |
  emptyPropertyElt

resourcePropertyElt = 
  element * - (local:*
	       |rdf:RDF|rdf:Description
	       |rdf:ID|rdf:about
	       |rdf:bagID|rdf:parseType|rdf:resource) {
      idAttr?, nodeElement
  }

literalPropertyElt =
  element * - (local:*
               |rdf:RDF|rdf:Description
	       |rdf:ID|rdf:about
	       |rdf:bagID|rdf:parseType|rdf:resource) {
      idAttr?, text 
  }

parseTypeLiteralPropertyElt = 
  element * - (local:*
               |rdf:RDF|rdf:Description
               |rdf:ID|rdf:about
               |rdf:bagID|rdf:parseType|rdf:resource) {
      idAttr?, parseLiteral, literal 
  }

parseTypeResourcePropertyElt = 
  element * - (local:*
               |rdf:RDF|rdf:Description
               |rdf:ID|rdf:about
               |rdf:bagID|rdf:parseType|rdf:resource) {
      idAttr?, parseResource, propertyEltList
  }

parseTypeOtherPropertyElt = 
  element * - (local:*
               |rdf:RDF|rdf:Description
               |rdf:ID|rdf:about
               |rdf:bagID|rdf:parseType|rdf:resource) {
      idAttr?, parseOther, any
  }

emptyPropertyElt =
   element * - (local:*
                |rdf:RDF|rdf:Description
                |rdf:ID|rdf:about
		|rdf:bagID|rdf:parseType|rdf:resource) {
       (idAttr | resourceAttr)?, bagIdAttr?, propertyAttr* 
   }

idAttr = 
  attribute rdf:ID { 
      IDsymbol 
  }

aboutAttr = 
  attribute rdf:about { 
      URI-reference 
  }

bagIdAttr = 
  attribute rdf:bagID {
      IDsymbol
  }

propertyAttr = 
  attribute * - (local:* 
                 |rdf:RDF|rdf:Description
                 |rdf:ID|rdf:about
		 |rdf:bagID|rdf:parseType|rdf:resource
		 |rdf:li) {
      string
  }

resourceAttr = 
  attribute rdf:resource {
      URI-reference 
  }

parseLiteral = 
  attribute rdf:parseType {
      "Literal" 
  }

parseResource = 
  attribute rdf:parseType {
      "Resource" 
  }

parseOther = 
  attribute rdf:parseType {
      text
  }

URI-reference = 
  string

literal =
  any

IDsymbol = 
  xsd:NMTOKEN

any =
  mixed { element * { attribute * { text }*, any }* }
</pre>
</div>
</div>


<h3>
<a id="section-Other-Schemas" name="section-Other-Schemas"></a>B.2 Other Syntax Schemas (Non-Normative)
</h3>

<p>Two schema language authors submitted schemas for RDF/XML based on
the new grammar in the previous version of this draft.  We include
pointers to these schemas for information purposes; they are not part
of this specification.</p>

<ul>
<li><a href="http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0248.html">Non-XML Relax&#160;NG</a> schema by James Clark - see <a href="#ref-relaxng">[RELAXNG]</a> and <a href="#section-RELAXNG-Schema">section B.1</a></li>
<li><a href="http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0237.html">Schematron</a> schema by Rick Jellife - see <a href="#ref-schematron">[Schematron]</a></li>
<li><a href="http://ilrt.org/discovery/2001/09/rdf-xml-schema/">XML Schema</a>
by the editor of this spec (not working yet) - see <a href="#ref-xmlschema0">[XML Schema Part 0: Primer]</a>, <a href="#ref-xmlschema1">[XML Schema Part 1: Structures]</a> and <a href="#ref-xmlschema2">[XML Schema Part 2: Datatypes]</a>.</li>
</ul>

<h2>
<a id="section-Grammar" name="section-Grammar">C Original Grammar</a>
</h2>

<p>This section contains the EBNF grammar of the RDF/XML syntax
from <a href="#ref-rdfms">RDF Model &amp; Syntax</a>
<a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#grammar">Formal Grammar for RDF section</a>.  The only changes made here were to
make it legal XHTML via
<a href="http://www.w3.org/People/Raggett/tidy/">tidy</a>
and to change the links to the productions to point to those in
the original document.
</p>

<pre>
  [6.1] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#RDF">RDF</a>            ::= ['&lt;<em>rdf</em>:RDF&gt;'] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a>* ['&lt;/<em>rdf</em>:RDF&gt;']
  [6.2] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a>            ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#container">container</a>
  [6.3] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a>    ::= '&lt;<em>rdf</em>:Description' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* '/&gt;'
                         | '&lt;<em>rdf</em>:Description' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* '&gt;'
                                <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* '&lt;/<em>rdf</em>:Description&gt;'
                         | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typedNode">typedNode</a>
  [6.4] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#container">container</a>      ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#sequence">sequence</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bag">bag</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#alternative">alternative</a>
  [6.5] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>    ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutAttr">aboutAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutEachAttr">aboutEachAttr</a>
  [6.6] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>         ::= ' ID="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a> '"'
  [6.7] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutAttr">aboutAttr</a>      ::= ' about="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> '"'
  [6.8] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutEachAttr">aboutEachAttr</a>  ::= ' aboutEach="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> '"'
                         | ' aboutEachPrefix="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> '"'
  [6.9] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>      ::= ' bagID="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a> '"'
 [6.10] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>       ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeAttr">typeAttr</a>
                         | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> '="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> '"' (with embedded quotes escaped)
 [6.11] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeAttr">typeAttr</a>       ::= ' type="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> '"'
 [6.12] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>    ::= '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a> '&lt;/' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> '&gt;'
                         | '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a> '&gt;'
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a> '&lt;/' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> '&gt;'
                         | '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a> '&gt;'
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* '&lt;/' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> '&gt;'
                         | '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idRefAttr">idRefAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* '/&gt;'
 [6.13] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typedNode">typedNode</a>      ::= '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* '/&gt;'
                         | '&lt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* '&gt;'
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* '&lt;/' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> '&gt;'
 [6.14] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a>       ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a>
 [6.15] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a>       ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a>
 [6.16] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idRefAttr">idRefAttr</a>      ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a>
 [6.17] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a>          ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a>
 [6.18] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a>   ::= ' resource="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> '"'
 [6.19] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a>          ::= [ <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#NSprefix">NSprefix</a> ':' ] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#name">name</a>
 [6.20] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a>  ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a>, interpreted per [<a href="http://www.isi.edu/in-notes/rfc2396.txt">URI</a>]
 [6.21] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a>       ::= (any legal <a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">XML name symbol</a>)
 [6.22] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#name">name</a>           ::= (any legal <a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">XML name symbol</a>)
 [6.23] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#NSprefix">NSprefix</a>       ::= (any legal XML namespace prefix)
 [6.24] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a>         ::= (any XML text, with "&lt;", "&gt;", and "&amp;" escaped)
 [6.25] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#sequence">sequence</a>       ::= '&lt;<em>rdf</em>:Seq' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>* '&lt;/<em>rdf</em>:Seq&gt;'
                         | '&lt;<em>rdf</em>:Seq' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>* '/&gt;'
 [6.26] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bag">bag</a>            ::= '&lt;<em>rdf</em>:Bag' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>* '&lt;/<em>rdf</em>:Bag&gt;'
                         | '&lt;<em>rdf</em>:Bag' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>* '/&gt;'
 [6.27] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#alternative">alternative</a>    ::= '&lt;<em>rdf</em>:Alt' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>+ '&lt;/<em>rdf</em>:Alt&gt;'
                         | '&lt;<em>rdf</em>:Alt' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>? '/&gt;'
 [6.28] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>         ::= <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#referencedItem">referencedItem</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#inlineItem">inlineItem</a>
 [6.29] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#referencedItem">referencedItem</a> ::= '&lt;<em>rdf</em>:li' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a> '/&gt;'
 [6.30] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#inlineItem">inlineItem</a>     ::= '&lt;<em>rdf</em>:li' '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a> &lt;/<em>rdf</em>:li&gt;'
                         | '&lt;<em>rdf</em>:li' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a> '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a> &lt;/<em>rdf</em>:li&gt;'
                         | '&lt;<em>rdf</em>:li' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a> '&gt;' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* &lt;/<em>rdf</em>:li&gt;'
 [6.31] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>     ::= ' <em>rdf</em>:_<em>n</em>="' <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> '"' (where <em>n</em> is an integer)
 [6.32] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a>   ::= ' parseType="Literal"'
 [6.33] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a>  ::= ' parseType="Resource"'
 [6.34] <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a>        ::= (any well-formed XML)
</pre>

<p>(Note: there are EBNF bugs in the 6.30 production where the
<tt>&lt;/rdf:li&gt;</tt> tags are not fully enclosed in quotes as
<tt>'&lt;/rdf:li&gt;'</tt>)</p>


<h2>
<a id="section-Updated-Grammar" name="section-Updated-Grammar">D Updated Grammar after RDF Core decisions</a>
<a id="section-Updated-Grammar-grammar" name="section-Updated-Grammar-grammar"></a>
</h2>

<p>This section updates the original grammar in
<a href="#section-Grammar">Appendix C</a>
by amending and deleting various productions according to
the recorded
<a href="http://www.w3.org/2001/sw/RDFCore/">RDF Core WG</a> decisions.
Some productions are also removed since they are no longer needed,
once the above changes are made.</p>

<p>Key:<br /><span class="added"><ins>This text should be added  If it is not, your
browser will not display this section properly.</ins></span><br />
<span class="removed"><del>This text should be deleted.  If it is not, your
browser will not display this section properly.</del></span></p>



<table border="1" width="100%" summary="This table contains the updated grammar production name, number and definitions">
<caption>Updated RDF/XML grammar productions</caption>
<tr>
<th>Production<br />Number</th>
<th>Production<br />Name</th>
<th>Definition</th>
</tr>
<tr>
<td>6.1</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#RDF">RDF</a></td>
<td>"&lt;<em>rdf</em>:RDF&gt;" <span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a></del></span>&#160;<span class="added"><ins><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a></ins></span>* "&lt;/<em>rdf</em>:RDF&gt;"<br />
| <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a></td>
</tr>
<tr>
<td><span class="removed"><del>6.2</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a></del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#container">container</a></del></span></td>
</tr>
<tr>
<td>6.3</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a></td>
<td>"&lt;<em>rdf</em>:Description" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* "/&gt;"<br />
                         | "&lt;<em>rdf</em>:Description" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* "&gt;"<br />
                                <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* "&lt;/<em>rdf</em>:Description&gt;"<br />
                         | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typedNode">typedNode</a></td>
</tr>
<tr>
<td><span class="removed"><del>6.4</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#container">container</a></del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#sequence">sequence</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bag">bag</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#alternative">alternative</a></del></span></td>
</tr>
<tr>
<td>6.5</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutAttr">aboutAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutEachAttr">aboutEachAttr</a></td>
</tr>
<tr>
<td>6.6</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>ID=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a> "\""</td>
</tr>
<tr>
<td>6.7</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutAttr">aboutAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>about=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> "\""</td>
</tr>
<tr>
<td>6.8</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#aboutEachAttr">aboutEachAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>aboutEach=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> "\""<br />
                         <span class="removed"><del>| " aboutEachPrefix=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> "\""</del></span></td>
</tr>
<tr>
<td>6.9</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>bagID=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a> "\""</td>
</tr>
<tr>
<td>6.10</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeAttr">typeAttr</a><br />
                         | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> "=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> "\"" (with embedded quotes escaped)</td>
</tr>
<tr>
<td>6.11</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeAttr">typeAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>type=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> "\""</td>
</tr>
<tr>
<td>6.12</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a></td>
<td>"&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a> "&lt;/" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> "&gt;"<br />
                         | "&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a> "&gt;"<br />
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a> "&lt;/" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> "&gt;"<br />
                         | "&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a> "&gt;"<br />
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* "&lt;/" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> "&gt;"<br />
                         | "&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idRefAttr">idRefAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* "/&gt;"</td>
</tr>
<tr>
<td>6.13</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typedNode">typedNode</a></td>
<td>"&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* "/&gt;"<br />
                         | "&lt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAboutAttr">idAboutAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bagIdAttr">bagIdAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propAttr">propAttr</a>* "&gt;"<br />
                               <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* "&lt;/" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a> "&gt;"</td>
</tr>
<tr>
<td>6.14</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propName">propName</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a></td>
</tr>
<tr>
<td>6.15</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#typeName">typeName</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a></td>
</tr>
<tr>
<td>6.16</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idRefAttr">idRefAttr</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a></td>
</tr>
<tr>
<td>6.17</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#obj">obj</a></del></span>&#160;<span class="added"><ins><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#description">description</a></ins></span> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a></td>
</tr>
<tr>
<td>6.18</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>resource=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a> "\""</td>
</tr>
<tr>
<td>6.19</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#Qname">Qname</a></td>
<td><span class="removed"><del>[</del></span> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#NSprefix">NSprefix</a> ":" <span class="removed"><del>]</del></span> <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#name">name</a></td>
</tr>
<tr>
<td>6.20</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#URI-reference">URI-reference</a></td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a>, interpreted per [<a href="http://www.isi.edu/in-notes/rfc2396.txt">URI</a>]</td>
</tr>
<tr>
<td>6.21</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#IDsymbol">IDsymbol</a></td>
<td>any legal <a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">XML name symbol</a></td>
</tr>
<tr>
<td>6.22</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#name">name</a></td>
<td>any legal <a href="http://www.w3.org/TR/REC-xml#NT-Nmtoken">XML name symbol</a></td>
</tr>
<tr>
<td>6.23</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#NSprefix">NSprefix</a></td>
<td>any legal XML namespace prefix</td>
</tr>
<tr>
<td>6.24</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a></td>
<td>any XML text, with "&lt;", "&gt;", and "&amp;" escaped</td>
</tr>
<tr>
<td><span class="removed"><del>6.25</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#sequence">sequence</a></del></span></td>
<td><span class="removed"><del>"&lt;<em>rdf</em>:Seq" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>* "&lt;/<em>rdf</em>:Seq&gt;"<br />
                         | "&lt;<em>rdf</em>:Seq" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>* "/&gt;"</del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.26</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#bag">bag</a></del></span></td>
<td><span class="removed"><del>"&lt;<em>rdf</em>:Bag" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>* "&lt;/<em>rdf</em>:Bag&gt;"<br />
                         | "&lt;<em>rdf</em>:Bag" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>* "/&gt;"</del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.27</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#alternative">alternative</a></del></span></td>
<td><span class="removed"><del>"&lt;<em>rdf</em>:Alt" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a>+ "&lt;/<em>rdf</em>:Alt&gt;"<br />
                         | "&lt;<em>rdf</em>:Alt" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#idAttr">idAttr</a>? <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a>? "/&gt;"</del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.28</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#member">member</a></del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#referencedItem">referencedItem</a> | <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#inlineItem">inlineItem</a></del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.29</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#referencedItem">referencedItem</a></del></span></td>
<td><span class="removed"><del>"&lt;<em>rdf</em>:li" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#resourceAttr">resourceAttr</a> "/&gt;"</del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.30</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#inlineItem">inlineItem</a></del></span></td>
<td><span class="removed"><del>"&lt;<em>rdf</em>:li" "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#value">value</a> &lt;/<em>rdf</em>:li&gt;"<br />
                         | "&lt;<em>rdf</em>:li" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a> "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a> &lt;/<em>rdf</em>:li&gt;"<br />
                         | "&lt;<em>rdf</em>:li" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a> "&gt;" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#propertyElt">propertyElt</a>* &lt;/<em>rdf</em>:li&gt;"</del></span></td>
</tr>
<tr>
<td><span class="removed"><del>6.31</del></span></td>
<td><span class="removed"><del><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#memberAttr">memberAttr</a></del></span></td>
<td><span class="removed"><del>" <em>rdf</em>:_<em>n</em>=\"" <a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#string">string</a> "\"" (where <em>n</em> is an integer)</del></span></td>
</tr>
<tr>
<td>6.32</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseLiteral">parseLiteral</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>parseType=\"Literal\""</td>
</tr>
<tr>
<td>6.33</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#parseResource">parseResource</a></td>
<td>" <span class="added"><ins>rdf:</ins></span>parseType=\"Resource\""</td>
</tr>
<tr>
<td>6.34</td>
<td><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/#literal">literal</a></td>
<td>any well-formed XML</td>
</tr>
</table>

<h2>
<a id="section-Changes" name="section-Changes">E Changes</a>
</h2>

<p>Changes since the <a href="http://www.w3.org/TR/2001/WD-rdf-syntax-grammar-20010906/">06 September 2001</a> working draft</p>

<ul>
<li>Most of the document is new</li>
<li>Original document grammar sections moved to appendices</li>
<li>Expressed in more detail the use of the XML Infoset as used here
in a SAX-like manner</li>
<li>Grammar updated to remove rdf:aboutEach - see
<a href="#rdfms-abouteach">rdfms-abouteach</a> for details.</li>
<li>Added the mapping to the RDF Model as expressed by N-Triples</li>
<li>Added the non-normative RELAX NG schema</li>
<li>Added Issue sections</li>
<li>Added serialisation section</li>
<li>Added introduction to the RDF/XML syntax</li>
</ul>


</body>
</html>