1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741
|
<pre>Network Working Group J. Reschke, Ed.
Request for Comments: 5323 greenbytes
Category: Standards Track S. Reddy
Mitrix
J. Davis
A. Babich
IBM
November 2008
<span class="h1">Web Distributed Authoring and Versioning (WebDAV) SEARCH</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2008 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/</a>
<a href="http://trustee.ietf.org/license-info">license-info</a>) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document.
Abstract
This document specifies a set of methods, headers, and properties
composing Web Distributed Authoring and Versioning (WebDAV) SEARCH,
an application of the HTTP/1.1 protocol to efficiently search for DAV
resources based upon a set of client-supplied criteria.
<span class="grey">Reschke, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.1">1.1</a>. DASL . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.2">1.2</a>. Relationship to DAV . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.3">1.3</a>. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-1.4">1.4</a>. Notational Conventions . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-1.5">1.5</a>. Note on Usage of 'DAV:' XML Namespace . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-1.6">1.6</a>. An Overview of DASL at Work . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-2">2</a>. The SEARCH Method . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-2.1">2.1</a>. Overview . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-2.2">2.2</a>. The Request . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-2.2.1">2.2.1</a>. The Request-URI . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-2.2.2">2.2.2</a>. The Request Body . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-2.3">2.3</a>. The Successful 207 (Multistatus) Response . . . . . . . . <a href="#page-9">9</a>
<a href="#section-2.3.1">2.3.1</a>. Result Set Truncation . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-2.3.2">2.3.2</a>. Extending the PROPFIND Response . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-2.3.3">2.3.3</a>. Example: A Simple Request and Response . . . . . . . . <a href="#page-10">10</a>
<a href="#section-2.3.4">2.3.4</a>. Example: Result Set Truncation . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-2.4">2.4</a>. Unsuccessful Responses . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-2.4.1">2.4.1</a>. Example of an Invalid Scope . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-3">3</a>. Discovery of Supported Query Grammars . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-3.1">3.1</a>. The OPTIONS Method . . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-3.2">3.2</a>. The DASL Response Header . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-3.3">3.3</a>. DAV:supported-query-grammar-set (Protected) . . . . . . . <a href="#page-14">14</a>
<a href="#section-3.4">3.4</a>. Example: Grammar Discovery . . . . . . . . . . . . . . . . <a href="#page-15">15</a>
<a href="#section-4">4</a>. Query Schema Discovery: QSD . . . . . . . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-4.1">4.1</a>. Additional SEARCH Semantics . . . . . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-4.1.1">4.1.1</a>. Example of Query Schema Discovery . . . . . . . . . . <a href="#page-18">18</a>
<a href="#section-5">5</a>. The DAV:basicsearch Grammar . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-5.1">5.1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-19">19</a>
<a href="#section-5.2">5.2</a>. The DAV:basicsearch DTD . . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-5.2.1">5.2.1</a>. Example Query . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-5.3">5.3</a>. DAV:select . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-5.4">5.4</a>. DAV:from . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-5.4.1">5.4.1</a>. Relationship to the Request-URI . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-5.4.2">5.4.2</a>. Scope . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-5.5">5.5</a>. DAV:where . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-5.5.1">5.5.1</a>. Use of Three-Valued Logic in Queries . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-5.5.2">5.5.2</a>. Handling Optional Operators . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-5.5.3">5.5.3</a>. Treatment of NULL Values . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-5.5.4">5.5.4</a>. Treatment of Properties with Mixed/Element Content . . <a href="#page-25">25</a>
<a href="#section-5.5.5">5.5.5</a>. Example: Testing for Equality . . . . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-5.5.6">5.5.6</a>. Example: Relative Comparisons . . . . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-5.6">5.6</a>. DAV:orderby . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-5.6.1">5.6.1</a>. Example of Sorting . . . . . . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-5.7">5.7</a>. Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . . <a href="#page-26">26</a>
<a href="#section-5.8">5.8</a>. DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<span class="grey">Reschke, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<a href="#section-5.9">5.9</a>. DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-5.10">5.10</a>. DAV:literal . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-5.11">5.11</a>. DAV:typed-literal (Optional) . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-5.11.1">5.11.1</a>. Example for Typed Numerical Comparison . . . . . . . . <a href="#page-28">28</a>
<a href="#section-5.12">5.12</a>. Support for Matching xml:lang Attributes on Properties . . <a href="#page-29">29</a>
<a href="#section-5.12.1">5.12.1</a>. DAV:language-defined (Optional) . . . . . . . . . . . <a href="#page-29">29</a>
<a href="#section-5.12.2">5.12.2</a>. DAV:language-matches (Optional) . . . . . . . . . . . <a href="#page-29">29</a>
<a href="#section-5.12.3">5.12.3</a>. Example of Language-Aware Matching . . . . . . . . . . <a href="#page-29">29</a>
<a href="#section-5.13">5.13</a>. DAV:is-collection . . . . . . . . . . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-5.13.1">5.13.1</a>. Example of DAV:is-collection . . . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-5.14">5.14</a>. DAV:is-defined . . . . . . . . . . . . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-5.15">5.15</a>. DAV:like . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-5.15.1">5.15.1</a>. Syntax for the Literal Pattern . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-5.15.2">5.15.2</a>. Example of DAV:like . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-5.16">5.16</a>. DAV:contains . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-5.16.1">5.16.1</a>. Result Scoring (DAV:score Element) . . . . . . . . . . <a href="#page-32">32</a>
<a href="#section-5.16.2">5.16.2</a>. Ordering by Score . . . . . . . . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-5.16.3">5.16.3</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-5.17">5.17</a>. Limiting the Result Set . . . . . . . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-5.17.1">5.17.1</a>. Relationship to Result Ordering . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-5.18">5.18</a>. The 'caseless' XML Attribute . . . . . . . . . . . . . . . <a href="#page-34">34</a>
<a href="#section-5.19">5.19</a>. Query Schema for DAV:basicsearch . . . . . . . . . . . . . <a href="#page-34">34</a>
<a href="#section-5.19.1">5.19.1</a>. DTD for DAV:basicsearch QSD . . . . . . . . . . . . . <a href="#page-34">34</a>
<a href="#section-5.19.2">5.19.2</a>. DAV:propdesc Element . . . . . . . . . . . . . . . . . <a href="#page-35">35</a>
<a href="#section-5.19.3">5.19.3</a>. The DAV:datatype Property Description . . . . . . . . <a href="#page-35">35</a>
<a href="#section-5.19.4">5.19.4</a>. The DAV:searchable Property Description . . . . . . . <a href="#page-36">36</a>
<a href="#section-5.19.5">5.19.5</a>. The DAV:selectable Property Description . . . . . . . <a href="#page-36">36</a>
<a href="#section-5.19.6">5.19.6</a>. The DAV:sortable Property Description . . . . . . . . <a href="#page-36">36</a>
<a href="#section-5.19.7">5.19.7</a>. The DAV:caseless Property Description . . . . . . . . <a href="#page-36">36</a>
<a href="#section-5.19.8">5.19.8</a>. The DAV:operators XML Element . . . . . . . . . . . . <a href="#page-37">37</a>
<a href="#section-5.19.9">5.19.9</a>. Example of Query Schema for DAV:basicsearch . . . . . <a href="#page-38">38</a>
<a href="#section-6">6</a>. Internationalization Considerations . . . . . . . . . . . . . <a href="#page-39">39</a>
<a href="#section-7">7</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-39">39</a>
<a href="#section-7.1">7.1</a>. Implications of XML External Entities . . . . . . . . . . <a href="#page-39">39</a>
<a href="#section-8">8</a>. Scalability . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-40">40</a>
<a href="#section-9">9</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-40">40</a>
<a href="#section-9.1">9.1</a>. HTTP Headers . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-40">40</a>
<a href="#section-9.1.1">9.1.1</a>. DASL . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-40">40</a>
<a href="#section-10">10</a>. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-41">41</a>
<a href="#section-11">11</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-41">41</a>
<a href="#section-12">12</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-41">41</a>
<a href="#section-12.1">12.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-41">41</a>
<a href="#section-12.2">12.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-42">42</a>
<a href="#appendix-A">Appendix A</a>. Three-Valued Logic in DAV:basicsearch . . . . . . . . <a href="#page-44">44</a>
<a href="#appendix-B">Appendix B</a>. Candidates for Future Protocol Extensions . . . . . . <a href="#page-45">45</a>
<a href="#appendix-B.1">B.1</a>. Collation Support . . . . . . . . . . . . . . . . . . . . <a href="#page-45">45</a>
<a href="#appendix-B.2">B.2</a>. Count . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#appendix-B.3">B.3</a>. Diagnostics for Unsupported Queries . . . . . . . . . . . <a href="#page-46">46</a>
<span class="grey">Reschke, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<a href="#appendix-B.4">B.4</a>. Language Matching . . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#appendix-B.5">B.5</a>. Matching Media Types . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#appendix-B.6">B.6</a>. Query by Name . . . . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#appendix-B.7">B.7</a>. Result Paging . . . . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#appendix-B.8">B.8</a>. Search Scope Discovery . . . . . . . . . . . . . . . . . . <a href="#page-47">47</a>
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-47">47</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. DASL</span>
This document defines Web Distributed Authoring and Versioning
(WebDAV) SEARCH, an application of HTTP/1.1 forming a lightweight
search protocol to transport queries and result sets that allows
clients to make use of server-side search facilities. It is based on
earlier work done in the IETF DASL Working Group (see <a href="#section-10">Section 10</a>).
In this specification, the terms "WebDAV SEARCH" and "DASL" are used
interchangeably.
DASL minimizes the complexity of clients so as to facilitate
widespread deployment of applications capable of utilizing the DASL
search mechanisms.
DASL consists of:
o the SEARCH method and the request/response formats defined for it
(<a href="#section-2">Section 2</a>),
o feature discovery through the "DASL" response header and the
optional DAV:supported-grammar-set property (<a href="#section-3">Section 3</a>),
o optional grammar schema discovery (<a href="#section-4">Section 4</a>), and
o one mandatory grammar: DAV:basicsearch (<a href="#section-5">Section 5</a>).
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Relationship to DAV</span>
DASL relies on the resource and property model defined by [<a href="./rfc4918" title=""HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)"">RFC4918</a>].
DASL does not alter this model. Instead, DASL allows clients to
access DAV-modeled resources through server-side search.
<span class="grey">Reschke, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. Terms</span>
This document uses the terms defined in [<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>], [<a href="./rfc4918" title=""HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)"">RFC4918</a>],
[<a href="./rfc3253" title=""Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)"">RFC3253</a>], and in this section.
Criteria
An expression against which each resource in the search scope is
evaluated.
Query
A query is a combination of a search scope, search criteria,
result record definition, sort specification, and a search
modifier.
Query Grammar
A set of definitions of XML elements, attributes, and constraints
on their relations and values that defines a set of queries and
the intended semantics.
Query Schema
A listing, for any given grammar and scope, of the properties and
operators that may be used in a query with that grammar and scope.
Result
A result is a result set, optionally augmented with other
information describing the search as a whole.
Result Record
A description of a resource. A result record is a set of
properties, and possibly other descriptive information.
Result Record Definition
A specification of the set of properties to be returned in the
result record.
Result Set
A set of records, one for each resource for which the search
criteria evaluated to True.
<span class="grey">Reschke, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Scope
A set of resources to be searched.
Search Arbiter
A resource that supports the SEARCH method.
Search Modifier
An instruction that governs the execution of the query but is not
part of the search scope, result record definition, the search
criteria, or the sort specification. An example of a search
modifier is one that controls how much time the server can spend
on the query before giving a response.
Sort Specification
A specification of an ordering on the result records in the result
set.
<span class="h3"><a class="selflink" id="section-1.4" href="#section-1.4">1.4</a>. Notational Conventions</span>
This specification uses the Augmented Backus-Naur Form (ABNF)
notation of [<a href="./rfc5234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC5234</a>], unless explicitly stated otherwise.
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="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
This document uses XML DTD fragments ([<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>], Section 3.2) as a purely
notational convention. WebDAV request and response bodies cannot be
validated by a DTD due to the specific extensibility rules defined in
<a href="./rfc4918#section-17">Section 17 of [RFC4918]</a> and due to the fact that all XML elements
defined by this specification use the XML namespace name "DAV:". In
particular:
1. element names use the "DAV:" namespace,
2. element ordering is irrelevant unless explicitly stated,
3. extension elements (elements not already defined as valid child
elements) may be added anywhere, except when explicitly stated
otherwise,
4. extension attributes (attributes not already defined as valid for
this element) may be added anywhere, except when explicitly
stated otherwise.
<span class="grey">Reschke, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
When an XML element type in the "DAV:" namespace is referenced in
this document outside of the context of an XML fragment, the string
"DAV:" will be prefixed to the element type.
Similarly, when an XML element type in the namespace
"<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" is referenced in this document
outside of the context of an XML fragment, the string "xs:" will be
prefixed to the element type.
This document inherits, and sometimes extends, DTD productions from
<a href="./rfc4918#section-14">Section 14 of [RFC4918]</a>.
<span class="h3"><a class="selflink" id="section-1.5" href="#section-1.5">1.5</a>. Note on Usage of 'DAV:' XML Namespace</span>
This specification defines elements, properties, and condition names
in the XML namespace "DAV:". In general, only specifications
authored by IETF working groups are supposed to do this. In this
case an exception was made, because WebDAV SEARCH started its life in
the IETF DASL working group (<<a href="http://www.webdav.org/dasl/">http://www.webdav.org/dasl/</a>>, and at
the time the working group closed down there was already significant
deployment of this specification.
<span class="h3"><a class="selflink" id="section-1.6" href="#section-1.6">1.6</a>. An Overview of DASL at Work</span>
One can express the basic usage of DASL in the following steps:
o The client constructs a query using the DAV:basicsearch grammar.
o The client invokes the SEARCH method on a resource that will
perform the search (the search arbiter) and includes a text/xml or
application/xml request entity that contains the query.
o The search arbiter performs the query.
o The search arbiter sends the results of the query back to the
client in the response. The server MUST send an entity that
matches the WebDAV multistatus format (<a href="./rfc4918#section-13">[RFC4918], Section 13</a>).
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. The SEARCH Method</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Overview</span>
The client invokes the SEARCH method to initiate a server-side
search. The body of the request defines the query. The server MUST
emit an entity matching the WebDAV multistatus format (<a href="./rfc4918#section-13">[RFC4918],
Section 13</a>).
<span class="grey">Reschke, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
The SEARCH method plays the role of transport mechanism for the query
and the result set. It does not define the semantics of the query.
The type of the query defines the semantics.
SEARCH is a safe method; it does not have any significance other than
executing a query and returning a query result (see <a href="./rfc2616#section-9.1.1">[RFC2616],
Section 9.1.1</a>).
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. The Request</span>
The client invokes the SEARCH method on the resource named by the
Request-URI.
<span class="h4"><a class="selflink" id="section-2.2.1" href="#section-2.2.1">2.2.1</a>. The Request-URI</span>
The Request-URI identifies the search arbiter. Any HTTP resource may
function as search arbiter. It is not a new type of resource (in the
sense of DAV:resourcetype as defined in <a href="./rfc4918#section-15.9">[RFC4918], Section 15.9</a>), nor
does it have to be a WebDAV-compliant resource.
The SEARCH method defines no relationship between the arbiter and the
scope of the search; rather, the particular query grammar used in the
query defines the relationship. For example, a query grammar may
force the Request-URI to correspond exactly to the search scope.
<span class="h4"><a class="selflink" id="section-2.2.2" href="#section-2.2.2">2.2.2</a>. The Request Body</span>
The server MUST process a text/xml or application/xml request body,
and MAY process request bodies in other formats. See [<a href="./rfc3023" title=""XML Media Types"">RFC3023</a>] for
guidance on packaging XML in requests.
Marshalling:
If a request body with content type text/xml or application/xml is
included, it MUST be either a DAV:searchrequest or a DAV:query-
schema-discovery XML element. Its single child element identifies
the query grammar.
For DAV:searchrequest, the definition of search criteria, the
result record, and any other details needed to perform the search
depend on the individual search grammar.
For DAV:query-schema-discovery, the semantics is defined in
<a href="#section-4">Section 4</a>.
<span class="grey">Reschke, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Preconditions:
(DAV:search-grammar-discovery-supported): when an XML request body
is present and has a DAV:query-schema-discovery document element,
the server MUST support the query schema discovery mechanism
described in <a href="#section-4">Section 4</a>.
(DAV:search-grammar-supported): when an XML request body is
present, the search grammar identified by the document element's
child element must be a supported search grammar.
(DAV:search-multiple-scope-supported): if the SEARCH request
specified multiple scopes, the server MUST support this optional
feature.
(DAV:search-scope-valid): the supplied search scope must be valid.
There can be various reasons for a search scope to be invalid,
including unsupported URI schemes and communication problems.
Servers MAY add [<a href="./rfc4918" title=""HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)"">RFC4918</a>] compliant DAV:response elements as
content to the condition element indicating the precise reason for
the failure.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. The Successful 207 (Multistatus) Response</span>
If the server returns 207 (Multistatus), then the search proceeded
successfully, and the response MUST use the WebDAV multistatus format
(<a href="./rfc4918#section-13">[RFC4918], Section 13</a>). The results of this method SHOULD NOT be
cached.
There MUST be one DAV:response for each resource that matched the
search criteria. For each such response, the DAV:href element
contains the URI of the resource, and the response MUST include a
DAV:propstat element.
Note: the WebDAV multistatus format requires at least one DAV:
response child element. This specification relaxes that
restriction so that empty results can be represented.
Note that for each matching resource found, there may be multiple
URIs within the search scope mapped to it. In this case, a server
SHOULD report only one of these URIs. Clients can use the live
property DAV:resource-id, defined in Section 3.1 of [<a href="#ref-WEBDAV-BIND" title=""Binding Extensions to Web Distributed Authoring and Versioning (WebDAV)"">WEBDAV-BIND</a>] to
identify possible duplicates.
<span class="h4"><a class="selflink" id="section-2.3.1" href="#section-2.3.1">2.3.1</a>. Result Set Truncation</span>
A server MAY limit the number of resources in a reply, for example,
to limit the amount of resources expended in processing a query. If
<span class="grey">Reschke, et al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
it does so, the reply MUST use status code 207, return a DAV:
multistatus response body, and indicate a status of 507 (Insufficient
Storage) for the search arbiter URI. It SHOULD include the partial
results.
When a result set is truncated, there may be many more resources that
satisfy the search criteria but that were not examined.
If partial results are included and the client requested an ordered
result set in the original request, then any partial results that are
returned MUST be ordered as the client directed.
Note that the partial results returned MAY be any subset of the
result set that would have satisfied the original query.
<span class="h4"><a class="selflink" id="section-2.3.2" href="#section-2.3.2">2.3.2</a>. Extending the PROPFIND Response</span>
A response MAY include more information than PROPFIND defines, so
long as the extra information does not invalidate the PROPFIND
response. Query grammars SHOULD define how the response matches the
PROPFIND response.
<span class="h4"><a class="selflink" id="section-2.3.3" href="#section-2.3.3">2.3.3</a>. Example: A Simple Request and Response</span>
This example demonstrates the request and response framework. The
following XML document shows a simple (hypothetical) natural language
query. The name of the query element is natural-language-query in
the XML namespace "http://example.com/foo". The actual query is
"Find the locations of good Thai restaurants in Los Angeles". For
this hypothetical query, the arbiter returns two properties for each
selected resource.
>> Request:
SEARCH / HTTP/1.1
Host: example.org
Content-Type: application/xml; charset="utf-8"
Content-Length: 252
<?xml version="1.0" encoding="UTF-8"?>
<D:searchrequest xmlns:D="DAV:" xmlns:F="http://example.com/foo">
<F:natural-language-query>
Find the locations of good Thai restaurants in Los Angeles
</F:natural-language-query>
</D:searchrequest>
<span class="grey">Reschke, et al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
>> Response:
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: 429
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:"
xmlns:R="http://example.org/propschema">
<D:response>
<D:href>http://siamiam.example/</D:href>
<D:propstat>
<D:prop>
<R:location>259 W. Hollywood</R:location>
<R:rating><R:stars>4</R:stars></R:rating>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
<span class="h4"><a class="selflink" id="section-2.3.4" href="#section-2.3.4">2.3.4</a>. Example: Result Set Truncation</span>
In the example below, the server returns just two results, and then
indicates that the result is truncated by adding a DAV:response
element for the search arbiter resource with 507 (Insufficient
Storage) status.
>> Request:
SEARCH / HTTP/1.1
Host: example.net
Content-Type: text/xml; charset="utf-8"
Content-Length: xxx
... the query goes here ...
<span class="grey">Reschke, et al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
>> Response:
HTTP/1.1 207 Multistatus
Content-Type: text/xml; charset="utf-8"
Content-Length: 640
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.example.net/sounds/unbrokenchain.au</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
<D:response>
<D:href>http://tech.mit.example/arch96/photos/Lesh1.jpg</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
<D:response>
<D:href>http://example.net</D:href>
<D:status>HTTP/1.1 507 Insufficient Storage</D:status>
<D:responsedescription xml:lang="en">
Only first two matching records were returned
</D:responsedescription>
</D:response>
</D:multistatus>
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Unsuccessful Responses</span>
If a SEARCH request could not be executed or the attempt to execute
it resulted in an error, the server MUST indicate the failure with an
appropriate status code and SHOULD add a response body as defined in
<a href="./rfc3253#section-1.6">Section 1.6 of [RFC3253]</a>. Unless otherwise stated, condition
elements are empty; however, specific condition elements MAY include
additional child elements that describe the error condition in more
detail.
<span class="h4"><a class="selflink" id="section-2.4.1" href="#section-2.4.1">2.4.1</a>. Example of an Invalid Scope</span>
In the example below, a request failed because the scope identifies a
HTTP resource that was not found.
<span class="grey">Reschke, et al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
>> Response:
HTTP/1.1 409 Conflict
Content-Type: text/xml; charset="utf-8"
Content-Length: 275
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV:">
<d:search-scope-valid>
<d:response>
<d:href>http://www.example.com/X</d:href>
<d:status>HTTP/1.1 404 Object Not Found</d:status>
</d:response>
</d:search-scope-valid>
</d:error>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Discovery of Supported Query Grammars</span>
Servers MUST support discovery of the query grammars supported by a
search arbiter resource.
Clients can determine which query grammars are supported by an
arbiter by invoking OPTIONS on the search arbiter. If the resource
supports SEARCH, then the DASL response header will appear in the
response. The DASL response header lists the supported grammars.
Servers supporting the WebDAV extensions [<a href="./rfc3253" title=""Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)"">RFC3253</a>] and/or [<a href="./rfc3744" title=""Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol"">RFC3744</a>]
MUST also:
o report SEARCH in the live property DAV:supported-method-set for
all search arbiter resources, and
o support the live property DAV:supported-query-grammar-set as
defined in <a href="#section-3.3">Section 3.3</a>.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. The OPTIONS Method</span>
The OPTIONS method allows the client to discover if a resource
supports the SEARCH method and to determine the list of search
grammars supported for that resource.
The client issues the OPTIONS method against a resource named by the
Request-URI. This is a normal invocation of OPTIONS as defined in
<a href="./rfc2616#section-9.2">Section 9.2 of [RFC2616]</a>.
<span class="grey">Reschke, et al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
If a resource supports the SEARCH method, then the server MUST list
SEARCH in the Allow header defined in <a href="./rfc2616#section-14.7">Section 14.7 of [RFC2616]</a>.
DASL servers MUST include the DASL header in the OPTIONS response.
This header identifies the search grammars supported by that
resource.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. The DASL Response Header</span>
DASLHeader = "DASL" ":" 1#Coded-URL
Coded-URL = <defined in <a href="./rfc4918#section-10.1">Section 10.1 of [RFC4918]</a>>
(This grammar uses the augmented BNF format defined in <a href="./rfc2616#section-2.1">Section 2.1 of
[RFC2616]</a>.)
The DASL response header indicates server support for query grammars
in the OPTIONS method. The value is a list of URIs that indicate the
types of supported grammars. Note that although the URIs can be used
to identify each supported search grammar, there is not necessarily a
direct relationship between the URI and the XML element name that can
be used in XML based SEARCH requests (the element name itself is
identified by its namespace name (a URI reference) and the element's
local name).
Note: this header field value is defined as a comma-separated list
(<a href="./rfc2616#section-4.2">[RFC2616], Section 4.2</a>); thus, grammar URIs can appear in
multiple header instances, separated by commas, or both.
For example:
DASL: <http://foobar.example/syntax1>,
<http://akuma.example/syntax2>, <DAV:basicsearch>
DASL: <http://example.com/foo/natural-language-query>
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. DAV:supported-query-grammar-set (Protected)</span>
This WebDAV property is required for any server supporting either
[<a href="./rfc3253" title=""Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)"">RFC3253</a>] and/or [<a href="./rfc3744" title=""Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol"">RFC3744</a>] and identifies the XML-based query
grammars that are supported by the search arbiter resource.
<!ELEMENT supported-query-grammar-set (supported-query-grammar*)>
<!ELEMENT supported-query-grammar (grammar)>
<!ELEMENT grammar ANY>
<!-- ANY value: a query grammar element type -->
<span class="grey">Reschke, et al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Example: Grammar Discovery</span>
This example shows that the server supports search on the /somefolder
resource with the query grammars: DAV:basicsearch,
http://foobar.example/syntax1 and http://akuma.example/syntax2. Note
that servers supporting WebDAV SEARCH MUST support DAV:basicsearch.
>> Request:
OPTIONS /somefolder HTTP/1.1
Host: example.org
>> Response:
HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH
DASL: <DAV:basicsearch>
DASL: <http://foobar.example/syntax1>, <http://akuma.example/syntax2>
This example shows the equivalent taking advantage of a server's
support for DAV:supported-method-set and DAV:supported-query-grammar-
set.
>> Request:
PROPFIND /somefolder HTTP/1.1
Host: example.org
Depth: 0
Content-Type: text/xml; charset="utf-8"
Content-Length: 165
<?xml version="1.0" encoding="UTF-8" ?>
<propfind xmlns="DAV:">
<prop>
<supported-query-grammar-set/>
<supported-method-set/>
</prop>
</propfind>
<span class="grey">Reschke, et al. Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
>> Response:
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: 1349
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href>http://example.org/somefolder</href>
<propstat>
<prop>
<supported-query-grammar-set>
<supported-query-grammar>
<grammar><basicsearch/></grammar>
</supported-query-grammar>
<supported-query-grammar>
<grammar><syntax1 xmlns="http://foobar.example/"/></grammar>
</supported-query-grammar>
<supported-query-grammar>
<grammar><syntax2 xmlns="http://akuma.example/"/></grammar>
</supported-query-grammar>
</supported-query-grammar-set>
<supported-method-set>
<supported-method name="COPY" />
<supported-method name="DELETE" />
<supported-method name="GET" />
<supported-method name="HEAD" />
<supported-method name="LOCK" />
<supported-method name="MKCOL" />
<supported-method name="MOVE" />
<supported-method name="OPTIONS" />
<supported-method name="POST" />
<supported-method name="PROPFIND" />
<supported-method name="PROPPATCH" />
<supported-method name="PUT" />
<supported-method name="SEARCH" />
<supported-method name="TRACE" />
<supported-method name="UNLOCK" />
</supported-method-set>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
<span class="grey">Reschke, et al. Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Note that the query grammar element names marshalled as part of the
DAV:supported-query-grammar-set can be directly used as element names
in an XML-based query.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Query Schema Discovery: QSD</span>
Servers MAY support the discovery of the schema for a query grammar.
The DASL response header and the DAV:supported-query-grammar-set
property provide means for clients to discover the set of query
grammars supported by a resource. This alone is not sufficient
information for a client to generate a query. For example, the DAV:
basicsearch grammar defines a set of queries consisting of a set of
operators applied to a set of properties and values, but the grammar
itself does not specify which properties may be used in the query.
QSD for the DAV:basicsearch grammar allows a client to discover the
set of properties that are searchable, selectable, and sortable.
Moreover, although the DAV:basicsearch grammar defines a minimal set
of operators, it is possible that a resource might support additional
operators in a query. For example, a resource might support an
optional operator that can be used to express content-based queries
in a proprietary syntax. QSD allows a client to discover these
operators and their syntax. The set of discoverable quantities will
differ from grammar to grammar, but each grammar can define a means
for a client to discover what can be discovered.
In general, the schema for a given query grammar depends on both the
resource (the arbiter) and the scope. A given resource might have
access to one set of properties for one potential scope, and another
set for a different scope. For example, consider a server able to
search two distinct collections: one holding cooking recipes, the
other design documents for nuclear weapons. While both collections
might support properties such as author, title, and date, the first
might also define properties such as calories and preparation time,
while the second defined properties such as yield and applicable
patents. Two distinct arbiters indexing the same collection might
also have access to different properties. For example, the recipe
collection mentioned above might also be indexed by a value-added
server that also stored the names of chefs who had tested the recipe.
Note also that the available query schema might also depend on other
factors, such as the identity of the principal conducting the search,
but these factors are not exposed in this protocol.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Additional SEARCH Semantics</span>
Each query grammar supported by DASL defines its own syntax for
expressing the possible query schema. A client retrieves the schema
for a given query grammar on an arbiter resource with a given scope
<span class="grey">Reschke, et al. Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
by invoking the SEARCH method on that arbiter with that grammar and
scope and with a root element of DAV:query-schema-discovery rather
than DAV:searchrequest.
Marshalling:
The request body MUST be a DAV:query-schema-discovery element.
<!ELEMENT query-schema-discovery ANY>
<!-- ANY value: XML element specifying the query grammar
and the scope -->
The response body takes the form of a DAV:multistatus element
(<a href="./rfc4918#section-13">[RFC4918], Section 13</a>), where DAV:response is extended to hold
the returned query grammar inside a DAV:query-schema container
element.
<!ELEMENT response (href, status, query-schema?,
responsedescription?) >
<!ELEMENT query-schema ANY>
The content of this container is an XML element whose name and syntax
depend upon the grammar, and whose value may (and likely will) vary
depending upon the grammar, arbiter, and scope.
<span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a>. Example of Query Schema Discovery</span>
In this example, the arbiter is recipes.example, the grammar is DAV:
basicsearch, the scope is also recipes.example.
>> Request:
SEARCH / HTTP/1.1
Host: recipes.example
Content-Type: application/xml; charset="utf-8"
Content-Length: 258
<?xml version="1.0"?>
<query-schema-discovery xmlns="DAV:">
<basicsearch>
<from>
<scope>
<href>http://recipes.example</href>
<depth>infinity</depth>
</scope>
</from>
</basicsearch>
</query-schema-discovery>
<span class="grey">Reschke, et al. Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
>> Response:
HTTP/1.1 207 Multistatus
Content-Type: application/xml; charset="utf-8"
Content-Length: xxx
<?xml version="1.0"?>
<multistatus xmlns="DAV:">
<response>
<href>http://recipes.example</href>
<status>HTTP/1.1 200 OK</status>
<query-schema>
<basicsearchschema>
<!-- (See <a href="#section-5.19">Section 5.19</a> for
the actual contents) -->
</basicsearchschema>
</query-schema>
</response>
</multistatus>
The query schema for DAV:basicsearch is defined in <a href="#section-5.19">Section 5.19</a>.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. The DAV:basicsearch Grammar</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Introduction</span>
DAV:basicsearch uses an extensible XML syntax that allows clients to
express search requests that are generally useful for WebDAV
scenarios. DASL-extended servers MUST accept this grammar, and MAY
accept other grammars.
DAV:basicsearch has several components:
o DAV:select provides the result record definition.
o DAV:from defines the scope.
o DAV:where defines the criteria.
o DAV:orderby defines the sort order of the result set.
o DAV:limit provides constraints on the query as a whole.
<span class="grey">Reschke, et al. Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. The DAV:basicsearch DTD</span>
<!-- "basicsearch" element -->
<!ELEMENT basicsearch (select, from, where?, orderby?, limit?) >
<!-- "select" element -->
<!ELEMENT select (allprop | prop) >
<!-- "from" element -->
<!ELEMENT from (scope+) >
<!ELEMENT scope (href, depth, include-versions?) >
<!ELEMENT include-versions EMPTY >
<!-- "where" element -->
<span class="grey">Reschke, et al. Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<!ENTITY % comp_ops "eq | lt | gt| lte | gte">
<!ENTITY % log_ops "and | or | not">
<!ENTITY % special_ops "is-collection | is-defined |
language-defined | language-matches">
<!ENTITY % string_ops "like">
<!ENTITY % content_ops "contains">
<!ENTITY % all_ops "%comp_ops; | %log_ops; | %special_ops; |
%string_ops; | %content_ops;">
<!ELEMENT where ( %all_ops; ) >
<!ELEMENT and ( %all_ops; )+ >
<!ELEMENT or ( %all_ops; )+ >
<!ELEMENT not ( %all_ops; ) >
<!ELEMENT lt (prop, (literal|typed-literal)) >
<!ATTLIST lt caseless (yes|no) #IMPLIED>
<!ELEMENT lte (prop, (literal|typed-literal)) >
<!ATTLIST lte caseless (yes|no) #IMPLIED>
<!ELEMENT gt (prop, (literal|typed-literal)) >
<!ATTLIST gt caseless (yes|no) #IMPLIED>
<!ELEMENT gte (prop, (literal|typed-literal)) >
<!ATTLIST gte caseless (yes|no) #IMPLIED>
<!ELEMENT eq (prop, (literal|typed-literal)) >
<!ATTLIST eq caseless (yes|no) #IMPLIED>
<!ELEMENT literal (#PCDATA)>
<!ELEMENT typed-literal (#PCDATA)>
<!ATTLIST typed-literal xsi:type CDATA #IMPLIED>
<!ELEMENT is-collection EMPTY >
<!ELEMENT is-defined (prop) >
<!ELEMENT language-defined (prop) >
<!ELEMENT language-matches (prop, literal) >
<!ELEMENT like (prop, literal) >
<!ATTLIST like caseless (yes|no) #IMPLIED>
<!ELEMENT contains (#PCDATA)>
<span class="grey">Reschke, et al. Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<!-- "orderby" element -->
<!ELEMENT orderby (order+) >
<!ELEMENT order ((prop | score), (ascending | descending)?)>
<!ATTLIST order caseless (yes|no) #IMPLIED>
<!ELEMENT ascending EMPTY>
<!ELEMENT descending EMPTY>
<!-- "limit" element -->
<!ELEMENT limit (nresults) >
<!ELEMENT nresults (#PCDATA) >
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Example Query</span>
This query retrieves the content length values for all resources
located under the server's "/container1/" URI namespace whose length
exceeds 10000 sorted ascending by size.
<d:searchrequest xmlns:d="DAV:">
<d:basicsearch>
<d:select>
<d:prop><d:getcontentlength/></d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/container1/</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:where>
<d:gt>
<d:prop><d:getcontentlength/></d:prop>
<d:literal>10000</d:literal>
</d:gt>
</d:where>
<d:orderby>
<d:order>
<d:prop><d:getcontentlength/></d:prop>
<d:ascending/>
</d:order>
</d:orderby>
</d:basicsearch>
</d:searchrequest>
<span class="grey">Reschke, et al. Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. DAV:select</span>
DAV:select defines the result record, which is a set of properties
and values. This document defines two possible values: DAV:allprop
and DAV:prop, both defined in <a href="./rfc4918#section-14">Section 14 of [RFC4918]</a>.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. DAV:from</span>
<!ELEMENT scope (href, depth, include-versions?) >
<!ELEMENT include-versions EMPTY >
DAV:from defines the query scope. This contains one or more DAV:
scope elements. Support for multiple scope elements is optional,
however servers MUST fail a request specifying multiple DAV:scope
elements if they can't support it (see <a href="#section-2.2.2">Section 2.2.2</a>, precondition
DAV:search-multiple-scope-supported). The scope element contains
mandatory DAV:href and DAV:depth elements.
DAV:href indicates the URI reference (<a href="./rfc3986#section-4.1">[RFC3986], Section 4.1</a>) to use
as a scope.
When the scope is a collection, if DAV:depth is "0", the search
includes only the collection. When it is "1", the search includes
the collection and its immediate children. When it is "infinity", it
includes the collection and all its progeny.
When the scope is not a collection, the depth is ignored and the
search applies just to the resource itself.
If the server supports WebDAV Redirect Reference Resources
([<a href="./rfc4437" title=""Web Distributed Authoring and Versioning (WebDAV) Redirect Reference Resources"">RFC4437</a>]) and the search scope contains a redirect reference
resource, then it applies only to that resource, not to its target.
When the child element DAV:include-versions is present, the search
scope will include all versions (see <a href="./rfc3253#section-2.2.1">[RFC3253], Section 2.2.1</a>) of all
version-controlled resources in scope. Servers that do support
versioning but do not support the DAV:include-versions feature MUST
signal an error if it is used in a query (see <a href="#section-2.2.2">Section 2.2.2</a>,
precondition DAV:search-scope-valid).
<span class="h4"><a class="selflink" id="section-5.4.1" href="#section-5.4.1">5.4.1</a>. Relationship to the Request-URI</span>
If the DAV:scope element is a URI (<a href="./rfc3986#section-3">[RFC3986], Section 3</a>), the scope
is exactly that URI.
If the DAV:scope element is a relative reference ([<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>], <a href="#section-4.2">Section</a>
<a href="#section-4.2">4.2</a>), the scope is taken to be relative to the Request-URI.
<span class="grey">Reschke, et al. Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.4.2" href="#section-5.4.2">5.4.2</a>. Scope</span>
A Scope can be an arbitrary URI reference.
Servers, of course, may support only particular scopes. This may
include limitations for particular schemes such as "http:" or "ftp:"
or certain URI namespaces. However, WebDAV-compliant search arbiters
minimally SHOULD support scopes that match their own URI.
<span class="h3"><a class="selflink" id="section-5.5" href="#section-5.5">5.5</a>. DAV:where</span>
The DAV:where element defines the search condition for inclusion of
resources in the result set. The value of this element is an XML
element that defines a search operator that evaluates to one of the
Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator
contained by DAV:where may itself contain and evaluate additional
search operators as operands, which in turn may contain and evaluate
additional search operators as operands, etc., recursively.
<span class="h4"><a class="selflink" id="section-5.5.1" href="#section-5.5.1">5.5.1</a>. Use of Three-Valued Logic in Queries</span>
Each operator defined for use in the where clause that returns a
Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource
under scan is included as a member of the result set if and only if
the search condition evaluates to TRUE.
Consult <a href="#appendix-A">Appendix A</a> for details on the application of three-valued
logic in query expressions.
<span class="h4"><a class="selflink" id="section-5.5.2" href="#section-5.5.2">5.5.2</a>. Handling Optional Operators</span>
If a query contains an operator that is not supported by the server,
then the server MUST respond with a 422 (Unprocessable Entity) status
code.
<span class="h4"><a class="selflink" id="section-5.5.3" href="#section-5.5.3">5.5.3</a>. Treatment of NULL Values</span>
If a PROPFIND for a property value would yield a non-2xx (see <a href="./rfc2616#section-10.2">Section</a>
<a href="./rfc2616#section-10.2">10.2 of [RFC2616]</a>) response for that property, then that property is
considered NULL.
NULL values are "less than" all other values in comparisons.
Empty strings (zero length strings) are not NULL values. An empty
string is "less than" a string with length greater than zero.
The DAV:is-defined operator is defined to test if the value of a
property is not NULL.
<span class="grey">Reschke, et al. Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.5.4" href="#section-5.5.4">5.5.4</a>. Treatment of Properties with Mixed/Element Content</span>
Comparisons of properties that do not have simple types (text-only
content) is out of scope for the standard operators defined for DAV:
basicsearch and therefore is defined to be UNKNOWN (as per
<a href="#appendix-A">Appendix A</a>). For querying the DAV:resourcetype property, see
<a href="#section-5.13">Section 5.13</a>.
<span class="h4"><a class="selflink" id="section-5.5.5" href="#section-5.5.5">5.5.5</a>. Example: Testing for Equality</span>
The example shows a single operator (DAV:eq) applied in the criteria.
<d:where xmlns:d='DAV:'>
<d:eq>
<d:prop>
<d:getcontentlength/>
</d:prop>
<d:literal>100</d:literal>
</d:eq>
</d:where>
<span class="h4"><a class="selflink" id="section-5.5.6" href="#section-5.5.6">5.5.6</a>. Example: Relative Comparisons</span>
The example shows a more complex operation involving several
operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This
DAV:where expression matches those resources of type "image/gif" over
4K in size.
<D:where xmlns:D='DAV:'>
<D:and>
<D:eq>
<D:prop>
<D:getcontenttype/>
</D:prop>
<D:literal>image/gif</D:literal>
</D:eq>
<D:gt>
<D:prop>
<D:getcontentlength/>
</D:prop>
<D:literal>4096</D:literal>
</D:gt>
</D:and>
</D:where>
<span class="grey">Reschke, et al. Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.6" href="#section-5.6">5.6</a>. DAV:orderby</span>
The DAV:orderby element specifies the ordering of the result set. It
contains one or more DAV:order elements, each of which specifies a
comparison between two items in the result set. Informally, a
comparison specifies a test that determines whether one resource
appears before another in the result set. Comparisons are applied in
the order they occur in the DAV:orderby element, earlier comparisons
being more significant.
The comparisons defined here use only a single property from each
resource, compared using the same ordering as the DAV:lt operator
(ascending) or DAV:gt operator (descending). If neither direction is
specified, the default is DAV:ascending.
In the context of the DAV:orderby element, null values are considered
to collate before any actual (i.e., non-null) value, including
strings of zero length (this is compatible with [<a href="#ref-SQL99" title=""Database Language SQL Part 2: Foundation (SQL/Foundation)"">SQL99</a>]).
The "caseless" attribute may be used to indicate case-sensitivity for
comparisons (<a href="#section-5.18">Section 5.18</a>).
<span class="h4"><a class="selflink" id="section-5.6.1" href="#section-5.6.1">5.6.1</a>. Example of Sorting</span>
This sort orders first by last name of the author and then by size,
in descending order, so that for each author, the largest works
appear first.
<d:orderby xmlns:d='DAV:' xmlns:r='http://example.com/ns'>
<d:order>
<d:prop><r:lastname/></d:prop>
<d:ascending/>
</d:order>
<d:order>
<d:prop><d:getcontentlength/></d:prop>
<d:descending/>
</d:order>
</d:orderby>
<span class="h3"><a class="selflink" id="section-5.7" href="#section-5.7">5.7</a>. Boolean Operators: DAV:and, DAV:or, and DAV:not</span>
The DAV:and operator performs a logical AND operation on the
expressions it contains.
The DAV:or operator performs a logical OR operation on the values it
contains.
<span class="grey">Reschke, et al. Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
The DAV:not operator performs a logical NOT operation on the values
it contains.
<span class="h3"><a class="selflink" id="section-5.8" href="#section-5.8">5.8</a>. DAV:eq</span>
The DAV:eq operator provides simple equality matching on property
values.
The "caseless" attribute may be used with this element
(<a href="#section-5.18">Section 5.18</a>).
<span class="h3"><a class="selflink" id="section-5.9" href="#section-5.9">5.9</a>. DAV:lt, DAV:lte, DAV:gt, DAV:gte</span>
The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide
comparisons on property values, using less-than, less-than or equal,
greater-than, and greater-than or equal, respectively. The
"caseless" attribute may be used with these elements (<a href="#section-5.18">Section 5.18</a>).
<span class="h3"><a class="selflink" id="section-5.10" href="#section-5.10">5.10</a>. DAV:literal</span>
DAV:literal allows literal values to be placed in an expression.
White space in literal values is significant in comparisons. For
consistency with [<a href="./rfc4918" title=""HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)"">RFC4918</a>], clients SHOULD NOT specify the attribute
"xml:space" (Section 2.10 of [<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>]) to override this behavior.
In comparisons, the contents of DAV:literal SHOULD be treated as
string, with the following exceptions:
o when operand for a comparison with a DAV:getcontentlength
property, it SHOULD be treated as an unsigned integer value (the
behavior for values not in this format is undefined),
o when operand for a comparison with a DAV:creationdate or DAV:
getlastmodified property, it SHOULD be treated as a date value in
the ISO-8601 subset defined for the DAV:creationdate property (see
<a href="./rfc4918#section-15.1">Section 15.1 of [RFC4918]</a>; the behavior of values not in this
format is undefined),
o when operand for a comparison with a property for which the type
is known and when compatible with that type, it MAY be treated
according to this type.
<span class="grey">Reschke, et al. Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.11" href="#section-5.11">5.11</a>. DAV:typed-literal (Optional)</span>
There are situations in which a client may want to force a comparison
not to be string-based (as defined for DAV:literal). In these cases,
a typed comparison can be enforced by using DAV:typed-literal
instead.
<!ELEMENT typed-literal (#PCDATA)>
The data type is specified using the xsi:type attribute defined in
Section 2.6.1 of [<a href="#ref-XS1" title=""XML Schema Part 1: Structures"">XS1</a>]. If the type is not specified, it defaults to
"xs:string".
A server MUST reject a request using an unknown type with a status of
422 (Unprocessable Entity). It SHOULD reject a request if the value
provided in DAV:typed-literal cannot be cast to the specified type.
The comparison evaluates to UNKNOWN if the property value cannot be
cast to the specified datatype (see [<a href="#ref-XPATHFUNC" title=""XQuery 1.0 and XPath 2.0 Functions and Operators"">XPATHFUNC</a>], Section 17).
<span class="h4"><a class="selflink" id="section-5.11.1" href="#section-5.11.1">5.11.1</a>. Example for Typed Numerical Comparison</span>
Consider a set of resources with the dead property "edits" in the
namespace "http://ns.example.org":
+-----+----------------+
| URI | property value |
+-----+----------------+
| /a | "-1" |
| /b | "01" |
| /c | "3" |
| /d | "test" |
| /e | (undefined) |
+-----+----------------+
The expression
<lt xmlns="DAV:"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<prop><edits xmlns="http://ns.example.org"/></prop>
<typed-literal xsi:type="xs:integer">3</typed-literal>
</lt>
will evaluate to TRUE for the resources "/a" and "/b" (their property
values can be parsed as type xs:integer, and the numerical comparison
evaluates to true), to FALSE for "/c" (property value is compatible,
but numerical comparison evaluates to false), and UNKNOWN for "/d"
<span class="grey">Reschke, et al. Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
and "/e" (the property either is undefined, or its value cannot be
parsed as xs:integer).
<span class="h3"><a class="selflink" id="section-5.12" href="#section-5.12">5.12</a>. Support for Matching xml:lang Attributes on Properties</span>
The following two optional operators can be used to express
conditions on the language of a property value (as expressed using
the xml:lang attribute).
<span class="h4"><a class="selflink" id="section-5.12.1" href="#section-5.12.1">5.12.1</a>. DAV:language-defined (Optional)</span>
<!ELEMENT language-defined (prop)>
This operator evaluates to TRUE if the language for the value of the
given property is known, FALSE if it isn't, and UNKNOWN if the
property itself is not defined.
<span class="h4"><a class="selflink" id="section-5.12.2" href="#section-5.12.2">5.12.2</a>. DAV:language-matches (Optional)</span>
<!ELEMENT language-matches (prop, literal)>
This operator evaluates to TRUE if the language for the value of the
given property is known and matches the language name given in the
<literal> element, FALSE if it doesn't match, and UNKNOWN if the
property itself is not defined.
Languages are considered to match if they are the same, or if the
language of the property value is a sublanguage of the language
specified in the <literal> element (see Section 4.3 of [<a href="#ref-XPATH" title=""XML Path Language (XPath) Version 1.0"">XPATH</a>], "lang
function").
<span class="h4"><a class="selflink" id="section-5.12.3" href="#section-5.12.3">5.12.3</a>. Example of Language-Aware Matching</span>
The expression below will evaluate to TRUE if the property "foobar"
exists and its language is either unknown, English, or a sublanguage
of English.
<or xmlns="DAV:">
<not>
<language-defined>
<prop><foobar/></prop>
</language-defined>
</not>
<language-matches>
<prop><foobar/></prop>
<literal>en</literal>
</language-matches>
</or>
<span class="grey">Reschke, et al. Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.13" href="#section-5.13">5.13</a>. DAV:is-collection</span>
The DAV:is-collection operator allows clients to determine whether a
resource is a collection (that is, whether its DAV:resourcetype
element contains the element DAV:collection).
Rationale: This operator is provided in lieu of defining generic
structure queries, which would suffice for this and for many more
powerful queries, but seems inappropriate to standardize at this
time.
<span class="h4"><a class="selflink" id="section-5.13.1" href="#section-5.13.1">5.13.1</a>. Example of DAV:is-collection</span>
This example shows a search criterion that picks out all, and only,
the resources in the scope that are collections.
<where xmlns="DAV:">
<is-collection/>
</where>
<span class="h3"><a class="selflink" id="section-5.14" href="#section-5.14">5.14</a>. DAV:is-defined</span>
The DAV:is-defined operator allows clients to determine whether a
property is defined on a resource. The meaning of "defined on a
resource" is found in <a href="#section-5.5.3">Section 5.5.3</a>.
Example:
<d:is-defined xmlns:d='DAV:' xmlns:x='http://example.com/ns'>
<d:prop><x:someprop/></d:prop>
</d:is-defined>
<span class="h3"><a class="selflink" id="section-5.15" href="#section-5.15">5.15</a>. DAV:like</span>
The DAV:like is an optional operator intended to give simple
wildcard-based pattern matching ability to clients.
The operator takes two arguments.
The first argument is a DAV:prop element identifying a single
property to evaluate.
The second argument is a DAV:literal element that gives the pattern
matching string.
<span class="grey">Reschke, et al. Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.15.1" href="#section-5.15.1">5.15.1</a>. Syntax for the Literal Pattern</span>
pattern = [wildcard] 0*( text [wildcard] )
wildcard = exactlyone / zeroormore
text = 1*( character / escapeseq )
exactlyone = "_"
zeroormore = "%"
escapechar = "\"
escapeseq = escapechar ( exactlyone / zeroormore / escapechar )
; character: see [<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>], Section 2.2, minus wildcard / escapechar
character = HTAB / LF / CR ; whitespace
character =/ %x20-24 / %x26-5B / %x5D-5E / %x60-D7FF
character =/ %xE000-FFFD / %x10000-10FFFF
(Note that the ABNF above is defined in terms of Unicode code points
([<a href="#ref-UNICODE5" title=""The Unicode Standard - Version 5.0"">UNICODE5</a>]); when a query is transmitted as an XML document over
WebDAV, these characters are typically encoded in UTF-8 or UTF-16.)
The value for the literal is composed of wildcards separated by
segments of text. Wildcards may begin or end the literal.
The "_" wildcard matches exactly one character.
The "%" wildcard matches zero or more characters.
The "\" character is an escape sequence so that the literal can
include "_" and "%". To include the "\" character in the pattern,
the escape sequence "\\" is used.
<span class="h4"><a class="selflink" id="section-5.15.2" href="#section-5.15.2">5.15.2</a>. Example of DAV:like</span>
This example shows how a client might use DAV:like to identify those
resources whose content type was a subtype of image.
<D:where xmlns:D='DAV:'>
<D:like caseless="yes">
<D:prop><D:getcontenttype/></D:prop>
<D:literal>image/%</D:literal>
</D:like>
</D:where>
<span class="h3"><a class="selflink" id="section-5.16" href="#section-5.16">5.16</a>. DAV:contains</span>
The DAV:contains operator is an optional operator that provides
content-based search capability. This operator implicitly searches
<span class="grey">Reschke, et al. Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
against the text content of a resource, not against the content of
properties. The DAV:contains operator is intentionally not overly
constrained, in order to allow the server to do the best job it can
in performing the search.
The DAV:contains operator evaluates to a Boolean value. It evaluates
to TRUE if the content of the resource satisfies the search.
Otherwise, it evaluates to FALSE.
Within the DAV:contains XML element, the client provides a phrase: a
single word or whitespace delimited sequence of words. Servers MAY
ignore punctuation in a phrase. Case-sensitivity is at the
discretion of the server implementation.
The following non-exhaustive list enumerates things that may or may
not be done as part of the search: Phonetic methods such as "soundex"
may or may not be used. Word stemming may or may not be performed.
Thesaurus expansion of words may or may not be done. Right or left
truncation may or may not be performed. The search may be case
insensitive or case sensitive. The word or words may or may not be
interpreted as names. Multiple words may or may not be required to
be adjacent or "near" each other. Multiple words may or may not be
required to occur in the same order. Multiple words may or may not
be treated as a phrase. The search may or may not be interpreted as
a request to find documents "similar" to the string operand.
Character canonicalization such as that done by the Unicode collation
algorithm may or may not be applied.
<span class="h4"><a class="selflink" id="section-5.16.1" href="#section-5.16.1">5.16.1</a>. Result Scoring (DAV:score Element)</span>
Servers SHOULD indicate scores for the DAV:contains condition by
adding a DAV:score XML element to the DAV:response element. Its
value is defined only in the context of a particular query result.
The value is a string representing the score, an integer from zero to
10000 inclusive, where a higher value indicates a higher score (e.g.,
more relevant).
Modified DTD fragment for DAV:propstat:
<!ELEMENT response (href, ((href*, status)|(propstat+)),
responsedescription?, score?) >
<!ELEMENT score (#PCDATA) >
Clients should note that, in general, it is not meaningful to compare
the numeric values of scores from two different query results unless
both were executed by the same underlying search system on the same
collection of resources.
<span class="grey">Reschke, et al. Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.16.2" href="#section-5.16.2">5.16.2</a>. Ordering by Score</span>
To order search results by their score, the DAV:score element may be
added as child to the DAV:orderby element (in place of a DAV:prop
element).
<span class="h4"><a class="selflink" id="section-5.16.3" href="#section-5.16.3">5.16.3</a>. Examples</span>
The example below shows a search for the phrase "Peter Forsberg".
Depending on its support for content-based searching, a server MAY
treat this as a search for documents that contain the words "Peter"
and "Forsberg".
<D:where xmlns:D='DAV:'>
<D:contains>Peter Forsberg</D:contains>
</D:where>
The example below shows a search for resources that contain "Peter"
and "Forsberg".
<D:where xmlns:D='DAV:'>
<D:and>
<D:contains>Peter</D:contains>
<D:contains>Forsberg</D:contains>
</D:and>
</D:where>
<span class="h3"><a class="selflink" id="section-5.17" href="#section-5.17">5.17</a>. Limiting the Result Set</span>
<!ELEMENT limit (nresults) >
<!ELEMENT nresults (#PCDATA)> <!-- only digits -->
The DAV:limit XML element contains requested limits from the client
to limit the size of the reply or amount of effort expended by the
server. The DAV:nresults XML element contains a requested maximum
number of DAV:response elements to be returned in the response body.
The server MAY disregard this limit. The value of this element is an
unsigned integer.
<span class="h4"><a class="selflink" id="section-5.17.1" href="#section-5.17.1">5.17.1</a>. Relationship to Result Ordering</span>
If the result set is both limited by DAV:limit and ordered according
to DAV:orderby, the results that are included in the response
document SHOULD be those that order highest.
<span class="grey">Reschke, et al. Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="section-5.18" href="#section-5.18">5.18</a>. The 'caseless' XML Attribute</span>
The "caseless" attribute allows clients to specify caseless matching
behavior instead of character-by-character matching for DAV:
basicsearch operators.
The possible values for "caseless" are "yes" or "no". The default
value is server-specified. Caseless matching SHOULD be implemented
as defined in <a href="#section-5.18">Section 5.18</a> of the Unicode Standard ([<a href="#ref-UNICODE5" title=""The Unicode Standard - Version 5.0"">UNICODE5</a>]).
Support for the "caseless" attribute is optional. A server should
respond with a status of 422 if it is used but cannot be supported.
<span class="h3"><a class="selflink" id="section-5.19" href="#section-5.19">5.19</a>. Query Schema for DAV:basicsearch</span>
The DAV:basicsearch grammar defines a search criteria that is a
Boolean-valued expression, and allows for an arbitrary set of
properties to be included in the result record. The result set may
be sorted on a set of property values. Accordingly, the DTD for
schema discovery for this grammar allows the server to express:
1. the set of properties that may be either searched, returned, or
used to sort, and a hint about the data type of such properties.
2. the set of optional operators defined by the resource.
<span class="h4"><a class="selflink" id="section-5.19.1" href="#section-5.19.1">5.19.1</a>. DTD for DAV:basicsearch QSD</span>
<!ELEMENT basicsearchschema (properties, operators)>
<!ELEMENT any-other-property EMPTY>
<!ELEMENT properties (propdesc*)>
<!ELEMENT propdesc ((prop|any-other-property), datatype?,
searchable?, selectable?, sortable?,
caseless?)>
<!ELEMENT operators (opdesc*)>
<!ELEMENT opdesc ANY>
<!ATTLIST opdesc allow-pcdata (yes|no) #IMPLIED>
<!ELEMENT operand-literal EMPTY>
<!ELEMENT operand-typed-literal EMPTY>
<!ELEMENT operand-property EMPTY>
The DAV:properties element holds a list of descriptions of
properties.
The DAV:operators element describes the optional operators that may
be used in a DAV:where element.
<span class="grey">Reschke, et al. Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.19.2" href="#section-5.19.2">5.19.2</a>. DAV:propdesc Element</span>
Each instance of a DAV:propdesc element describes the property or
properties in the DAV:prop element it contains. All subsequent
elements are descriptions that apply to those properties. All
descriptions are optional and may appear in any order. Servers
SHOULD support all the descriptions defined here, and MAY define
others.
DASL defines five descriptions. The first, DAV:datatype, provides a
hint about the type of the property value, and may be useful to a
user interface prompting for a value. The remaining four (DAV:
searchable, DAV:selectable, DAV:sortable, and DAV:caseless) identify
portions of the query (DAV:where, DAV:select, and DAV:orderby,
respectively). If a property has a description for a section, then
the server MUST allow the property to be used in that section. These
descriptions are optional. If a property does not have such a
description, or is not described at all, then the server MAY still
allow the property to be used in the corresponding section.
<span class="h5"><a class="selflink" id="section-5.19.2.1" href="#section-5.19.2.1">5.19.2.1</a>. DAV:any-other-property</span>
This element can be used in place of DAV:prop to describe properties
of WebDAV properties not mentioned in any other DAV:prop element.
For instance, this can be used to indicate that all other properties
are searchable and selectable without giving details about their
types (a typical scenario for dead properties).
<span class="h4"><a class="selflink" id="section-5.19.3" href="#section-5.19.3">5.19.3</a>. The DAV:datatype Property Description</span>
The DAV:datatype element contains a single XML element that provides
a hint about the domain of the property, which may be useful to a
user interface prompting for a value to be used in a query. Data
types are identified by an element name. Where appropriate, a server
SHOULD use the simple data types defined in [<a href="#ref-XS2" title=""XML Schema Part 2: Datatypes Second Edition"">XS2</a>].
<!ELEMENT datatype ANY >
<span class="grey">Reschke, et al. Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Examples from [<a href="#ref-XS2" title=""XML Schema Part 2: Datatypes Second Edition"">XS2</a>], Section 3:
+----------------+---------------------+
| Qualified name | Example |
+----------------+---------------------+
| xs:boolean | true, false, 1, 0 |
| xs:string | Foobar |
| xs:dateTime | 1994-11-05T08:15:5Z |
| xs:float | .314159265358979E+1 |
| xs:integer | -259, 23 |
+----------------+---------------------+
If the data type of a property is not given, then the data type
defaults to xs:string.
<span class="h4"><a class="selflink" id="section-5.19.4" href="#section-5.19.4">5.19.4</a>. The DAV:searchable Property Description</span>
<!ELEMENT searchable EMPTY>
If this element is present, then the server MUST allow this property
to appear within a DAV:where element where an operator allows a
property. Allowing a search does not mean that the property is
guaranteed to be defined on every resource in the scope, it only
indicates the server's willingness to check.
<span class="h4"><a class="selflink" id="section-5.19.5" href="#section-5.19.5">5.19.5</a>. The DAV:selectable Property Description</span>
<!ELEMENT selectable EMPTY>
This element indicates that the property may appear in the DAV:select
element.
<span class="h4"><a class="selflink" id="section-5.19.6" href="#section-5.19.6">5.19.6</a>. The DAV:sortable Property Description</span>
This element indicates that the property may appear in the DAV:
orderby element.
<!ELEMENT sortable EMPTY>
<span class="h4"><a class="selflink" id="section-5.19.7" href="#section-5.19.7">5.19.7</a>. The DAV:caseless Property Description</span>
This element only applies to properties whose data type is "xs:
string" and derived data types as per the DAV:datatype property
description. Its presence indicates that comparisons performed for
searches, and the comparisons for ordering results on the string
property will be caseless (the default is character by character).
<!ELEMENT caseless EMPTY>
<span class="grey">Reschke, et al. Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.19.8" href="#section-5.19.8">5.19.8</a>. The DAV:operators XML Element</span>
The DAV:operators element describes every optional operator supported
in a query. (Mandatory operators are not listed since they are
mandatory and permit no variation in syntax.) All optional operators
that are supported MUST be listed in the DAV:operators element.
The listing for an operator, contained in an DAV:opdesc element,
consists of the operator (as an empty element), followed by one
element for each operand. The operand MUST be either DAV:operand-
property, DAV:operand-literal, or DAV:operand-typed-literal, which
indicate that the operand in the corresponding position is a
property, a literal value, or a typed literal value, respectively.
If an operator is polymorphic (allows more than one operand syntax)
then each permitted syntax MUST be listed separately.
The DAV:opdesc element MAY have a "allow-pcdata" attribute
(defaulting to "no"). A value of "yes" indicates that the operator
can contain character data, as it is the case with DAV:contains (see
<a href="#section-5.16">Section 5.16</a>). Definition of additional operators using this format
is NOT RECOMMENDED.
<operators xmlns='DAV:'>
<opdesc>
<like/><operand-property/><operand-literal/>
</opdesc>
</operators>
<span class="grey">Reschke, et al. Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h4"><a class="selflink" id="section-5.19.9" href="#section-5.19.9">5.19.9</a>. Example of Query Schema for DAV:basicsearch</span>
<D:basicsearchschema xmlns:D="DAV:"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<D:properties>
<D:propdesc>
<D:prop><D:getcontentlength/></D:prop>
<D:datatype><xs:nonNegativeInteger/></D:datatype>
<D:searchable/><D:selectable/><D:sortable/>
</D:propdesc>
<D:propdesc>
<D:prop><D:getcontenttype/><D:displayname/></D:prop>
<D:searchable/><D:selectable/><D:sortable/>
</D:propdesc>
<D:propdesc>
<D:prop><fstop xmlns="http://ns.example.org"/></D:prop>
<D:selectable/>
</D:propdesc>
<D:propdesc>
<D:any-other-property/>
<D:searchable/><D:selectable/>
</D:propdesc>
</D:properties>
<D:operators>
<D:opdesc>
<D:like/><D:operand-property/><D:operand-literal/>
</D:opdesc>
<D:opdesc allow-pcdata="yes">
<D:contains/>
</D:opdesc>
</D:operators>
</D:basicsearchschema>
This response lists four properties. The data type of the last three
properties is not given, so it defaults to xs:string. All are
selectable, and the first three may be searched. All but the last
may be used in a sort. Of the optional DAV operators, DAV:contains
and DAV:like are supported.
Note: The schema discovery defined here does not provide for
discovery of supported values of the "caseless" attribute. This
may require that the reply also list the mandatory operators.
<span class="grey">Reschke, et al. Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Internationalization Considerations</span>
Properties may be language-tagged using the xml:lang attribute (see
<a href="./rfc4918#section-4.3">[RFC4918], Section 4.3</a>). The optional operators DAV:language-defined
(<a href="#section-5.12.1">Section 5.12.1</a>) and DAV:language-matches (<a href="#section-5.12.2">Section 5.12.2</a>) allow the
expression of conditions on the language tagging information.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
This section is provided to detail issues concerning security
implications of which DASL applications need to be aware. All of the
security considerations of HTTP/1.1 ([<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>] and WebDAV ([<a href="./rfc4918" title=""HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)"">RFC4918</a>])
also apply to DASL. In addition, this section will include security
risks inherent in the search and retrieval of resource properties and
content.
A query MUST NOT allow clients to retrieve information that wouldn't
have been available through the GET or PROPFIND methods in the first
place. In particular:
o Query constraints on WebDAV properties for which the client does
not have read access need to be evaluated as if the property did
not exist (see <a href="#section-5.5.3">Section 5.5.3</a>).
o Query constraints on content (as with DAV:contains, defined in
<a href="#section-5.16">Section 5.16</a>) for which the client does not have read access need
to be evaluated as if a GET would return a 4xx status code.
A server should prepare for denial-of-service attacks. For example a
client may issue a query for which the result set is expensive to
calculate or transmit because many resources match or must be
evaluated.
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Implications of XML External Entities</span>
XML supports a facility known as "external entities", defined in
Section 4.2.2 of [<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>], which instruct an XML processor to retrieve
and perform an inline include of XML located at a particular URI. An
external XML entity can be used to append or modify the document type
declaration (DTD) associated with an XML document. An external XML
entity can also be used to include XML within the content of an XML
document. For non-validating XML, such as the XML used in this
specification, including an external XML entity is not required by
[<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>]. However, [<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>] does state that an XML processor may, at its
discretion, include the external XML entity.
External XML entities have no inherent trustworthiness and are
subject to all the attacks that are endemic to any HTTP GET request.
<span class="grey">Reschke, et al. Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Furthermore, it is possible for an external XML entity to modify the
DTD, and hence affect the final form of an XML document, in the worst
case significantly modifying its semantics, or exposing the XML
processor to the security risks discussed in [<a href="./rfc3023" title=""XML Media Types"">RFC3023</a>]. Therefore,
implementers must be aware that external XML entities should be
treated as untrustworthy.
There is also the scalability risk that would accompany a widely
deployed application that made use of external XML entities. In this
situation, it is possible that there would be significant numbers of
requests for one external XML entity, potentially overloading any
server that fields requests for the resource containing the external
XML entity.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Scalability</span>
Query grammars are identified by URIs. Applications SHOULD NOT
attempt to retrieve these URIs even if they appear to be retrievable
(for example, those that begin with "http://").
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. IANA Considerations</span>
This document uses the namespace defined in <a href="./rfc4918#section-21">Section 21 of [RFC4918]</a>
for XML elements.
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. HTTP Headers</span>
This document specifies the HTTP header listed below, which has been
added to the permanent HTTP header registry defined in [<a href="./rfc3864" title=""Registration Procedures for Message Header Fields"">RFC3864</a>].
<span class="h4"><a class="selflink" id="section-9.1.1" href="#section-9.1.1">9.1.1</a>. DASL</span>
Header field name: DASL
Applicable protocol: http
Status: standard
Author/Change controller: IETF
Specification document: this specification (<a href="#section-3.2">Section 3.2</a>)
<span class="grey">Reschke, et al. Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Contributors</span>
This document is based on prior work on the DASL protocol done by the
WebDAV DASL working group until the year 2000 -- namely by Alan
Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy, Surendra
Reddy, and Judith Slein (see <<a href="http://www.webdav.org/dasl/">http://www.webdav.org/dasl/</a>> for the
working group's web site,
<<a href="http://purl.org/NET/webdav/dasl-references/reqs">http://purl.org/NET/webdav/dasl-references/reqs</a>> for a requirements
document, and
<<a href="http://purl.org/NET/webdav/dasl-references/dasl-protocol-00">http://purl.org/NET/webdav/dasl-references/dasl-protocol-00</a>> for an
early version of the specification).
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Acknowledgements</span>
This document has benefited from thoughtful discussion by Lisa
Dusseault, Javier Godoy, Sung Kim, Chris Newman, Elias Sinderson,
Martin Wallmer, Keith Wannamaker, Jim Whitehead, and Kevin Wiggen.
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. References</span>
<span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC2616">RFC2616</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee,
"Hypertext Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>,
June 1999.
[<a id="ref-RFC3023">RFC3023</a>] Murata, M., St. Laurent, S., and D. Kohn, "XML Media
Types", <a href="./rfc3023">RFC 3023</a>, January 2001.
[<a id="ref-RFC3253">RFC3253</a>] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J.
Whitehead, "Versioning Extensions to WebDAV (Web
Distributed Authoring and Versioning)", <a href="./rfc3253">RFC 3253</a>,
March 2002.
[<a id="ref-RFC3744">RFC3744</a>] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead,
"Web Distributed Authoring and Versioning (WebDAV)
Access Control Protocol", <a href="./rfc3744">RFC 3744</a>, May 2004.
[<a id="ref-RFC3986">RFC3986</a>] Berners-Lee, T., Fielding, R., and L. Masinter,
"Uniform Resource Identifier (URI): Generic Syntax",
STD 66, <a href="./rfc3986">RFC 3986</a>, January 2005.
<span class="grey">Reschke, et al. Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
[<a id="ref-RFC4918">RFC4918</a>] Dusseault, L., Ed., "HTTP Extensions for Web
Distributed Authoring and Versioning (WebDAV)",
<a href="./rfc4918">RFC 4918</a>, June 2007.
[<a id="ref-RFC5234">RFC5234</a>] Crocker, D., Ed. and P. Overell, "Augmented BNF for
Syntax Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>,
January 2008.
[<a id="ref-XML">XML</a>] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E.,
and F. Yergeau, "Extensible Markup Language (XML) 1.0
(Fourth Edition)", W3C REC-xml-20060816, August 2006,
<<a href="http://www.w3.org/TR/2006/REC-xml-20060816">http://www.w3.org/TR/2006/REC-xml-20060816</a>>.
[<a id="ref-XPATH">XPATH</a>] Clark, J. and S. DeRose, "XML Path Language (XPath)
Version 1.0", W3C REC-xpath-19991116, November 1999,
<<a href="http://www.w3.org/TR/1999/REC-xpath-19991116">http://www.w3.org/TR/1999/REC-xpath-19991116</a>>.
[<a id="ref-XPATHFUNC">XPATHFUNC</a>] Malhotra, A., Melton, J., and N. Walsh, "XQuery 1.0
and XPath 2.0 Functions and Operators", W3C REC-xpath-
functions-20070123, January 2007, <<a href="http://www.w3.org/TR/2007/REC-xpath-functions-20070123/">http://www.w3.org/</a>
<a href="http://www.w3.org/TR/2007/REC-xpath-functions-20070123/">TR/2007/REC-xpath-functions-20070123/</a>>.
[<a id="ref-XS1">XS1</a>] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N.,
and World Wide Web Consortium, "XML Schema Part 1:
Structures", W3C REC-xmlschema-1-20041028,
October 2004,
<<a href="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/</a>>.
[<a id="ref-XS2">XS2</a>] Biron, P., Malhotra, A., and World Wide Web
Consortium, "XML Schema Part 2: Datatypes Second
Edition", W3C REC-xmlschema-2-20041028, October 2004,
<<a href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</a>>.
<span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. Informative References</span>
[<a id="ref-BCP47">BCP47</a>] Phillips, A. and M. Davis, "Matching of Language
Tags", <a href="https://www.rfc-editor.org/bcp/bcp47">BCP 47</a>, <a href="./rfc4647">RFC 4647</a>, September 2006.
[<a id="ref-RFC3864">RFC3864</a>] Klyne, G., Nottingham, M., and J. Mogul, "Registration
Procedures for Message Header Fields", <a href="https://www.rfc-editor.org/bcp/bcp90">BCP 90</a>,
<a href="./rfc3864">RFC 3864</a>, September 2004.
[<a id="ref-RFC4437">RFC4437</a>] Whitehead, J., Clemm, G., and J. Reschke, Ed., "Web
Distributed Authoring and Versioning (WebDAV) Redirect
Reference Resources", <a href="./rfc4437">RFC 4437</a>, March 2006.
<span class="grey">Reschke, et al. Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
[<a id="ref-RFC4790">RFC4790</a>] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet
Application Protocol Collation Registry", <a href="./rfc4790">RFC 4790</a>,
March 2007.
[<a id="ref-SQL99">SQL99</a>] Milton, J., "Database Language SQL Part 2: Foundation
(SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E),
July 1999.
[<a id="ref-UNICODE5">UNICODE5</a>] The Unicode Consortium, "The Unicode Standard -
Version 5.0", Addison-Wesley , November 2006,
<<a href="http://www.unicode.org/versions/Unicode5.0.0/">http://www.unicode.org/versions/Unicode5.0.0/</a>>.
ISBN 0321480910 [<a href="#ref-1">1</a>]
[<a id="ref-WEBDAV-BIND">WEBDAV-BIND</a>] Clemm, G., Crawford, J., Reschke, J., Ed., and J.
Whitehead, "Binding Extensions to Web Distributed
Authoring and Versioning (WebDAV)", October 2008.
URIs
[<a id="ref-1">1</a>] <urn:isbn:0321480910>
<span class="grey">Reschke, et al. Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Three-Valued Logic in DAV:basicsearch</span>
ANSI standard three-valued logic is used when evaluating the search
condition (as defined in the ANSI standard SQL specifications, for
example, in ANSI X3.135-1992, <a href="#section-8.12">Section 8.12</a>, pp. 188-189, <a href="#section-8.2">Section 8.2</a>,
p. 169, General Rule 1)a), etc.).
ANSI standard three-valued logic is undoubtedly the most widely
practiced method of dealing with the issues of properties in the
search condition not having a value (e.g., being null or not defined)
for the resource under scan, and with undefined expressions in the
search condition (e.g., division by zero, etc.). Three valued logic
works as follows.
Undefined expressions are expressions for which the value of the
expression is not defined. Undefined expressions are a completely
separate concept from the truth value UNKNOWN, which is, in fact,
well defined. Property names and literal constants are considered
expressions for purposes of this section. If a property in the
current resource under scan has not been set to a value, then the
value of that property is undefined for the resource under scan.
DASL 1.0 has no arithmetic division operator, but if it did, division
by zero would be an undefined arithmetic expression.
If any subpart of an arithmetic, string, or datetime subexpression is
undefined, the whole arithmetic, string, or datetime subexpression is
undefined.
There are no manifest constants to explicitly represent undefined
number, string, or datetime values.
Since a Boolean value is ultimately returned by the search condition,
arithmetic, string, and datetime expressions are always arguments to
other operators. Examples of operators that convert arithmetic,
string, and datetime expressions to Boolean values are the six
relational operators ("greater than", "less than", "equals", etc.).
If either or both operands of a relational operator have undefined
values, then the relational operator evaluates to UNKNOWN.
Otherwise, the relational operator evaluates to TRUE or FALSE,
depending upon the outcome of the comparison.
The Boolean operators DAV:and, DAV:or, and DAV:not are evaluated
according to the following rules:
not UNKNOWN = UNKNOWN
UNKNOWN and TRUE = UNKNOWN
<span class="grey">Reschke, et al. Standards Track [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
UNKNOWN and FALSE = FALSE
UNKNOWN and UNKNOWN = UNKNOWN
UNKNOWN or TRUE = TRUE
UNKNOWN or FALSE = UNKNOWN
UNKNOWN or UNKNOWN = UNKNOWN
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Candidates for Future Protocol Extensions</span>
This section summarizes issues that have been raised during the
development of this specification, but for which no resolution could
be found with the constraints in place. Future revisions of this
specification should revisit these issues, though.
<span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. Collation Support</span>
Matching and sorting of textual data relies on collations. With
respect to WebDAV SEARCH, a combination of various design approaches
could be used:
o Require server support for specific collations.
o Require that the server can advertise which collations it
supports.
o Allow a client to select the collation to be used.
In practice, the current implementations of WebDAV SEARCH usually
rely on backends they do not control, and for which collation
information may not be available. To make things worse,
implementations of the DAV:basicsearch grammar frequently need to
combine data from multiple underlying stores (such as properties and
full text content), and thus collation support may vary based on the
operator or property.
Another open issue is what collation formalism to support. At the
time of this writing, the two specifications below seem to provide
the necessary framework and thus may be the base for future work on
collation support in WebDAV SEARCH:
1. "Internet Application Protocol Collation Registry" ([<a href="./rfc4790" title=""Internet Application Protocol Collation Registry"">RFC4790</a>]).
2. "XQuery 1.0 and XPath 2.0 Functions and Operators" ([<a href="#ref-XPATHFUNC" title=""XQuery 1.0 and XPath 2.0 Functions and Operators"">XPATHFUNC</a>],
Section 7.3.1).
<span class="grey">Reschke, et al. Standards Track [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
<span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Count</span>
DAV:basicsearch does not allow a request that returns the count of
matching resources.
A protocol extension would need to extend DAV:select, and also modify
the DAV:multistatus response format.
<span class="h3"><a class="selflink" id="appendix-B.3" href="#appendix-B.3">B.3</a>. Diagnostics for Unsupported Queries</span>
There are many reasons why a given query may not be supported by a
server. Query Schema Discovery (<a href="#section-4">Section 4</a>) can be used to discover
some constraints, but not all.
Future revisions should consider the introduction of specific
condition codes (<a href="./rfc4918#section-16">[RFC4918], Section 16</a>) to these situations.
<span class="h3"><a class="selflink" id="appendix-B.4" href="#appendix-B.4">B.4</a>. Language Matching</span>
<a href="#section-5.12.2">Section 5.12.2</a> defines language matching in terms of the XPath "lang"
function ([<a href="#ref-XPATH" title=""XML Path Language (XPath) Version 1.0"">XPATH</a>], Section 4.3). Future revisions should consider
building on [<a href="#ref-BCP47" title=""Matching of Language Tags"">BCP47</a>] instead.
<span class="h3"><a class="selflink" id="appendix-B.5" href="#appendix-B.5">B.5</a>. Matching Media Types</span>
Matching media types using the DAV:getcontenttype property and the
DAV:like operator is hard due to DAV:getcontenttype also allowing
parameters. A new operator specifically designed for the purpose of
matching media types probably would simplify things a lot. See <http
://lists.w3.org/Archives/Public/www-webdav-dasl/2003OctDec/0109.html>
for a specific proposal.
<span class="h3"><a class="selflink" id="appendix-B.6" href="#appendix-B.6">B.6</a>. Query by Name</span>
DAV:basicsearch operates on the properties (and optionally the
contents) of resources, and thus doesn't really allow matching on
parts of the resource's URI. See <<a href="http://lists.w3.org/Archives/Public/www-webdav-dasl/2003OctDec/0100.html">http://lists.w3.org/Archives/</a>
<a href="http://lists.w3.org/Archives/Public/www-webdav-dasl/2003OctDec/0100.html">Public/www-webdav-dasl/2003OctDec/0100.html</a>> for a proposed extension
covering this use case.
<span class="h3"><a class="selflink" id="appendix-B.7" href="#appendix-B.7">B.7</a>. Result Paging</span>
A frequently discussed feature is the ability to specifically request
the "next" set of results, when either the server decided to truncate
the result, or the client explicitly asked for a limited set (for
instance, using the DAV:limit element defined in <a href="#section-5.17">Section 5.17</a>).
<span class="grey">Reschke, et al. Standards Track [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
In this case, it would be desirable if the server could keep the full
query result, and provide a new URI identifying a separate result
resource, allowing the client to retrieve additional data through GET
requests, and remove the result through a DELETE request.
<span class="h3"><a class="selflink" id="appendix-B.8" href="#appendix-B.8">B.8</a>. Search Scope Discovery</span>
Given a Search Arbiter resource, there's currently no way to discover
programmatically the supported sets of search scopes. Future
revisions of this specification could specify a scope discovery
mechanism, similar to the Query Schema Discovery defined in
<a href="#section-4">Section 4</a>.
Index
C
caseless attribute 26-27, 34
Condition Names
DAV:search-grammar-discovery-supported (pre) 9
DAV:search-grammar-supported (pre) 9
DAV:search-multiple-scope-supported (pre) 9
DAV:search-scope-valid (pre) 9
Criteria 5
D
DAV:and 26
DAV:ascending 26
DAV:contains 31
DAV:depth 23
DAV:descending 26
DAV:eq 27
caseless attribute 27
DAV:from 23
DAV:gt 27
DAV:gte 27
DAV:include-versions 23
DAV:is-collection 30
DAV:is-defined 30
DAV:language-defined 29
DAV:language-matches 29
DAV:like 30
DAV:limit 33
DAV:literal 27
DAV:lt 27
DAV:lte 27
DAV:not 26
DAV:nresults 33
DAV:or 26
<span class="grey">Reschke, et al. Standards Track [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
DAV:orderby 26
DAV:scope 23
DAV:score 32
relationship to DAV:orderby 33
DAV:search-grammar-discovery-supported precondition 9
DAV:search-grammar-supported precondition 9
DAV:search-multiple-scope-supported precondition 9
DAV:search-scope-valid precondition 9
DAV:select 23
DAV:supported-query-grammar-set property 14
DAV:typed-literal 28
DAV:where 24
M
Methods
SEARCH 7
O
OPTIONS method 13
DASL response header 14
P
Properties
DAV:supported-query-grammar-set 14
Q
Query 5
Query Grammar 5
Query Grammar Discovery 13
using live property 13
using OPTIONS 13
Query Schema 5
R
Result 5
Result Record 5
Result Record Definition 5
Result Set 5
Result Set Truncation
Example 10
S
Scope 6
Search Arbiter 6
SEARCH method 7
Search Modifier 6
Sort Specification 6
<span class="grey">Reschke, et al. Standards Track [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc5323">RFC 5323</a> WebDAV SEARCH November 2008</span>
Authors' Addresses
Julian F. Reschke (editor)
greenbytes GmbH
Hafenweg 16
Muenster, NW 48155
Germany
Phone: +49 251 2807760
EMail: julian.reschke@greenbytes.de
URI: <a href="http://greenbytes.de/tech/webdav/">http://greenbytes.de/tech/webdav/</a>
Surendra Reddy
Mitrix, Inc.
303 Twin Dolphin Drive, Suite 600-37
Redwood City, CA 94065
U.S.A.
Phone: +1 408 500 1135
EMail: Surendra.Reddy@mitrix.com
Jim Davis
27 Borden Street
Toronto, Ontario M5S 2M8
Canada
Phone: +1 416 929 5854
EMail: jrd3@alum.mit.edu
URI: <a href="http://www.econetwork.net/~jdavis">http://www.econetwork.net/~jdavis</a>
Alan Babich
IBM Corporation
3565 Harbor Blvd.
Costa Mesa, CA 92626
U.S.A.
Phone: +1 714 327 3403
EMail: ababich@us.ibm.com
Reschke, et al. Standards Track [Page 49]
</pre>
|