Ignore:
Timestamp:
Aug 12, 2013, 12:07:45 AM (6 years ago)
Author:
julian.reschke@…
Message:

move ABNF list extension to a back section (see #492)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p1-messaging.xml

    r2344 r2356  
    32703270</t>
    32713271</section>
     3272</section>
     3273
     3274<section title="ABNF list extension: #rule" anchor="abnf.extension">
     3275<t>
     3276  A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
     3277  improve readability in the definitions of some header field values.
     3278</t>
     3279<t>
     3280  A construct "#" is defined, similar to "*", for defining comma-delimited
     3281  lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
     3282  at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
     3283  comma (",") and optional whitespace (OWS).   
     3284</t>
     3285<figure><preamble>
     3286  Thus,
     3287</preamble><artwork type="example">
     3288  1#element =&gt; element *( OWS "," OWS element )
     3289</artwork></figure>
     3290<figure><preamble>
     3291  and:
     3292</preamble><artwork type="example">
     3293  #element =&gt; [ 1#element ]
     3294</artwork></figure>
     3295<figure><preamble>
     3296  and for n &gt;= 1 and m &gt; 1:
     3297</preamble><artwork type="example">
     3298  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
     3299</artwork></figure>
     3300<t>
     3301  For compatibility with legacy list rules, recipients &SHOULD; accept empty
     3302  list elements. In other words, consumers would follow the list productions:
     3303</t>
     3304<figure><artwork type="example">
     3305  #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
     3306 
     3307  1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
     3308</artwork></figure>
     3309<t>
     3310  Note that empty elements do not contribute to the count of elements present,
     3311  though.
     3312</t>
     3313<t>
     3314  For example, given these ABNF productions:
     3315</t>
     3316<figure><artwork type="example">
     3317  example-list      = 1#example-list-elmt
     3318  example-list-elmt = token ; see <xref target="field.components"/>
     3319</artwork></figure>
     3320<t>
     3321  Then these are valid values for example-list (not including the double
     3322  quotes, which are present for delimitation only):
     3323</t>
     3324<figure><artwork type="example">
     3325  "foo,bar"
     3326  "foo ,bar,"
     3327  "foo , ,bar,charlie   "
     3328</artwork></figure>
     3329<t>
     3330  But these values would be invalid, as at least one non-empty element is
     3331  required:
     3332</t>
     3333<figure><artwork type="example">
     3334  ""
     3335  ","
     3336  ",   ,"
     3337</artwork></figure>
     3338<t>
     3339  <xref target="collected.abnf"/> shows the collected ABNF, with the list rules
     3340  expanded as explained above.
     3341</t>
    32723342</section>
    32733343
     
    51395209</section>
    51405210
    5141 <section title="ABNF list extension: #rule" anchor="abnf.extension">
    5142 <t>
    5143   A #rule extension to the ABNF rules of <xref target="RFC5234"/> is used to
    5144   improve readability in the definitions of some header field values.
    5145 </t>
    5146 <t>
    5147   A construct "#" is defined, similar to "*", for defining comma-delimited
    5148   lists of elements. The full form is "&lt;n&gt;#&lt;m&gt;element" indicating
    5149   at least &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single
    5150   comma (",") and optional whitespace (OWS).   
    5151 </t>
    5152 <figure><preamble>
    5153   Thus,
    5154 </preamble><artwork type="example">
    5155   1#element =&gt; element *( OWS "," OWS element )
    5156 </artwork></figure>
    5157 <figure><preamble>
    5158   and:
    5159 </preamble><artwork type="example">
    5160   #element =&gt; [ 1#element ]
    5161 </artwork></figure>
    5162 <figure><preamble>
    5163   and for n &gt;= 1 and m &gt; 1:
    5164 </preamble><artwork type="example">
    5165   &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
    5166 </artwork></figure>
    5167 <t>
    5168   For compatibility with legacy list rules, recipients &SHOULD; accept empty
    5169   list elements. In other words, consumers would follow the list productions:
    5170 </t>
    5171 <figure><artwork type="example">
    5172   #element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
    5173  
    5174   1#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
    5175 </artwork></figure>
    5176 <t>
    5177   Note that empty elements do not contribute to the count of elements present,
    5178   though.
    5179 </t>
    5180 <t>
    5181   For example, given these ABNF productions:
    5182 </t>
    5183 <figure><artwork type="example">
    5184   example-list      = 1#example-list-elmt
    5185   example-list-elmt = token ; see <xref target="field.components"/>
    5186 </artwork></figure>
    5187 <t>
    5188   Then these are valid values for example-list (not including the double
    5189   quotes, which are present for delimitation only):
    5190 </t>
    5191 <figure><artwork type="example">
    5192   "foo,bar"
    5193   "foo ,bar,"
    5194   "foo , ,bar,charlie   "
    5195 </artwork></figure>
    5196 <t>
    5197   But these values would be invalid, as at least one non-empty element is
    5198   required:
    5199 </t>
    5200 <figure><artwork type="example">
    5201   ""
    5202   ","
    5203   ",   ,"
    5204 </artwork></figure>
    5205 <t>
    5206   <xref target="collected.abnf"/> shows the collected ABNF, with the list rules
    5207   expanded as explained above.
    5208 </t>
    5209 </section>
    5210 
    52115211<?BEGININC p1-messaging.abnf-appendix ?>
    52125212<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
     
    55185518      "MUST fix Content-Length?"
    55195519    </t>
     5520    <t>
     5521      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/492"/>:
     5522      "list notation defined in appendix"
     5523    </t>
    55205524  </list>
    55215525</t>
Note: See TracChangeset for help on using the changeset viewer.