Subject: CAP: Repeating iCalendar ABNF mistakes

From: [email-masked]
Date: Wed, 13 Nov 2002 14:11:34 -0500

In trying to build a full ABNF tree from the 09-submitted draft I note 
that we are forgetting the mistakes of RFC 2445 when we have ABNF like:

   create-cmd     = createparam ":" "CREATE"

   createparam    = *(

                  ; the following are optional,
                  ; but MUST NOT occur more than once

                   id-param
                  / localize-param
                  / latency-param

                  ; the following MUST occur exactly once and only
                  ; when the latency-param has been supplied and
                  ; MUST NOT be supplied if the latency-param is
                  ; not supplied.

                  / action-param

                  ; the following is optional,
                  ; and MAY occur more than once

                  / (";" xparam)
                 )

To save time for those who dont recall the issue: The ABNF does not allow 
non-'X-" params on this command.  That is, if we later define a new 
parameter for the CREATE command an older parser would treat the line as 
invalid as the new iana-token (or iana-prop if you prefer) is NOT valid in 
the older ABNF.  We noted this last year in iCalendar and vowed to fix it. 
 However we made the same mistake on all our CAP commands...

We can either define an iana-param (ie: iana-param = iana-token '=' 
iana-token / x-token) and add it or we can use some other proper 
"iana-..." component in the ABNF.

Related Note: I see that iana-prop is used in the ABNF often but is NEVER 
defined.  It is NOT inherited from RFC 2445 so its just missing...

Bruce
===========================================================================
Bruce Kahn                                INet: 
[email-masked]
Messaging & Collaboration                 Phone: 978.399.6496
IBM Software Group                         FAX: and nothing but the FAX...
Standard disclaimers apply, even where prohibited by law...

---

From: Doug Royer <[email-masked]>
Date: Wed, 13 Nov 2002 12:48:47 -0700

[email-masked] wrote:
> To save time for those who dont recall the issue: The ABNF does not 
> allow non-'X-" params on this command.

I agree - I have added a '...iana-token ; as defined in RFC2445...' to CAP.

> That is, if we later define a 
> new parameter for the CREATE command an older parser would treat the 
> line as invalid as the new iana-token (or iana-prop if you prefer) is 
> NOT valid in the older ABNF.  We noted this last year in iCalendar and 
> vowed to fix it.  However we made the same mistake on all our CAP 
> commands...

I can not find the discussion. What was wrong with 'iana-token' in 2445?

> Related Note: I see that iana-prop is used in the ABNF often but is 
> NEVER defined.  It is NOT inherited from RFC 2445 so its just missing...

I added text saying '...as defined in [iCAL]...'

> Bruce Kahn                                INet: [email-masked]

-- 

  Doug Royer                     |   http://INET-Consulting.com
  -------------------------------|-----------------------------
  [email-masked]                 | Office: (208)612-INET
  http://Royer.com/People/Doug   |    Fax: (866)594-8574
                                 |   Cell: (208)520-4044

                 We Do Standards - You Need Standards

---

From: [email-masked]
Date: Mon, 18 Nov 2002 12:46:29 -0500

> I agree - I have added a '...iana-token ; as defined in RFC2445...' to 
CAP.

Thanks.

> I can not find the discussion. What was wrong with 'iana-token' in 2445?

The problem is in the root ABNF in RFC 2445:

     icalbody   = calprops component

     calprops   = 2*(

                ; 'prodid' and 'version' are both REQUIRED,
                ; but MUST NOT occur more than once

                prodid /version /

                ; 'calscale' and 'method' are optional,
                ; but MUST NOT occur more than once

                calscale        /
                method          /

                x-prop
                )

According to this ABNF, there can be no iana-tokens in the VCALENDAR 
component, only those already defined and X- properties!

We noticed this a long time ago and vowed to fix it in our next iCalendar 
revision.  If the actual thread is needed I would search for any 
discussions that have iana-token in them (Im too backlogged to do it given 
its obviously a problem we know about already.)

Bruce