summaryrefslogtreecommitdiff
path: root/standards/rfc3382.txt
blob: 4181c5bc5c3a706c15e96b873a089e07fea4cd85 (plain)
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
Network Working Group                                           R. deBry
Request for Comments: 3382                     Utah Valley State College
Updates: 2910, 2911                                           R. Herriot
Category: Standards Track                                     Consultant
                                                             T. Hastings
                                                                 K. Ocke
                                                               P. Zehler
                                                       Xerox Corporation
                                                          September 2002


                   Internet Printing Protocol (IPP):
                   The 'collection' attribute syntax

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) The Internet Society (2002).  All Rights Reserved.

Abstract

   This document specifies an OPTIONAL attribute syntax called
   'collection' for use with the Internet Printing Protocol (IPP/1.0 and
   IPP/1.1).  A 'collection' is a container holding one or more named
   values, which are called "member" attributes.  A collection allows
   data to be grouped like a PostScript dictionary or a Java Map.  This
   document also specifies the conformance requirements for a definition
   document that defines a collection attribute.  Finally, this document
   gives some illustrative example collection attribute definitions that
   are not intended as actual attribute specifications.

Table of Contents

   1 Introduction.....................................................3
   1.1 Problem Statement..............................................3
   1.2 Solution.......................................................3
   2 Terminology......................................................4
   2.1 Conformance Terminology........................................4
   2.2 Other terminology..............................................5
   3 Definition of a Collection Attribute.............................5
   3.1 Information to Include.........................................5



deBry, et. al.              Standards Track                     [Page 1]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   3.2 Nested Collections.............................................9
   4 Collection Attributes as Attributes in Operations................9
   4.1 General Rules..................................................9
   4.2 Unsupported Values.............................................9
   5 Example definition of a collection attribute.....................9
   5.1 media-col (collection)........................................10
   5.1.1 media-color (type3 keyword | name(MAX)......................10
   5.1.2 media-size (collection).....................................11
   5.2 media-col-default (collection)................................11
   5.3 media-col-ready (1setOf collection)...........................12
   5.4 media-col-supported (1setOf type2 keyword)....................12
   6 A Second Example Definition Of A Collection Attribute...........12
   7 Encoding........................................................13
   7.1 Additional tags defined for representing a collection
       attribute value...............................................13
   7.2 Example encoding: "media-col" (collection)....................14
   8 Legacy issues...................................................20
   9 IANA Considerations.............................................20
   10 Internationalization Considerations............................20
   11 Security Considerations........................................21
   12 References.....................................................21
   Appendix A: Encoding Example of a Simple Collection (Informative).22
   Appendix B: Encoding Example of 1setOf Collection (Informative)...25
   Appendix C: Encoding Example of Collection containing 1setOf XXX
               attribute (Informative)...............................31
   Appendix D: Description of the Base IPP Documents (Informative)...35
   Authors' Addresses................................................36
   Full Copyright Statement..........................................38

Table of Tables

   Table 1 - "media-col" member attributes...........................10
   Table 2 - "media-size" collection member attributes...............11
   Table 3 - Tags defined for encoding the 'collection' attribute
             syntax .................................................13
   Table 4 - Overview Encoding of "media-col" collection.............15
   Table 5 - Example Encoding of "media-col" collection..............16
   Table 6 - Overview Encoding of simple collection..................22
   Table 7 - Example Encoding of simple collection...................22
   Table 8 - Overview Encoding of 1setOf collection..................25
   Table 9 - Example Encoding of 1setOf collection...................26
   Table 10 - Overview Encoding of collection with 1setOf value......31
   Table 11 - Example Encoding of collection with 1setOf value.......32








deBry, et. al.              Standards Track                     [Page 2]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


1 Introduction

   This document is an OPTIONAL extension to IPP/1.0 [RFC2565, RFC2566]
   and IPP/1.1 [RFC2911, RFC2910].  For a description of the base IPP
   documents see Appendix D.

1.1 Problem Statement

   The IPP Model and Semantics [RFC2911] supports most of the common
   data structures that are available in programming languages.  It
   lacks a mechanism for grouping several attributes of different types.
   The Java language uses the Map to solve this problem and PostScript
   has a dictionary.  The new mechanism for grouping attributes together
   (called 'collection' mechanism) must allow for optional members and
   the subsequent addition of new members.

   The 'collection' mechanism must be encoded in a manner consistent
   with existing 1.0 and 1.1 parsing rules (see [RFC2910]).  Current 1.0
   and 1.1 parsers that don't support the 'collection' mechanism must
   not confuse collections or parts of a collection they receive with
   other attributes.

1.2 Solution

   The new mechanism is a new IPP attribute syntax called a
   'collection'.  As such, each collection value is a value of an
   attribute whose attribute syntax type is defined to be a
   'collection'.  Such an attribute is called a collection attribute.
   The name of the collection attribute serves to identify the
   collection value in an operation request or response, as with any
   attribute value.

   The 'collection' attribute syntax is a container holding one or more
   named values (i.e., attributes), which are called member attributes.
   Each collection attribute definition document lists the mandatory and
   optional member attributes of each collection value.  A collection
   value is similar to an IPP attribute group in a request or a
   response, such as the operation attributes group.  They both consist
   of a set of attributes.

   As with any attribute syntax, the document that defines a collection
   attribute specifies whether the attribute is single-valued
   (collection) or multi-valued (1setOf collection).  If the attribute
   is multi-valued (1setOf collection), each collection value MUST be a
   separate instance of a single definition of a collection, i.e., it
   MUST have the same member attributes except for OPTIONAL member
   attributes.  If we view each collection definition as a separate
   syntax type, this rule continues the IPP/1.1 notion that each



deBry, et. al.              Standards Track                     [Page 3]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   attribute has a single type or pattern (e.g., "keyword | name" is a
   pattern).  Without this rule, the supported values would be more
   difficult to describe and the mechanism defined in item 4 of section
   3.1 would not be sufficient.

   The name of each member attribute MUST be unique for a collection
   attribute, but MAY be the same as the name of a member attribute in
   another collection attribute and/or MAY be the same as the name of an
   attribute that is not a member of a collection.  The rules for naming
   member attributes are given in section 3.1.

   Each member attribute can have any attribute syntax type, including
   'collection', and can be either single-valued or multi-valued.  The
   length of a collection value is not limited.  However, the length of
   each member attribute MUST NOT exceed the limit of its attribute
   syntax.

   The member attributes in a collection MAY be in any order in a
   request or response.  When a client sends a collection attribute to
   the Printer, the order that the Printer stores the member attributes
   of the collection value and the order returned in a response MAY be
   different from the order sent by the client.

   A collection value MUST NOT contain two or more member attributes
   with the same attribute name.  Such a collection is mal-formed.
   Clients MUST NOT submit such malformed requests and Printers MUST NOT
   return such malformed responses.  If such a malformed request is
   submitted to a Printer, the Printer MUST (depending on
   implementation) either (1) reject the request with the 'client-
   error-bad-request' status code (see [RFC2911] section 13.1.4.1), or
   (2) accept the request and use only one of each duplicate member
   attributes.

2 Terminology

   This section defines terminology used throughout this document.

2.1 Conformance Terminology

   Capitalized terms, such as MUST, MUST NOT, REQUIRED, SHOULD, SHOULD
   NOT, MAY, NEED NOT, and OPTIONAL, have special meaning relating to
   conformance as defined in BCP 14, RFC 2119 [RFC2119] and [RFC2911],
   section 12.1.  If an implementation supports the extension defined in
   this document, then these terms apply; otherwise, they do not.  These
   terms define conformance to this document only; they do not affect
   conformance to other documents, unless explicitly stated otherwise.





deBry, et. al.              Standards Track                     [Page 4]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


2.2 Other terminology

   This document uses terms such as Job object (or Job), IPP Printer
   object (or Printer), "operation", "request", response", "attributes",
   "keywords", and "support".  These terms have special meaning and are
   defined in the model terminology [RFC2911] section 12.2.  The
   following additional terms are introduced in this document:

      collection: an attribute syntax in which each attribute value is a
         set of attributes, called member attributes.

      member attribute: an attribute that is defined to be used as one
         of the attributes in a collection.

      collection attribute: an attribute whose definition specifies the
         'collection' attribute syntax and each of the member attributes
         that MAY occur in a collection attribute value.

3 Definition of a Collection Attribute

   This section describes the requirements for any collection attribute
   definition.

3.1 Information to Include

   When a specification document defines an "xxx" collection attribute,
   i.e., an attribute whose attribute syntax type is 'collection' or
   '1setOf collection'; the definition document MUST include the
   following aspects of the attribute semantics.  Suppose the "xxx"
   collection attribute contains N member attributes named  "aaa1",
   "aaa2", ..., "aaaN" ("aaaI" represents any one of these N member
   attributes).

   1. The name of the collection attribute MUST be specified  (e.g.,
      "xxx").  The selection of the name "xxx" MUST follow the same
      rules for uniqueness as for attributes of any other syntax type,
      (as defined by IPP/1.1) unless "xxx" is a member attribute of
      another collection.  Then the selection of the name "xxx" MUST
      follow the rules for uniqueness defined in item 5a) of this list.

   2. The collection attribute syntax MUST be of type 'collection' or
      '1setOf collection'.

   3. The context of the collection attribute MUST be specified, i.e.,
      whether the attribute is an operation attribute, a Job Template
      attribute, a Job Description attribute, a Printer Description
      attribute, a member attribute of a particular collection
      attribute, etc.



deBry, et. al.              Standards Track                     [Page 5]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   4. An "xxx-supported" attribute MUST be specified and it has one of
      the following two forms:

      a) "xxx-supported" is a "1setOf collection", which enumerates all
         of the supported collection values of "xxx".  If a collection
         of this form contains a nested collection, it MUST be of the
         same form.

         For example, "media-size-supported" might have the values {{x-
         dimension:210, y-dimension:297},{x-dimension:297, y-
         dimension:420}} to show that it supports two values of "media
         size": A4 (210x297) and A3 (297x420).  It does not support
         other combinations of "x-dimension" and "y-dimension" member
         attributes, such as 210x420 or 297x297, and it does not support
         non-enumerated values, such as 420x595.

      b) "xxx-supported" is a "1setOf type2 keyword", which enumerates
         the names of all of the member attributes of "xxx": "aaa1",
         "aaa2", ..., "aaaN".  If a collection of this form contains a
         nested collection, it MAY be of either form.  See item 5f)
         below for details on supported values of member attributes.

         For example, "media-col-supported" might have the keyword
         values: "media-size" and "media-color".

   5. The member attributes MUST be defined.  For each member attribute,
      the definition document MUST provide the following information:

      a) The member attribute's name (e.g., "aaa") MUST be unique within
         the collection being defined and MUST either:

           i) reuse the attribute name of another attribute (that is
              unique across the entire IPP attribute name space) and
              have the same syntax and semantics as the reused attribute
              (if the condition of item 4b) above is met).  For example,
              a member attribute definition could reuse the IPP/1.1
              "media" attribute.

          ii) potentially occur elsewhere in the entire IPP attribute
              name space.  (if the condition of item 4a) above is met).
              For example, a member attribute could be "x-dimension",
              which could potentially occur in another collection or as
              an attribute outside of a collection.

         iii) be unique across the entire IPP attribute name space (if
              the condition of item 4b) above is met).  For example, a
              member attribute could be "media-color" which must be
              unique across the entire IPP attribute name space.



deBry, et. al.              Standards Track                     [Page 6]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      b) Whether the member attribute is REQUIRED or OPTIONAL for the
         Printer to support.

      c) Whether the member attribute is REQUIRED or OPTIONAL for the
         client to supply in a request.

      d) The member attribute's syntax type, which can be any attribute
         syntax, including '1setOf X', 'collection', and '1setOf
         collection'.  If this attribute name reuses the name of another
         attribute (case of item a1 above), it MUST have the same
         attribute syntax, including cardinality (whether or not
         1setOf).

      e) The semantics of the "aaa" member attribute.  The semantic
         definition MUST include a description of any constraint or
         boundary conditions the member attribute places on the
         associated attribute, especially if the attribute reuses the
         name of another attribute (case of item a1 above).

      f) The supported values for each "aaaI" member attribute (of the
         member attributes  "aaa1", "aaa2", ..., "aaaN") is specified by
         one of two mechanisms.

           i) If "xxx-supported" is a "1setOf collection" (see item 4a)
              above), the value for each "aaaI" is specified in each
              collection value of "xxx-supported", in the context of
              other member attributes.  That is, "xxx-supported"
              enumerates all supported values of "xxx".

          ii) If the value of "xxx-supported" is a "1setOf type2
              keyword" (see item 4b) above), the supported values of
              "aaaI" are the values specified by either i) the "aaaI-
              supported" attribute or ii) the definition of the member
              attribute "aaaI" within the document defining the "xxx"
              attribute.  The values of each member attribute "aaaI" are
              specified independently of other member attributes, though
              a Printer is not required to support all combinations of
              supported values.

              For example, "media-col-supported" might have the keyword
              values: "media-size" and "media-color".  Using the first
              method for defining supported values (an "aaaI-supported"
              attribute), the collection values of "media-col" are
              combinations of values of "media-size-supported" and
              "media-color-supported".  If "media-size-supported" has
              the values of '210x297' and '297x420' and "media-color-
              supported" has the values of 'white' and 'pink', the




deBry, et. al.              Standards Track                     [Page 7]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


              Printer might support only the combinations 'white-
              210x297', 'pink-210x297' and 'white-297x420', and not
              'pink-297x420'.

              If a collection contains a member "aaaI", whose syntax
              type is "text", the supported values would probably be
              defined by the definition of "xxx" rather than by the
              attribute "aaaI-supported".

      g) the default value of each "aaaI" member attribute if it is
         OPTIONAL for a client to supply the "aaa" member attribute in a
         request.  The default value is specified by the attribute's
         definition within a document and MUST be one of the following:

           i) a fixed default

          ii) a mechanism by which the Printer determines default

         iii) an indefinite default that is left to the implementation.

          iv) an attribute that the Printer uses to determine the
              default

   6. The default value of "xxx", if a client does not supply it.  The
      default value is specified by the attribute's definition within a
      document and MUST be one of the following:

      a) a fixed default

      b) a mechanism by which the Printer determines default

      c) an indefinite default that is left to the implementation

      d) a Printer attribute "xxx-default" which is a collection with
         the same member attributes as "xxx".  If optional member
         attributes are absent, the Printer uses the defaulting rules of
         item 5g) above.

   7. The "xxx-ready (1setOf collection)" attribute, if human
      intervention is required to make many of the supported values
      available.  For example, "media-col" is an attribute which has a
      "ready" attribute.  Most attributes do not have a "ready"
      attribute.








deBry, et. al.              Standards Track                     [Page 8]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


3.2 Nested Collections

   A member attribute may have a syntax type of 'collection' or '1setOf
   collection', in which case it is called a nested collection
   attribute.  The rules for a nested collection attribute are the same
   as for a collection attribute as specified in section 3.1.

4 Collection Attributes as Attributes in Operations

4.1 General Rules

   A collection value is like any other IPP/1.1 value, except that it is
   structured.  The rules for attributes with collection values are the
   same as for attributes of any other syntax type (see IPP/1.1), be
   they in any group of a request of a response.

4.2 Unsupported Values

   The rules for returning an unsupported collection attribute are an
   extension to the current rules:

   1. If the entire collection attribute is unsupported, then the
      Printer returns just the collection attribute name with the
      'unsupported' out-of-band value (see the beginning of [RFC2911]
      section 4.1) in the Unsupported Attributes Group.

   2. If a collection contains unrecognized, unsupported member
      attributes and/or conflicting values, the attribute returned in
      the Unsupported Group is a collection containing the unrecognized,
      unsupported member attributes, and/or conflicting values.  The
      unrecognized member attributes have an out-of-band value of
      'unsupported' (see the beginning of [RFC2911] section 4.1).  The
      unsupported member attributes and conflicting values have their
      unsupported or conflicting values.

5 Example definition of a collection attribute

   In some printing environments, it is desirable to allow the client to
   select the media by its properties, e.g., weight, color, size, etc.,
   instead of by name.  In IPP/1.1 (see [RFC2911]), the "media (type3
   keyword | name) Job Template attribute allows selection by name.  It
   is tempting to extend the "media" attribute syntax to include
   "collection", but then existing clients could not understand default
   or supported media values that use the collection value.  To preserve
   interoperability, a new attribute MUST BE added, e.g., "media-col
   (collection)".  The following subsections contain a sample definition
   of a simplified "media-col" attribute.  The definition follows the
   rules in section 3.



deBry, et. al.              Standards Track                     [Page 9]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   All of the example attribute definitions in this document are
   illustrative examples, rather than actual definitions.  These
   examples are intended to illustrate how to define collection
   attributes.  Other documents MUST define collection attributes for
   use in actual interchange.  Such definitions may be very similar to
   the examples in this document, since we attempted to pick useful
   examples.

   Note: we picked the name "media-col" because the name "media" is
   already in use.  Ordinarily the collection attribute would have a
   name like any other attribute and would not end in "col".

   The member attributes of "media-col" attribute ("media-color (type 3
   keyword)" and "media-size (collection)") both follow the naming rules
   of item 4a3 of section 3, i.e., the names are unique across the
   entire IPP attribute name space.  The member attributes of the
   "media-size (collection)" member attribute ("x-dimension
   (integer(0:MAX))" and "y-dimension (integer(0:MAX))") both follow the
   naming rules of item 4a2 of section 3, i.e., they potentially occur
   elsewhere in the IPP attribute name space.

5.1 media-col (collection)

   The "media-col" (collection) attribute augments the IPP/1.1 [RFC2911]
   "media" attribute.  This collection attribute enables a client end
   user to submit a list of media characteristics to the Printer.  When
   the client specifies media using the "media-col" collection
   attribute, the Printer object MUST match the requested media exactly.
   The 'collection' consists of the following member attributes:

                  Table 1 - "media-col" member attributes

        Attribute name  attribute syntax             request  Printer
                                                              Support

        media-color     type3 keyword | name (MAX)   MAY      MUST

        media-size      collection                   MUST     MUST

   The definitions for the member attributes is given in the following
   sub-sections:

5.1.1 media-color (type3 keyword | name(MAX)

   This member attribute identifies the color of the media.  Valid
   values are 'red', 'white' and 'blue'.





deBry, et. al.              Standards Track                    [Page 10]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   The "media-color-supported" (1setOf (type3 keyword | name(MAX)))
   Printer attribute identifies the values of this "media-color" member
   attribute that the Printer supports, i.e., the colors supported.

   If the client omits this member attribute, the Printer determines the
   value in an implementation dependent manner.

5.1.2 media-size (collection)

   This member attribute identifies the size of the media.  The
   'collection' consists of the member attributes shown in Table 2:

            Table 2 - "media-size" collection member attributes

        Attribute name    attribute syntax      request   Printer
                                                          Support

        x-dimension       integer (0:MAX)       MUST      MUST

        y-dimension       integer (0:MAX)       MUST      MUST

   The definitions for the member attributes are given in the following
   sub-sections:

5.1.2.1  x-dimension (integer(0:MAX))

   This attribute identifies the width of the media in inch units along
   the X axis.

5.1.2.2  y-dimension (integer(0:MAX))

   This attribute identifies the height of the media in inch units along
   the Y axis.

   The "media-size-supported" (1setOf collection) Printer attribute
   identifies the values of this "media-size" member attribute that the
   Printer supports, i.e., the size combinations supported.  The names
   of the member attributes are the same as the member attributes of the
   "media-size" collection attribute, namely "x-dimension", and "y-
   dimension", since they have the same attribute syntax and the same
   semantics.

5.2 media-col-default (collection)

   The "media-col-default" Printer attribute specifies the media that
   the Printer uses, if any, if the client omits the "media-col" and
   "media".  Job Template attributes in the Job Creation operation and
   the PDL do not include a media specification.  The member attributes



deBry, et. al.              Standards Track                    [Page 11]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   are defined in Table 1.  A Printer MUST support the same member
   attributes for this default collection attribute as it supports for
   the corresponding "media-col" Job Template attribute.

5.3 media-col-ready (1setOf collection)

   The "media-col-ready" Printer attribute identifies the media that are
   available for use without human intervention, i.e., the media that
   are ready to be used without human intervention.  The collection
   value MUST have all of the member attributes that are supported in
   Table 1.

5.4 media-col-supported (1setOf type2 keyword)

   The "media-col-supported" Printer attribute identifies the keyword
   names of the member attributes supported in the "media-col"
   collection Job Template attribute, i.e., the keyword names of the
   member attributes in Table 1 that the Printer supports.

6 A Second Example Definition Of A Collection Attribute

   All of the example attribute definitions in this document are
   illustrative examples, rather than actual definitions.  These
   examples are intended to illustrate how to define collection
   attributes.  Other documents MUST define collection attributes for
   use in actual interchange.  Such definitions may be very similar to
   the examples in this document, since we attempted to pick useful
   examples.

   In some printing environments, it is desirable to allow the client to
   select the media for the job start sheet.  The reason for not adding
   the 'collection' attribute syntax to the existing "job-sheets" Job
   Template attribute is the same as for "media".  Instead, a new Job
   Template attribute is introduced, e.g., "job-sheet-col (collection)".

   The member attributes of "job-sheet-col" attribute ("job-sheets (type
   3 keyword)" and "media (type3 keyword | name)") both follow the
   naming rules of item 4a1 of section 3, i.e., they reuse existing IPP
   attributes.  According to the rules, their supported values come from
   the existing IPP attributes: "job-sheets-supported" and "media-
   supported".  However, their default values do not come from "job-
   sheets-default" and "media-default", respectively.  Rather, the
   definition of "job-sheet-col" says that "job-sheets (type 3 keyword)"
   is required and if "media (type3 keyword | name)" is absent, the
   Printer uses the same media as the rest of the job uses.






deBry, et. al.              Standards Track                    [Page 12]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   If "job-sheet-col" attribute was defined to contain the member
   attribute "job-sheet-media (type3 keyword | name)" instead of "media
   (type3 keyword | name)", then the definition would also have to
   specify a "job-sheet-media-supported (1setOf (type3 keyword | name))"
   whose values would be independent of "media-supported (1setOf (type3
   keyword | name))" and would be set separately by a System
   Administrator.

   The actual text for the definition of the attribute is left as an
   exercise for the reader.

7 Encoding

   This section defines the additional encoding tags used according to
   [RFC2910] and gives an example of their use.  The encoding tags
   defined in this document MUST be used by all collection attributes
   defined in other documents.  However, the example of their use is
   illustrative only.

7.1 Additional tags defined for representing a collection attribute
    value

   The 'collection' attribute syntax uses the tags defined in Table 3.

   Table 3 - Tags defined for encoding the 'collection' attribute syntax

        Tag name         Tag
                         value     Meaning

        begCollection    0x34      Begin the collection attribute value.

        endCollection    0x37      End the collection attribute value.

        memberAttrName   0x4A      The value is the name of the
                                   collection member attribute

   When encoding a collection attribute "xxx" that contains an attribute
   "aaa" and is not inside another collection, the encoding follows
   these rules:

   1. The beginning of the collection is indicated with a value tag that
      MUST be syntax type 'begCollection' (0x34) with a name length and
      Name field that represent the name of the collection attribute
      ("xxx") as with any attribute, followed by a value.  The Printer
      MAY ignore the value and its length MAY be 0.  In the future,
      however, this field MAY contain useful information, such as the
      collection name (cf. the name of a C struct).




deBry, et. al.              Standards Track                    [Page 13]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   2. Each member attribute is encoded as a sequence of two or more
      values that appear to be part of a single multi-valued attribute,
      i.e., 1setOf.  The first value after the 'begCollection' value has
      the attribute syntax, 'memberAttrName' (0x4A), and its value holds
      the name of the first member attribute (e.g., "aaa").  The second
      value holds the first member's attribute value, which can be of
      any attribute syntax, except 'memberAttrName' or 'endCollection'.
      If the first member's attribute value is multi-valued, the third
      value holds the second value of the first member's value.
      Otherwise, the third value holds the name of second member
      attribute (e.g., "bbb"), and its attribute syntax is
      'memberAttrName'.  In this case, the fourth member's value is the
      value of "bbb".

      Note that the technique of encoding a 'collection' as a '1setOf'
      makes it easy for a Printer that doesn't support a particular
      collection attribute (or the collection attribute syntax at all)
      to simply skip over the entire collection value.

   3. The end of the collection is indicated with a value tag that MUST
      be syntax type 'endCollection' (e.g., 0x37) and MAY have a zero
      name length and a zero value length.  In the future, this field
      MAY contain useful information, such as the collection name that
      matches the one in the 'begCollection' .

   4. It is valid to have a member attribute that is itself, a
      collection attribute, i.e., collections can be nested within
      collections.  This is represented by the occurrence of a member
      attribute that is of attribute syntax type 'begCollection'.  Such
      a collection is terminated by a matching 'endCollection'.  The
      name of such a member attribute is in the immediately preceding
      value, whose syntax type is 'memberAttrName'.

   5. It is valid for a collection attribute to be multi-valued, i.e.,
      have more than one collection value.  If the next attribute
      immediately following the 'endCollection' has a zero name length
      and a tag of 'begCollection', then the collection attribute is a
      multi-valued collection, as with any attribute.  This statement
      applies to collections within collections and collections that are
      not in collections.

7.2 Example encoding: "media-col" (collection)

   The collection specified in section 5 is used for the encoding
   example shown in Table 5.  The example also shows nested collections,
   since the "media-size" member attribute is a 'collection.  The
   encoding example represents a blue 4x6-index card and takes 216
   octets.  The Appendices contain more complex examples.



deBry, et. al.              Standards Track                    [Page 14]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   Additional examples have been included in the appendices.

   The overall structure of the two collection values can be pictorially
   represented as:

      "media-col" =
        {  "media-color" =  'blue';
           "media-size" =
           {    "x-dimension" = 6;
                "y-dimension" = 4
             }
        },

   The full encoding is in table 5.  A simplified view of the encoding
   looks like this:

           Table 4 - Overview Encoding of "media-col" collection

      Tag Value             Name                  Value

      begCollection         media-col             ""

      memberAttrName        ""                    media-color

      keyword               ""                    blue

      memberAttrName        ""                    media-size

      begCollection         ""                    ""

      memberAttrName        ""                    x-dimension

      integer               ""                    6

      memberAttrName        ""                    y-dimension

      integer               ""                    4

      endCollection         ""                    ""

      endCollection         ""                    ""










deBry, et. al.              Standards Track                    [Page 15]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


           Table 5 - Example Encoding of "media-col" collection

      Octets       Symbolic Value  Protocol   comments
                                   field

      0x34         begCollection   value-tag  beginning of the "media-
                                              col" collection attribute

      0x0009                       name-      length of (collection)
                                   length     attribute name

      media-col    media-col       name       name of (collection)
                                              attribute

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "media-color"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of "media-color"
                                   length     keyword

      media-color  media-color     value      value is name of 1st
                                              member attribute


      0x44         keyword type    value-tag  keyword type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)








deBry, et. al.              Standards Track                    [Page 16]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0004                       value-
                                   length

      blue         blue            value      value of 1st member
                                              attribute


      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "media-size"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000A                       value-     length of "media-size"
                                   length     keyword

      media-size   media-size      value      Name of 2nd member
                                              attribute

      0x34         begCollection   value-tag  Beginning of the "media-
                                              size" collection attribute
                                              which is a sub-collection

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     collection attribute names
                                   length     have no value

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "x-dimension"








deBry, et. al.              Standards Track                    [Page 17]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of "x-dimension"
                                   length     keyword

      x-dimension  x-dimension     value      name of  1st sub-
                                              collection member
                                              attribute


      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0006                       value      value of  1st sub-
                                              collection member
                                              attribute

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "y-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of the "y-
                                   length     dimension" keyword








deBry, et. al.              Standards Track                    [Page 18]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      y-dimension  y-dimension     value      name of  2nd sub-
                                              collection member
                                              attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0004                       value      value of  2nd sub-
                                              collection member
                                              attribute

      0x37         endCollection   value-tag  end of the sub-collection

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x37         endCollection   value-tag  end of the 1st collection
                                              value in 1setOf

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf










deBry, et. al.              Standards Track                    [Page 19]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

8 Legacy issues

   IPP 1.x Printers and Clients will gracefully ignore collections and
   its member attributes if it does not understand the collection.  The
   begCollection and endCollection elements each look like an attribute
   with an attribute syntax that the recipient doesn't support and so
   should ignore the entire attribute.  The individual member attributes
   and their values will look like a 1setOf values of the collection
   attribute, so that the Printer simply ignores the entire attribute
   and all of its values.  Returning unsupported attributes is also
   simple, since only the name of the collection attribute is returned
   with the 'unsupported' out-of-band value (see section 4.2).

9 IANA Considerations

   The following table provides registration for the 'collection'
   attribute syntax defined in this document.  This is to be registered
   according to the procedures in RFC 2911 [RFC2911] section 6.3.

   Tag value:      Attribute Syntaxes:            Ref.      Section:
   collection                                     RFC 3382         3
     0x34          begCollection                  RFC 3382       7.1
     0x37          endCollection                  RFC 3382       7.1
     0x4A          memberAttrName                 RFC 3382       7.1

   The resulting attribute syntax registration will be published in the
   http://www.iana.org/assignments/ipp-registrations registry.

10 Internationalization Considerations

   This attribute syntax by itself has no impact on
   internationalization.  However, the member attributes that are
   subsequently defined for use in a collection may have
   internationalization considerations, as may any attribute, according
   to [RFC2911].




deBry, et. al.              Standards Track                    [Page 20]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


11 Security Considerations

   This attribute syntax causes no more security concerns than any other
   attribute syntax.  It is only the attributes that are subsequently
   defined, to use this or any other attribute syntax, that may have
   security concerns, depending on the semantics of the attribute,
   according to [RFC2911].

12 References

12.1 Normative References

   [RFC2910] Herriot, R., Butler, S., Moore, P. and R. Turner, "Internet
             Printing Protocol/1.1: Encoding and Transport", RFC 2910,
             September 2000.

   [RFC2911] Isaacson, S., deBry, R., Hastings, T., Herriot, R. and P.
             Powell, "Internet Printing Protocol/1.1: Model and
             Semantics", RFC 2911, September 2000.

12.2 Informative References

   [RFC2565] Herriot, R., Butler, S., Moore, P. and R. Tuner, "Internet
             Printing Protocol/1.0: Encoding and Transport", RFC 2565,
             April 1999.

   [RFC2566] deBry, R., Hastings, T., Herriot, R., Isaacson, S. and P.
             Powell, "Internet Printing Protocol/1.0: Model and
             Semantics", RFC 2566, April 1999.

   [RFC2567] Wright, D., "Design Goals for an Internet Printing
             Protocol", RFC 2567, April 1999.

   [RFC2568] Zilles, S., "Rationale for the Structure and Model and
             Protocol for the Internet Printing Protocol", RFC 2568,
             April 1999.

   [RFC2569] Herriot, R., Hastings, T., Jacobs, N. and J. Martin,
             "Mapping between LPD and IPP Protocols", RFC 2569, April
             1999.

   [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter,
             L., Leach, P. and T. Berners-Lee, "Hypertext Transfer
             Protocol - HTTP/1.1", RFC 2616, June 1999.

   [RFC3196] Hastings, T., Manros, C., Zehler, P., Kugler, C. and H.
             Holst, "Internet Printing Protocol/1.1: Implementor's
             Guide", RFC 3196, November 2001.



deBry, et. al.              Standards Track                    [Page 21]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


Appendix A: Encoding Example of a Simple Collection (Informative)

   The overall structure of the collection value can be pictorially
   represented as:

      "media-size" =
        {  "x-dimension" = 6;
           "y-dimension" = 4
        }

   A simplified view of the encoding would look like this:

             Table 6 - Overview Encoding of simple collection

      Tag Value             Name                  Value

      begCollection         media-size            ""

      memberAttrName        ""                    x-dimension

      integer               ""                    6

      memberAttrName        ""                    y-dimension

      integer               ""                    4

      endCollection         ""                    ""

      Note: "" represents a name or value whose length is 0.

              Table 7 - Example Encoding of simple collection

      Octets       Symbolic Value  Protocol   comments
                                   field

      0x34         begCollection   value-tag  beginning of the "media-
                                              size" collection attribute

      0x000A                       name-      length of (collection)
                                   length     attribute name

      media-size   media-size      name       name of (collection)
                                              attribute








deBry, et. al.              Standards Track                    [Page 22]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts member attribute:
                                              "x-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of "x-dimension"
                                   length     keyword

      x-dimension  x-dimension     value      name of  1st collection
                                              member attribute


      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0006                       value      value of  1st collection
                                              member attribute

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "y-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)




deBry, et. al.              Standards Track                    [Page 23]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x000B                       value-     length of the "y-
                                   length     dimension" keyword

      y-dimension  y-dimension     value      name of  2nd collection
                                              member attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf for
                                   length     media-size

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0004                       value      value of  2nd collection
                                              member attribute

      0x37         endCollection   value-tag  end of the collection

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)















deBry, et. al.              Standards Track                    [Page 24]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


Appendix B: Encoding Example of 1setOf Collection (Informative)

   The overall structure of the collection value can be pictorially
   represented as:

      "media-size-supported" =
        {  "x-dimension" = 6;
           "y-dimension" = 4
        },
        {  "x-dimension" = 3;
           "y-dimension" = 5
        };

   A simplified view of the encoding would look like this:

             Table 8 - Overview Encoding of 1setOf collection

      Tag Value              Name                 Value

      begCollection          media-size-          ""
                             supported

      memberAttrName         ""                   x-dimension

      integer                ""                   6

      memberAttrName         ""                   y-dimension

      integer                ""                   4

      endCollection          ""                   ""

      begCollection          ""                   ""

      memberAttrName         ""                   x-dimension

      integer                ""                   3

      memberAttrName         ""                   y-dimension

      integer                ""                   5

      endCollection          ""                   ""








deBry, et. al.              Standards Track                    [Page 25]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


              Table 9 - Example Encoding of 1setOf collection

      Octets       Symbolic Value  Protocol   comments
                                   field

      0x34         begCollection   value-tag  beginning of the "media-
                                              size-supported (1setOf
                                              collection" attribute

      0x00014                      name-      length of (collection)
                                   length     attribute name

      media-size-  media-size-     name       name of (collection)
      supported    supported                  attribute

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts member attribute:
                                              "x-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of "x-dimension"
                                   length     keyword

      x-dimension  x-dimension     value      name of  1st collection
                                              member attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)








deBry, et. al.              Standards Track                    [Page 26]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0004                       value-     length of an integer = 4
                                   length

      0x0006                       value      value of  1st collection
                                              member attribute

      0x4A         memberAttrName  value-tag  starts member attribute:
                                              "y-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of the "y-
                                   length     dimension" keyword

      y-dimension  y-dimension     value      name of  2nd collection
                                              member attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0004                       value      value of  2nd collection
                                              member attribute

      0x37         endCollection   value-tag  end of the collection

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)






deBry, et. al.              Standards Track                    [Page 27]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x34         begCollection   value-tag  beginning of the 2nd
                                              member of the 1setOf
                                              "sizes-avail " collection
                                              attribute

      0x0000                       name-      Zero length name indicates
                                   length     this is member of previous
                                              attribute

                                   name       no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts member attribute:
                                              "x-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of "x-dimension"
                                   length     keyword

      x-dimension  x-dimension     value      name of  1st collection
                                              member attribute

      0x21         integer type    value-tag  attribute type








deBry, et. al.              Standards Track                    [Page 28]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0003                       value      value of  1st collection
                                              member attribute

      0x4A         memberAttrName  value-tag  starts member attribute:
                                              "y-dimension"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x000B                       value-     length of the "y-
                                   length     dimension" keyword

      y-dimension  y-dimension     value      name of  2nd collection
                                              member attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0005                       value      value of  2nd collection
                                              member attribute








deBry, et. al.              Standards Track                    [Page 29]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x37         endCollection   value-tag  end of the 1setOf
                                              collection value

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)


































deBry, et. al.              Standards Track                    [Page 30]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


Appendix C: Encoding Example of Collection containing 1setOf XXX
            attribute (Informative)

   The overall structure of the collection value can be pictorially
   represented as:

      "wagons" =
        {  "colors" = red, blue;
           "sizes" = 4, 6, 8
        }

   A simplified view of the encoding would look like this:

       Table 10 - Overview Encoding of collection with 1setOf value

            Tag Value                Name                Value

            begCollection            wagons              ""

            memberAttrName           ""                  colors

            keyword                  ""                  red

            keyword                  ""                  blue

            memberAttrName           ""                  sizes

            integer                  ""                  4

            integer                  ""                  6

            integer                  ""                  8

            endCollection            ""                  ""

















deBry, et. al.              Standards Track                    [Page 31]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


        Table 11 - Example Encoding of collection with 1setOf value

      Octets       Symbolic Value  Protocol   comments
                                   field

      0x34         begCollection   value-tag  beginning of the "wagons"
                                              collection attribute

      0x0005                       name-      length of (collection)
                                   length     attribute name

      wagons       wagons          name       name of (collection)
                                              attribute

      0x0000                       value-     defined to be 0 for this
                                   length     type

                                              no value (since value-
                                              length was 0)

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "colors"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0006                       value-     length of "colors" keyword
                                   length

      colors       colors          value      value is name of 1st
                                              member attribute

      0x44         keyword type    value-tag  keyword type

      0x0000                       name-      0 indicates 1setOf wagons
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-
                                   length






deBry, et. al.              Standards Track                    [Page 32]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      blue         blue            value      value of 1st member
                                              attribute

      0x44         keyword type    value-tag  keyword type

      0x0000                       name-      0 indicates 1setOf wagons
                                   length

                                              no name (since name-length
                                              was 0)

      0x0003                       value-
                                   length

      red          red             value      value of 1st member
                                              attribute

      0x4A         memberAttrName  value-tag  starts a new member
                                              attribute: "sizes"

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0005                       value-     length of "length-avail"
                                   length     keyword

      sizes        sizes           value      Name of 2nd member
                                              attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf wagons
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length






deBry, et. al.              Standards Track                    [Page 33]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

      0x0004                       value      1st value for 1setOf
                                              integer attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-
                                   length     length of an integer = 4

      0x0006                       value      2nd value for 1setOf
                                              integer attribute

      0x21         integer type    value-tag  attribute type

      0x0000                       name-      0 indicates 1setOf
                                   length

                                              no name (since name-length
                                              was 0)

      0x0004                       value-     length of an integer = 4
                                   length

      0x0008                       value      3rd  value for 1setOf
                                              integer attribute

      0x37         endCollection   value-tag  end of the collection

      0x0000                       name-      defined to be 0 for this
                                   length     type, so part of 1setOf

                                              no name (since name-length
                                              was 0)

      0x0000                       value-     defined to be 0 for this
                                   length     type







deBry, et. al.              Standards Track                    [Page 34]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


      Octets       Symbolic Value  Protocol   comments
                                   field

                                              no value (since value-
                                              length was 0)

Appendix D: Description of the Base IPP Documents (Informative)

   The base set of IPP documents includes:

      Design Goals for an Internet Printing Protocol [RFC2567]
      Rationale for the Structure and Model and Protocol for the
      Internet Printing Protocol [RFC2568]
      Internet Printing Protocol/1.1: Model and Semantics [RFC2911]
      Internet Printing Protocol/1.1: Encoding and Transport [RFC2910]
      Internet Printing Protocol/1.1: Implementer's Guide [RFC3196]
      Mapping between LPD and IPP Protocols [RFC2569]

   The "Design Goals for an Internet Printing Protocol" document takes a
   broad look at distributed printing functionality, and it enumerates
   real-life scenarios that help to clarify the features that need to be
   included in a printing protocol for the Internet.  It identifies
   requirements for three types of users: end users, operators, and
   administrators.  It calls out a subset of end user requirements that
   are satisfied in IPP/1.0 [RFC2566, RFC2565].  A few OPTIONAL operator
   operations have been added to IPP/1.1 [RFC2911, RFC2910].

   The "Rationale for the Structure and Model and Protocol for the
   Internet Printing Protocol" document describes IPP from a high level
   view, defines a roadmap for the various documents that form the suite
   of IPP specification documents, and gives background and rationale
   for the IETF IPP working group's major decisions.

   The "Internet Printing Protocol/1.1: Model and Semantics" document
   describes a simplified model with abstract objects, their attributes,
   and their operations.  The model introduces a Printer and a Job.  The
   Job supports multiple documents per Job.  The model document also
   addresses how security, internationalization, and directory issues
   are addressed.

   The "Internet Printing Protocol/1.1: Encoding and Transport" document
   is a formal mapping of the abstract operations and attributes defined
   in the model document onto HTTP/1.1 [RFC2616].  It also defines the
   encoding rules for a new Internet MIME media type called
   "application/ipp".  This document also defines the rules for
   transporting over HTTP a message body whose Content-Type is
   "application/ipp".  This document defines the 'ipp' scheme for
   identifying IPP printers and jobs.



deBry, et. al.              Standards Track                    [Page 35]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   The "Internet Printing Protocol/1.1: Implementer's Guide" document
   gives insight and advice to implementers of IPP clients and IPP
   objects.  It is intended to help them understand IPP/1.1 and some of
   the considerations that may assist them in the design of their client
   and/or IPP object implementations.  For example, a typical order of
   processing requests is given, including error checking.  Motivation
   for some of the specification decisions is also included.

   The "Mapping between LPD and IPP Protocols" document gives some
   advice to implementers of gateways between IPP and LPD (Line Printer
   Daemon) implementations.

Authors' Addresses

   Roger deBry
   Utah Valley State College
   Orem, UT 84058

   Phone: (801) 222-8000
   EMail: debryro@uvsc.edu


   Tom Hastings
   Xerox Corporation
   737 Hawaii St.  ESAE 231
   El Segundo, CA  90245

   Phone: 310-333-6413
   Fax: 310-333-5514
   EMail: hastings@cp10.es.xerox.com


   Robert Herriot
   Consultant
   706 Colorado Ave
   Palo Alto, CA 94303

   Phone: 650-327-4466
   Fax: 650-327-4466
   EMail: bob@herriot.com











deBry, et. al.              Standards Track                    [Page 36]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


   Kirk Ocke
   Xerox Corp.
   800 Phillips Rd
   M/S 128-30E
   Webster, NY 14580

   Phone: (585) 442-4832
   EMail: KOcke@crt.xerox.com


   Peter Zehler
   Xerox Corp.
   800 Phillips Rd
   M/S 128-30E
   Webster, NY 14580

   Phone: (585) 265-8755
   EMail: PZehler@crt.xerox.com

   IPP Web Page:  http://www.pwg.org/ipp/
   IPP Mailing List:  ipp@pwg.org

   To subscribe to the ipp mailing list, send the following email:

     1) send it to majordomo@pwg.org
     2) leave the subject line blank
     3) put the following two lines in the message body:
          subscribe ipp
          end

   Implementers of this specification document are encouraged to join
   the IPP Mailing List in order to participate in any discussions of
   clarification issues and review of registration proposals for
   additional attributes and values.  In order to reduce spam the
   mailing list rejects mail from non-subscribers, so you must subscribe
   to the mailing list in order to send a question or comment to the
   mailing list.














deBry, et. al.              Standards Track                    [Page 37]

RFC 3382         IPP: The 'collection' attribute syntax   September 2002


Full Copyright Statement

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.



















deBry, et. al.              Standards Track                    [Page 38]