Ignore:
Timestamp:
Nov 15, 2008, 11:45:44 AM (11 years ago)
Author:
julian.reschke@…
Message:

rewrite definition of list rule, deprecate empty list elements (related to #36)

File:
1 edited

Legend:

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

    r398 r400  
    347347    A construct "#" is defined, similar to "*", for defining lists of
    348348    elements. The full form is "<n>#<m>element" indicating at least
    349     <n> and at most <m> elements, each separated by one or more commas
    350     (",") and &OPTIONAL; linear white space (OWS). This makes the usual
    351     form of lists very easy; a rule such as
    352     <figure><artwork type="example">
    353  ( *<x:ref>OWS</x:ref> element *( *<x:ref>OWS</x:ref> "," *<x:ref>OWS</x:ref> element ))</artwork></figure>
     349    &lt;n&gt; and at most &lt;m&gt; elements, each separated by a single comma
     350    (",") and optional whitespace (OWS).   
    354351  </t>
     352  <figure><preamble>
     353    Thus,
     354</preamble><artwork type="example">
     355  1#element =&gt; element *( OWS "," OWS element )
     356</artwork></figure>
     357  <figure><preamble>
     358    and:
     359</preamble><artwork type="example">
     360  #element =&gt; [ 1#element ]
     361</artwork></figure>
     362  <figure><preamble>
     363    and for n &gt;= 1 and m &gt; 1:
     364</preamble><artwork type="example">
     365  &lt;n&gt;#&lt;m&gt;element =&gt; element &lt;n-1&gt;*&lt;m-1&gt;( OWS "," OWS element )
     366</artwork></figure>
    355367  <t>
    356     can be shown as
    357     <figure><artwork type="example">
    358  1#element</artwork></figure>
     368    For compatibility with legacy list rules, recipients &SHOULD; accept empty
     369    list elements. In other words, consumers would follow the list productions:
    359370  </t>
    360   <t>
    361     Wherever this construct is used, null elements are allowed, but do
    362     not contribute to the count of elements present. That is,
    363     "(element), , (element) " is permitted, but counts as only two
    364     elements. Therefore, where at least one element is required, at
    365     least one non-null element &MUST; be present. Default values are 0
    366     and infinity so that "#element" allows any number, including zero;
    367     "1#element" requires at least one; and "1#2element" allows one or
    368     two.
    369   </t>
     371<figure><artwork type="example">
     372#element =&gt; [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
     373
     3741#element =&gt; *( "," OWS ) element *( OWS "," [ OWS element ] )
     375</artwork></figure> 
    370376  <t>
    371377    <cref anchor="abnf.list">
     
    40824088<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
    40834089<t>
     4090  Empty list elements in list productions have been deprecated.
     4091  (<xref target="notation.abnf"/>)
     4092</t>
     4093<t>
    40844094  Rules about implicit linear white space between certain grammar productions
    40854095  have been removed; now it's only allowed when specifically pointed out
     
    46964706</t>
    46974707<t>
     4708  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
     4709  <list style="symbols">
     4710    <t>
     4711      Rewrite definition of list rules, deprecate empty list elements.
     4712    </t>
     4713  </list>
     4714</t>
     4715<t>
    46984716  Other changes:
    46994717  <list style="symbols">
Note: See TracChangeset for help on using the changeset viewer.