Changeset 1798 for draft-ietf-httpbis/latest/p1-messaging.xml
- Timestamp:
- 16/07/12 06:01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p1-messaging.xml
r1792 r1798 1448 1448 </section> 1449 1449 1450 <section title="ABNF list extension: #rule" anchor="abnf.extension">1451 <t>1452 A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to1453 improve readability in the definitions of some header field values.1454 </t>1455 <t>1456 A construct "#" is defined, similar to "*", for defining comma-delimited1457 lists of elements. The full form is "<n>#<m>element" indicating1458 at least <n> and at most <m> elements, each separated by a single1459 comma (",") and optional whitespace (OWS).1460 </t>1461 <figure><preamble>1462 Thus,1463 </preamble><artwork type="example">1464 1#element => element *( OWS "," OWS element )1465 </artwork></figure>1466 <figure><preamble>1467 and:1468 </preamble><artwork type="example">1469 #element => [ 1#element ]1470 </artwork></figure>1471 <figure><preamble>1472 and for n >= 1 and m > 1:1473 </preamble><artwork type="example">1474 <n>#<m>element => element <n-1>*<m-1>( OWS "," OWS element )1475 </artwork></figure>1476 <t>1477 For compatibility with legacy list rules, recipients &SHOULD; accept empty1478 list elements. In other words, consumers would follow the list productions:1479 </t>1480 <figure><artwork type="example">1481 #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]1482 1483 1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )1484 </artwork></figure>1485 <t>1486 Note that empty elements do not contribute to the count of elements present,1487 though.1488 </t>1489 <t>1490 For example, given these ABNF productions:1491 </t>1492 <figure><artwork type="example">1493 example-list = 1#example-list-elmt1494 example-list-elmt = token ; see <xref target="field.components"/>1495 </artwork></figure>1496 <t>1497 Then these are valid values for example-list (not including the double1498 quotes, which are present for delimitation only):1499 </t>1500 <figure><artwork type="example">1501 "foo,bar"1502 "foo ,bar,"1503 "foo , ,bar,charlie "1504 </artwork></figure>1505 <t>1506 But these values would be invalid, as at least one non-empty element is1507 required:1508 </t>1509 <figure><artwork type="example">1510 ""1511 ","1512 ", ,"1513 </artwork></figure>1514 <t>1515 <xref target="collected.abnf"/> shows the collected ABNF, with the list rules1516 expanded as explained above.1517 </t>1518 </section>1519 1450 </section> 1520 1451 … … 5102 5033 </section> 5103 5034 5035 <section title="ABNF list extension: #rule" anchor="abnf.extension"> 5036 <t> 5037 A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to 5038 improve readability in the definitions of some header field values. 5039 </t> 5040 <t> 5041 A construct "#" is defined, similar to "*", for defining comma-delimited 5042 lists of elements. The full form is "<n>#<m>element" indicating 5043 at least <n> and at most <m> elements, each separated by a single 5044 comma (",") and optional whitespace (OWS). 5045 </t> 5046 <figure><preamble> 5047 Thus, 5048 </preamble><artwork type="example"> 5049 1#element => element *( OWS "," OWS element ) 5050 </artwork></figure> 5051 <figure><preamble> 5052 and: 5053 </preamble><artwork type="example"> 5054 #element => [ 1#element ] 5055 </artwork></figure> 5056 <figure><preamble> 5057 and for n >= 1 and m > 1: 5058 </preamble><artwork type="example"> 5059 <n>#<m>element => element <n-1>*<m-1>( OWS "," OWS element ) 5060 </artwork></figure> 5061 <t> 5062 For compatibility with legacy list rules, recipients &SHOULD; accept empty 5063 list elements. In other words, consumers would follow the list productions: 5064 </t> 5065 <figure><artwork type="example"> 5066 #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ] 5067 5068 1#element => *( "," OWS ) element *( OWS "," [ OWS element ] ) 5069 </artwork></figure> 5070 <t> 5071 Note that empty elements do not contribute to the count of elements present, 5072 though. 5073 </t> 5074 <t> 5075 For example, given these ABNF productions: 5076 </t> 5077 <figure><artwork type="example"> 5078 example-list = 1#example-list-elmt 5079 example-list-elmt = token ; see <xref target="field.components"/> 5080 </artwork></figure> 5081 <t> 5082 Then these are valid values for example-list (not including the double 5083 quotes, which are present for delimitation only): 5084 </t> 5085 <figure><artwork type="example"> 5086 "foo,bar" 5087 "foo ,bar," 5088 "foo , ,bar,charlie " 5089 </artwork></figure> 5090 <t> 5091 But these values would be invalid, as at least one non-empty element is 5092 required: 5093 </t> 5094 <figure><artwork type="example"> 5095 "" 5096 "," 5097 ", ," 5098 </artwork></figure> 5099 <t> 5100 <xref target="collected.abnf"/> shows the collected ABNF, with the list rules 5101 expanded as explained above. 5102 </t> 5103 </section> 5104 5104 5105 <?BEGININC p1-messaging.abnf-appendix ?> 5105 5106 <section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
Note: See TracChangeset
for help on using the changeset viewer.