Subject: CAP ABNF

From: Doug Royer <[email-masked]>
Date: Sat, 14 Jun 2003 17:38:19 -0600

I am starting to go through the CAP abnf looking for errors. Below is
the CAP ABNF from CAP draft-10.

The lines are numbered and if you have comments could you include
the line number or line number range with your comments.

     1
     2   calprops   = 2*(
     3
     4              ; 'prodid' and 'version' are both REQUIRED,
     5              ; but MUST NOT occur more than once.
     6              ;
     7                prodid /version /
     8
     9              ; These are optional, but MUST NOT occur
    10              ; more than once.
    11              ;
    12                calscale        /
    13                method          /
    14                cmd             /
    15
    16              ; These are optional, and may occur more
    17              ; than once.
    18              ;
    19                target / other-props )
    20
    21    other-props  = *(x-prop) *(iana-prop) *(x-prop)
    22
    23    iana-prop   = ; Any property registered by IANA directly or
    24                  ; included in an RFC that may be applied to
    25                  ; the component and within the rules published.
    26
    27    x-prop      = ; As defined in [iCAL]
    28
    29   icalbody = calprops component
    30
    31             ; If the "VCALENDAR" component contains the "CMD"
    32             ; property then the 'component' is optional:
    33             ;
    34             / calprops     ; Which MUST include a "CMD" property
    35
    36     alarmc     = "BEGIN" ":" "VALARM" CRLF
    37                  alarm-seq
    38                  other-props
    39                  (audioprop / dispprop / emailprop / procprop)
    40                  "END" ":" "VALARM" CRLF
    41
    42    alarm-seq   = "SEQUENCE" alarmseqparams ":" posint0 CRLF
    43
    44   alarmseqparams = other-params [";" local-param] other-params
    45
    46                  ; Where DIGIT is defined in [iCAL]
    47                  ;
    48    posint0     = 1*DIGIT
    49    posint1     = posintfirst 1*DIGIT
    50
    51                  ; A number starting with 1 through 9.
    51                  ; A number starting with 1 through 9.
    52                  ;
    53    posintfirst = %x31-39
    54
    55    other-params = *(";" xparam) *(";" iana-params) *(";" xparam)
    56
    57    iana-params = ; Any parameter registered by IANA directly or
    58                  ; included in an RFC that may be applied to
    59                  ; the property and within the rules published.
    60
    61   trigger    = "TRIGGER" 1*(";" enable-param) (trigrel / trigabs)
    62
    63   capurl   = "cap://" csid [ "/" relcalid ]
    64   csid     = hostport   ; As defined in Section 3.2.2 of RFC 2396
    65   relcalid = *uric      ; As defined in Section 2 of RFC 2396
    66
    67     cal-query  = "SELECT"   SP   cap-val  SP
    68                  "FROM"     SP   comp-name SP
    69                  "WHERE"    SP   cap-expr
    70
    71                / "SELECT" SP cap-cols SP
    72                  "FROM"   SP comp-name
    73
    74     cap-val    = cap-cols / param
    75                / ( cap-val "," cap-val )
    76
    77                   ; NOTE: there is NO space around the "," on
    78                   ; the next line
    79     cap-cols   = cap-col / ( cap-cols "," cap-col)
    80                  / "*"
    81
    82                  ; A 'cap-col' is:
    83                  ;
    84                  ; Any property name ('cap-prop') found in the component
    85                  ; named in the 'comp-name' used in the "FROM" clause.
    86                  ;
    87                  ;   SELECT ORGANIZER FROM VEVENT ...
    88                  ;
    89                  ; OR
    90                  ;
    91                  ; A component name ('comp-name') of an existing component
    92                  ; contained inside of the 'comp-name' used in the "FROM"
    93                  ; clause.
    94                  ;
    95                  ;   SELECT VALARM FROM VEVENT ...
    96                  ;
    97                  ; OR
    98                  ;
    99                  ; A component name ('comp-name') of an existing
   100                  ; component contained inside of the 'comp-name' used
   101                  ; in the "FROM" clause followed by a property
   102                  ; name ('cap-prop') to be selected from that component.
   103                  ; (comp-name "." cap-prop)
   104                  ;
   105                  ;   SELECT VALARM.TRIGGER FROM VEVENT ...
   106
   107     cap-col    = comp-name
   108                / comp-name "." cap-prop
   109                / cap-prop
   110
   111     comp-name  = "VEVENT"  / "VTODO"     / "VJOURNAL" / "VFREEBUSY"
   112                / "VALARM"  / "DAYLIGHT"  / "STANDARD" / "VAGENDA"
   113                / "VCAR"    / "VCALSTORE" / "VQUERY"   / "VTIMEZONE"
   114                / x-comp    / iana-comp
   115
   116     cap-prop   = ; A property that may be in the 'cap-comp' named
   117                  ; in the "SELECT" clause.
   118
   119     cap-expr   = "(" cap-expr ")"
   120                / cap-term
   121
   122     cap-term   = cap-expr SP cap-logical SP cap-expr
   123                / cap-factor
   124
   125     cap-logical= "AND" / "OR"
   126
   127     cap-factor = cap-colval SP cap-oper SP col-value
   128                / cap-colval SP "NOT LIKE" SP col-value
   129                / cap-colval SP "LIKE" SP col-value
   130                / cap-colval SP "IS NULL"
   131                / cap-colval SP "IS NOT NULL"
   132                / col-value SP "NOT IN" cap-colval"
   133                / col-value SP "IN" cap-colval"
   134                / "STATE()" "=" ( "BOOKED"
   135                                 / "UNPROCESSED"
   136                                 / "DELETED" )
   137
   138     cap-colval = cap-col /  param
   139
   140     param      = "PARAM(" cap-col "," cap-param ")"
   141
   142     cap-param  = ; Any parameter that may be contained in the cap-col
   143                   ; in the supplied PARAM() function
   144
   145     col-value  = col-literal
   146                / "SELF()"
   147                / "CAL-OWNERS()"
   148                / "CAL-OWNERS(" cal-address ")"
   149                / "CURRENT-TARGET()"
   150
   151     cal-address = ; A CALID as define by CAP
   152
   153     col-literal = "'" literal-data "'"
   154
   155    literal-data = ; Any data that matches the value type of the
   156                   ; column that is being compared. That is you can
   157                   ; not compare PRIORITY to "some string" because
   158                   ; PRIORITY has a value type of integer. If it is
   159                   ; not preceded by the LIKE element, any '%' and '_'
   160                   ; characters in the literal data are not treated as
   161                   ; wildcard characters and do not have to be backslash
   162                   ; escaped.
   163                   ;
   164                   ; OR
   165                   ;
   166                   ; If the literal-data is preceded by the LIKE
   167                   ; element it may also contain the '%' and '_'
   168                   ; wildcard characters. And if the literal data
   169                   ; that is comparing contains any '%' or '_'
   170                   ; characters, they MUST BE backslash escaped as
   171                   ; described in the notes below in order for them not
   172                   ; to be treated as wildcard characters.
   173
   174     cap-oper    = "="
   175                 / "!="
   176                 / "&lt;"
   177                 / "&gt;"
   178                 / "&lt;="
   179                 / "&gt;="
   180
   181
   182     SP          = ; A single white space ASCII character
   183                   ; (value in HEX %x20).
   184
   185     x-comp      = ; As defined in [iCAL] section 4.6
   186
   187     iana-comp   = ; As defined in [iCAL] section 4.6
   188
   189   upn        = "@"
   190           / [ dot-atom-text ] "@" dot-atom-text
   191
   192             ; dot-atom-text is defined in RFC 2822
   193
   194                ; NOTE: "CAL-OWNERS(cal-address)"
   195                ;       and "NOT CAL-OWNERS(cal-address)"
   196                ;       are both NOT allowed below.
   197                ;
   198   upn-filter    = "CAL-OWNERS()" /
   199
   200                "NOT CAL-OWNERS()" /
   201                "*" /
   202                [ "*" / dot-atom-text ] "@" ( "*" / dot-atom-text )
   203
   204               ; dot-atom-text is defined in RFC 2822
   205
   206   action-param     = ";" "ACTION" "=" ( "ASK" / "ABORT" )
   207                    ; If 'action-param' is supplied then
   208                    ; 'latency-param' MUST BE supplied.
   209
   210   enable-param       = "ENABLE" "=" boolean
   211
   212   id-param         = ";" "ID" "=" unique-id
   213                    ; The text value supplied is a unique value
   214                    ; shared between the CUA and CS to uniquely
   215                    ; identify the instance of command in the
   216                    ; the current CUA session. The value has
   217                    ; no meaning to other CUAs or other sessions.
   218
   219   unique-id        = ; text
   220
   221   latency-param    = ";" "LATENCY" "=" latency-sec
   222                    ; The value supplied in the time in seconds.
   223                    ; If 'latency-param' is supplied then
   224                    ; 'action-param' MUST BE supplied.
   225
   226   latency-sec      = posint1
   227
   228   local-param        = "LOCAL" "=" boolean
   229
   230   localize-param   = ";" "LOCALIZE" "=" beep-localize
   231                    ; The value supplied MUST BE one value from the initial
   232                    ; [BEEP] greeting 'localize' attribute specifying
   233                    ; the locale to use for error messages during
   234                    ; this instance of the command sent.
   235
   236   beep-localize    = ; text
   237
   238   option-param     = ";" "OPTIONS" "=" cmd-specific
   239
   240   cmd-specific     = ; The value supplied is dependent on the
   241                      ; CMD value. See the specific CMDs for the
   242                      ; correct values to use for each CMD.
   243
   244   allow-conflict     = "ALLOW-CONFLICT" other-params ":" boolean CRLF
   245
   246   attcounter   = "ATT-COUNTER" other-params ":" cal-address CRLF
   247
   248   CALID   = "CALID" other-params ":" calid CRLF
   249
   250   calmaster = "CALMASTER" other-params ":" uri CRLF
   251
   252   uri = ; IANA registered uri as defined in [iCAL]
   253
   254   cap-version   = "CAP-VERSION" other-params ":" text CRLF
   255
   256   carid      = "CARID" other-params ":" text CRLF
   257
   258   car-level        = "CAR-LEVEL" ":" other-params : car-level-values
   259
   260   car-level-values = ( "CAR-NONE" / "CAR-MIN" / "CAR-FULL-1"
   261                        / other-levels )
   262
   263   other-levels     = ; Any name published in an RFC for a "CAR-LEVEL"
   264                      ; property value.
   265
   266   components     = "COMPONENTS" other-params ":" comp-list CRLF
   267
   268                  ; All of the following MUST BE supplied in any order.
   269                  ;
   270   comp-list-req  = "VCALSTORE" "," "VCALENDAR" "," "VTIMEZONE" ","
   271                      "VREPLY", "VAGENDA", "STANDARD", "DAYLIGHT"
   272
   273                  ; At least one MUST BE supplied. The same value
   274                  ; MUST NOT occur more than once.
   275                  ;
   276   comp-list-min  = ( "," "VEVENT") / ( "," "VTODO") / ( "," "VJOURNAL" )
   277
   278                  ; The same value MUST NOT occur
   279                  ; more than once.
   280                  ;
   281   comp-list-opt  = ( "," "VFREEBUSY" ) / ( "," "VALARM" )
   282                    ( "," "VCAR" )      / ( "," "VQUERY" )
   283                    ( "," x-comp )      / ( "," iana-comp )
   284
   285   comp-list        = comp-list-req 1*3comp-list-min *comp-list-opt
   286
   287
   288                      *("," comp-list-names) comp-name
   289
   290   csid = "CSID" other-params ":" capurl CRLF
   291
   292   default-charset     = "DEFAULT-CHARSET" other-params ":" text
   293                         *( "," text) CRLF
   294
   295   default-locale     = "DEFAULT-LOCALE" other-params ":" language
   296                         *( "," language) CRLF
   297
   298   language = Text identifying a locale, as defined in [CHARPOL]
   299
   300   default-tzid       = "DEFAULT-TZID" other-params
   301                        ":" [tzidprefix] text
   302                        *("," [tzidprefix] text) CRLF
   303
   304   def-vcars      = "DEFAULT-VCARS" other-params ":" text
   305                    *( "," text ) CRLF
   306
   307   deny       = "DENY" other-params ":" upn-filter CRLF
   308
   309   expand     = "EXPAND" other-params ":" ("TRUE" / "FALSE") CRLF
   310
   311   grant     = "GRANT" other-params ":" upn-filter CRLF
   312
   313   max-comp-size   = "MAX-COMP-SIZE" other-params ":" posint0 CRLF
   314
   315   mindate    = "MINDATE" other-params ":" date-time CRLF
   316
   317   name = "MULTIPART" other-params ":" text *( "," text) CRLF
   318
   319   name = "NAME" nameparam ":" text CRLF
   320
   321   nameparam = other-params [ ";" languageparam ] other-params
   322
   323   languageparam = ; As defined in [iCAL].
   324
   325   owner = "OWNER" other-params ":" upn CRLF
   326
   327   perm      = "PERMISSION" other-params ":" permvalue CRLF
   328
   329   permvalue = ( "SEARCH" / "CREATE" / "DELETE" / "MODIFY" / all )
   330
   331   all         = "*"
   332
   333   query      = "QUERY" other-params ":" cal-query CRLF
   334
   335   queryid      = "QUERYID" other-params ":" text CRLF
   336
   337   rstatus  = "REQUEST-STATUS" rstatparam ":"
   338             statcode ";" *(statdesc ) ";" *(extdata)
   339
   340   rstatparam  = other-params [";" languageparam] other-params
   341
   342   statcode  = 1*DIGIT *("." 1*DIGIT)
   343               ;Hierarchical, numeric return status code
   344
   345   statdesc  = text
   346               ;An optional textual status description, content is
   347               ;decided by the implementer. May be empty.
   348
   349    extdata  = text
   350               ; Textual exception data. For example, the offending
   351               ; property name and value or complete property line.
   352
   353   query-level = "QUERY-LEVEL" other-params
   354                 ":" ( "CAL-QL-1" / "CAL-QL-NONE") CRLF
   355
   356   recur-limit = "RECUR-LIMIT" other-params ":" posint1 CRLF
   357
   358   recur-expand = "RECUR-EXPAND" other-params ":" boolean CRLF
   359
   360   restrict      = "RESTRICTION" other-params ":" cal-query CRLF
   361
   362   scope      = "SCOPE" other-params ":" cal-query CRLF
   363
   364   stores-expanded   = "STORES-EXPANDED" other-params ":" boolean CRLF
   365
   366   target   = "TARGET" other-params ":" capurl CRLF
   367
   368   transp   = "TRANSP" other-params ":" transvalue CRLF
   369
   370   transvalue
   371            = "OPAQUE" ;Blocks or opaque on busy time searches.
   372            / "TRANSPARENT"    ;Transparent on busy time searches.
   373
   374            / "TRANSPARENT-NOCONFLICT" ; Transparent on busy time
   375            ; searches and no other OPAQUE or OPAQUE-NOCONFLICT objects
   376            ; can overlap it.
   377
   378            / "OPAQUE-NOCONFLICT"  ; Opaque on busy time
   379            ; searches and no other OPAQUE or OPAQUE-NOCONFLICT objects
   380            ; can overlap it.
   381            ;
   382            ;Default value is OPAQUE
   383
   384   agenda      = "BEGIN" ":" "VAGENDA" CRLF
   385                 agendaprop
   386                 *(icalobject)     ; as defined in [iCAL]
   387                 "END" ":" "VAGENDA" CRLF
   388
   389   agendaprop  = *(
   390                 ; The following MUST occur exactly once.
   391                 ;
   392                   allow-conflict / calid / calscale / created
   393                 / default-charset / default-locale
   394                 / default-tzid / last-modified /
   395
   396                 ; The following MUST occur at least once.
   397                 ; and the value MUST NOT be empty.
   398
   399                 / owner
   400
   401                 ; The following are optional,
   402                 ; and MAY occur more than once.
   403
   404                 / name / related-to / other-props / x-comp
   405               )
   406
   407   agendac     = "BEGIN" ":" "VAGENDA" CRLF
   408                 agendacprop
   409                 *(icalobject)     ; as defined in [iCAL]
   410                 "END" ":" "VAGENDA" CRLF
   411
   412   agendacprop  = *(
   413                  ; The following MUST occur exactly once.
   414                  ;
   415                    allow-conflict / calid / calscale
   416                  / default-charset / default-locale
   417                  / default-tzid /
   418
   419                  ; The following MUST occur at least once.
   420                  ; and the value MUST NOT be empty.
   421                  ;
   422                  / owner
   423
   424                  ; The following are optional,
   425                  ; and MAY occur more than once.
   426                  ;
   427                  / name / related-to / other-props / x-comp
   428                 )
   429
   430   calstorec     = "BEGIN" ":" "VCALSTORE" CRLF
   431                calstoreprop
   432                *(vagendac)
   433                "END" ":" "VCALSTORE" CRLF
   434
   435   calstoreprop  = *(
   436
   437                     ; the following MUST occur exactly once
   438
   439                       allow-conflict / calscale / calmaster
   440                     / created / csid / default-charset
   441                     / default-locale / default-vcars
   442                     / default-tzid / last-modified
   443
   444                     ; the following are optional,
   445                     ; and MAY occur more than once
   446
   447                     / name / related-to / other-props / x-comp
   448                    )
   449
   450   carc    =  "BEGIN" ":" "VCAR" CRLF
   451              carprop 1*rightc
   452              "END" ":" "VCAR" CRLF
   453
   454   carprop = 1*(
   455
   456           ; 'carid' is REQUIRED,
   457           ; but MUST NOT occur more than once
   458
   459            carid /
   460
   461           ; the following are OPTIONAL,
   462           ; and MAY occur more than once
   463
   464            name / other-props
   465           )
   466
   467   rightc    =  "BEGIN" ":" "VRIGHT" CRLF
   468             rightprop
   469             "END" ":" "VRIGHT" CRLF
   470
   471   rightprop = 2*(
   472
   473             ; either 'grant' or 'deny' MUST
   474             ; occur at least once
   475             ; and MAY occur more than once
   476
   477              grant / deny /
   478
   479             ; 'permission' MUST occur at least once
   480             ; and MAY occur more than once
   481
   482              permission /
   483
   484             ; the following are optional,
   485             ; and MAY occur more than once
   486
   487              scope / restriction / other-props
   488
   489          )
   490
   491   replyc           =  "BEGIN" ":" "VREPLY" CRLF
   492                       any-prop-or-comp
   493                       "END" ":" "VREPLY" CRLF
   494
   495   any-prop-or-comp = ; Zero or more iana or experimental
   496                      ; properties and components, in any order.
   497
   498   queryc    =  "BEGIN" ":" "VQUERY" CRLF
   499                queryprop
   500                "END" ":" "VCAR" CRLF
   501
   502   queryprop = 1*(
   503
   504             ; 'queryid' is OPTIONAL but MUST NOT occur
   505             ; more than once. If the "TARGET" property
   506             ; is supplied then the "QUERYID" property
   507             ; MUST BE supplied.
   508             ;
   509              queryid / target
   510
   511             ; 'expand' is OPTIONAL but MUST NOT occur
   512             ; more than once.
   513
   514              expand
   515
   516             ; the following are OPTIONAL, and MAY occur
   517             ; more than once
   518             ;
   519             / name / other-props
   520
   521             ; the following MUST occur at least once.
   522             ;
   523             / query
   524
   525           )
   526
   527   cmd              = "CMD" (
   528                    / abort-cmd
   529                    / continue-cmd
   530                    / create-cmd
   531                    / delete-cmd
   532                    / generate-uid-cmd
   533                    / get-capability-cmd
   534                    / identify-cmd
   535                    / modify-cmd
   536                    / move-cmd
   537                    / reply-cmd
   538                    / search-cmd
   539                    / set-locale-cmd
   540                    / other-cmd
   541                     ) CRLF
   542
   543
   544   other-cmd        ; Any command published as an RFC or any
   545                    ; vendor specific "x-" command.
   546
   547   option-value     = paramtext    ; As defined in [iCAL]
   548
   549    abort-cmd   = abortparam ":" "ABORT"
   550
   551   abortparam   = *(
   552
   553                ; the following are optional,
   554                ; but MUST NOT occur more than once
   555
   556                  id-param
   557                / localize-param
   558
   559                ; the following is optional,
   560                ; and MAY occur more than once
   561
   562                / other-params
   563
   564                )
   565
   566
   567   The REPLY of any "ABORT" command is:
   568
   569   abort-reply  = "BEGIN" ":" "VCALENDAR" CRLF
   570                   calprops
   571                   abort-vreply
   572                  "END" ":" "VCALENDAR" CRLF
   573
   574   abort-vreply  = "BEGIN" ":" "VREPLY" CRLF
   575                    request-status
   576                    other-props
   577                   "END" ":" "VREPLY" CRLF
   578
   579   continue-cmd   = continueparam ":" "CONTINUE"
   580
   581   continueparam   = *(
   582
   583                   ; the following are optional,
   584                   ; but MUST NOT occur more than once
   585
   586                     id-param
   587                   / localize-param
   588                   / latency-param
   589
   590                   ; the following MUST occur exactly once and only
   591                   ; when the latency-param has been supplied and
   592                   ; MUST NOT be supplied if the latency-param is
   593                   ; not supplied.
   594
   595                   / action-param
   596
   597                   ; the following are optional,
   598                   ; and MAY occur more than once
   599
   600                   / other-params
   601                   )
   602
   603   The REPLY of any "CONTINUE" command is:
   604
   605   continue-reply   = "BEGIN" ":" "VCALENDAR" CRLF
   606                      calprops
   607                      continue-vreply
   608                      "END" ":" "VCALENDAR" CRLF
   609
   610   continue-vreply  = "BEGIN" ":" "VREPLY" CRLF
   611                      request-status
   612                      other-props
   613                      "END" ":" "VREPLY" CRLF
   614
   615   create-cmd     = createparam ":" "CREATE"
   616
   617   createparam    = *(
   618
   619                  ; the following are optional,
   620                  ; but MUST NOT occur more than once
   621
   622                    id-param
   623                  / localize-param
   624                  / latency-param
   625
   626                  ; the following MUST occur exactly once and only
   627                  ; when the latency-param has been supplied and
   628                  ; MUST NOT be supplied if the latency-param is
   629                  ; not supplied.
   630
   631                  / action-param
   632
   633                  ; the following is optional,
   634                  ; and MAY occur more than once
   635
   636                  / other-params
   637                 )
   638
   639   create-reply   = "BEGIN" ":" "VCALENDAR" CRLF
   640                     creply-props
   641                     1*(create-vreply)
   642                     "END" ":" "VCALENDAR" CRLF
   643
   644   create-vreply  = "BEGIN" ":" "VREPLY" CRLF
   645                    created-id
   646                    request-status
   647                    other-props
   648                    "END" ":" "VREPLY" CRLF
   649
   650                  ; Where the id is appropriate for the
   651                  ; type of object created:
   652                  ;
   653                  ; VAGENDA = calid
   654                  ; VALARM = sequence
   655                  ; VCAR = carid
   656                  ; VEVENT, VFREEBUSY, VJOURNAL, VTODO = uid
   657                  ; VQUERY = queryid
   658                  ; VTIMEZONE = tzid
   659                  ; x-component = x-id
   660                  ;
   661   created-id    = ( calid / carid / uid / queryid /
   662                     tzid / sequence / x-id)
   663
   664   x-id          = ; An ID for an x-component.
   665
   666   creply-props  = 4*(
   667                  ; These are REQUIRED and MUST NOT occur
   668                  ; more than once.
   669                  ;
   670                    prodid /version / target / reply-cmd
   671
   672                  ; These are optional, and may occur more
   673                  ; than once.
   674                  ;
   675                    other-props
   676
   677   create-object = "BEGIN" ":" "VCALENDAR" CRLF
   678                 ; If 'calprops' contain the "METHOD" property
   679                 ; then this 'create-object' component MUST
   680                 ; conform to [iTIP] restrictions.
   681                 ;
   682                 ; calprops MUST include 'create-cmd'
   683                 ;
   684                   calprops
   685                   other-props
   686                   1*(create-comp)
   687                   "END" ":" "VCALENDAR" CRLF
   688
   689                 ; NOTE: The 'VCALSTORE' component is not included in
   690                 ; 'create-comp' as it is out of scope for CAP to create
   691                 ; a new CS.
   692                 ;
   693    create-comp = agendac / carc / queryc
   694                  / timezonec / freebusyc
   695                  / eventc / todoc / journalc
   696                  / iana-comp / x-component
   697
   698   delete-cmd   = deleteparam ":" "DELETE"
   699
   700   deleteparam  = *(
   701
   702                ; the following are optional,
   703                ; but MUST NOT occur more than once
   704                ;
   705                 id-param
   706                / localize-param
   707                / latency-param
   708                / option-param "MARK"
   709
   710                ; The following MUST occur exactly once and only
   711                ; when the latency-param has been supplied and
   712                ; MUST NOT be supplied if the latency-param is
   713                ; not supplied.
   714                ;
   715                / action-param
   716
   717                ; the following is optional,
   718                ; and MAY occur more than once
   719                ;
   720                / other-params
   721               )
   722
   723   delete-reply   = "BEGIN" ":" "VCALENDAR" CRLF
   724                    calprops   ; MUST include 'reply-cmd'
   725                    *(delete-vreply)
   726                    "END" ":" "VCALENDAR" CRLF
   727
   728
   729   delete-vreply  = "BEGIN" ":" "VREPLY" CRLF
   730                    deleted-id
   731                    request-status
   732                    "END" ":" "VREPLY" CRLF
   733
   734                   ; Where the id is appropriate for the
   735                   ; type of object deleted:
   736                   ;
   737                   ; VAGENDA = calid
   738                   ; VCAR = carid
   739                   ; VEVENT, VFREEBUSY, VJOURNAL, VTODO = uid
   740                   ; VQUERY = queryid
   741                   ; ALARM = sequence
   742                   ; VTIMEZONE = tzid
   743                   ; x-component = x-id
   744                   ; An instance = uid recurid
   745                   ;
   746   deleted-id    = ( calid / carid / uid / uid recurid
   747                  / queryid / tzid / sequence / x-id )
   748
   749   generate-uid-cmd   = genuidparam ":" "GENERATE-UID"
   750
   751   genuidparam     = *(
   752
   753                   ; The following are optional,
   754                   ; but MUST NOT occur more than once.
   755
   756                     id-param
   757                   / localize-param
   758                   / latency-param
   759
   760                   ; The following MUST occur exactly once and only
   761                   ; when the latency-param has been supplied and
   762                   ; MUST NOT be supplied if the latency-param is
   763                   ; not supplied.
   764
   765                   / action-param
   766
   767                   ; The following is optional,
   768                   ; and MAY occur more than once.
   769
   770                   / other-params
   771
   772                   ; The following MUST BE supplied exactly once.
   773                   ; The value specifies the number of UIDs to
   774                   ; be returned.
   775
   776                   / option-param posint1
   777
   778                 )
   779
   780   gen-reply   = "BEGIN" ":" "VCALENDAR" CRLF
   781                 calprops              ; Which MUST include 'reply-cmd'
   782                 1*(gen-vreply)
   783                 "END" ":" "VCALENDAR" CRLF
   784
   785
   786   gen-vreply  = "BEGIN" ":" "VREPLY" CRLF
   787                 1*(uid)
   788                 request-status
   789                 "END" ":" "VREPLY" CRLF
   790
   791   get-capability-cmd   = capibiltyparam ":" "GET-CAPABILITY"
   792
   793   capibiltyparam     = *(
   794
   795                      ; the following are optional,
   796                      ; but MUST NOT occur more than once
   797                      ;
   798                       id-param / localize-param / latency-param
   799
   800                      ; the following MUST occur exactly once and only
   801                      ; when the latency-param has been supplied and
   802                      ; MUST NOT be supplied if the latency-param is
   803                      ; not supplied.
   804                      ;
   805                      / action-param
   806
   807                      ; the following is optional,
   808                      ; and MAY occur more than once
   809                      ;
   810                      / other-params
   811                      )
   812
   813   cap-vreply     = "BEGIN" ":" "VCALENDAR" CRLF
   814                     ; The following properties may be in any order.
   815                     ;
   816                     prodid
   817                     version
   818                     reply-cmd
   819                     other-props
   820                     "BEGIN" ":" "VREPLY" CRLF
   821                     ; The following properties may be in any order.
   822                     ;
   823                     cap-version
   824                     car-level
   825                     components
   826                     stores-expanded
   827                     maxdate
   828                     mindate
   829                     itip-version
   830                     max-comp-size
   831                     multipart
   832                     query-level
   833                     recur-accepted
   834                     recur-expand
   835                     recur-limit
   836                     other-props
   837                     "END" ":" "VREPLY" CRLF
   838                    "END" ":" "VCALENDAR" CRLF
   839
   840        identify-cmd    = identifyparam ":" "IDENTIFY"
   841
   842        identifyparam   = *(
   843
   844                        ; the following are optional,
   845                        ; but MUST NOT occur more than once
   846
   847                          id-param
   848                        / localize-param
   849                        / latency-param
   850
   851                        ; the following MUST occur exactly once and only
   852                        ; when the latency-param has been supplied and
   853                        ; MUST NOT be supplied if the latency-param is
   854                        ; not supplied.
   855
   856                        / action-param
   857
   858                        ; the following is optional,
   859                        ; and MAY occur more than once
   860
   861                        / other-params
   862
   863                        ; The value is the UPN of the requested
   864                        ; identity. If not supplied it is a request
   865                        ; to return to the original authenticated identity.
   866
   867                        / option-param upn
   868
   869                        )
   870
   871           modify-cmd   = modifyparam ":" "MODIFY"
   872
   873          modifyparam   = *(
   874
   875                        ; the following are optional,
   876                        ; but MUST NOT occur more than once
   877
   878                          id-param
   879                        / localize-param
   880                        / latency-param
   881
   882                        ; the following MUST occur exactly once and only
   883                        ; when the latency-param has been supplied and
   884                        ; MUST NOT be supplied if the latency-param is
   885                        ; not supplied.
   886
   887                        / action-param
   888
   889                        ; the following is optional,
   890                        ; and MAY occur more than once
   891
   892                        / other-params
   893
   894                        )
   895
   896             move-cmd   = moveparam ":" "MOVE"
   897
   898            moveparam   = *(
   899
   900                        ; the following are optional,
   901                        ; but MUST NOT occur more than once
   902
   903                          id-param
   904                        / localize-param
   905                        / latency-param
   906
   907                        ; the following MUST occur exactly once and only
   908                        ; when the latency-param has been supplied and
   909                        ; MUST NOT be supplied if the latency-param is
   910                        ; not supplied.
   911
   912                        / action-param
   913
   914                        ; the following is optional,
   915                        ; and MAY occur more than once
   916
   917                        / other-params
   918
   919                        )
   920
   921           move-reply  = "BEGIN" ":" "VCALENDAR" CRLF
   922                          calprops
   923                          1*(move-vreply)
   924                         "END" ":" "VCALENDAR" CRLF
   925
   926
   927          move-vreply  = "BEGIN" ":" "VREPLY" CRLF
   928                          move-id
   929                           request-status
   930                         "END" ":" "VREPLY" CRLF
   931
   932                         ; Where the id is appropriate for the
   933                         ; type of object moved:
   934                         ;
   935                         ; VAGENDA = calid
   936                         ; VCAR = carid
   937                         ; VEVENT, VFREEBUSY, VJOURNAL, VTODO = uid
   938                         ; VQUERY = queryid
   939                         ; ALARM = sequence
   940                         ; An instance = uid recurid
   941                         ; x-component = x-id
   942                         ;
   943           move-id    =  ( calid / carid / uid / uid recurid
   944                          / queryid / tzid / sequence / x-id)
   945
   946           reply-cmd    = replyparam ":" "REPLY"
   947
   948          replyparam   = *(
   949
   950                        ; The 'id' parameter value MUST BE exactly the
   951                        ; same as the value sent in the original
   952                        ; CMD property. If the original CMD did
   953                        ; not have an 'id' parameter, then the 'id'
   954                        ; MUST NOT be supplied in the REPLY.
   955
   956                        id-param
   957
   958                        ; the following is optional,
   959                        ; and MAY occur more than once
   960
   961                        / other-params
   962
   963                        )
   964
   965           search-cmd   = searchparam ":" "SEARCH"
   966
   967          searchparam   = *(
   968
   969                        ; the following are optional,
   970                        ; but MUST NOT occur more than once
   971
   972                          id-param
   972                          id-param
   973                        / localize-param
   974                        / latency-param
   975
   976                        ; the following MUST occur exactly once and only
   977                        ; when the latency-param has been supplied and
   978                        ; MUST NOT be supplied if the latency-param is
   979                        ; not supplied.
   980
   981                        / action-param
   982
   983                        ; the following is optional,
   984                        ; and MAY occur more than once
   985
   986                        / other-params
   987
   988                        )
   989
   990           setlocale-cmd   = setlocaleparam ":" "SET-LOCALE"
   991
   992          setlocaleparam   = *(
   993
   994                           ; the following are optional,
   995                           ; but MUST NOT occur more than once
   996
   997                             id-param
   998                           / localize-param
   999                           / latency-param
  1000                           / setlocale-option
  1001
  1002                           ; the following MUST occur exactly once and only
  1003                           ; when the latency-param has been supplied and
  1004                           ; MUST NOT be supplied if the latency-param is
  1005                           ; not supplied.
  1006
  1007                           / action-param
  1008
  1009                           ; the following is optional,
  1010                           ; and MAY occur more than once
  1011
  1012                           / other-params
  1013
  1014         setlocal-option   = option-param newlocale
  1015
  1016               newlocale   = ; Any locale supplied in the initial [BEEP]
  1017                             ; "greeting" "localize" parameter and
  1018                             ; and any charset supported by the CS
  1019                             ; and listed in the DEFAULT-CHARSET property
  1020                             ; of the VCALSTORE.
  1021
  1022                           )
  1023
  1024           setlocale-reply  = "BEGIN" ":" "VCALENDAR" CRLF
  1025                              calprops
  1026                              1*(setlocale-vreply)
  1027                             "END" ":" "VCALENDAR" CRLF
  1028
  1029          setlocale-vreply  = "BEGIN" ":" "VREPLY" CRLF
  1030                              request-status
  1031                              "END" ":" "VREPLY" CRLF
  1032
  1033         timeout-cmd   = continueparam ":" "TIMEOUT"
  1034
  1035        timeoutparam   = *(
  1036
  1037                        ; the following are optional,
  1038                        ; but MUST NOT occur more than once
  1039
  1040                          id-param
  1041                        / localize-param
  1042
  1043                        / other-params
  1044
  1045                        )
  1046

-- 

  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: Harrie Hazewinkel <[email-masked]>
Date: Mon, 16 Jun 2003 11:22:12 +0200

HI,

I am quit new to this, but something I noticed while
implementing a parser for CAPQL.
Also the ABNF is not inline with the examples and earlier
was said the examples are all valid. See earlier thread
with subject "CAP-QUERY ABNF disagrees with examples"
and line 136 below.

On top of this, I am wondering if an order clause is
useful as part of the capql query part. The order
now depends on the columns given in the 'SELECT' part
'cap-val', but it is sometimes usefull to be more specific.

>   113                / "VCAR"    / "VCALSTORE" / "VQUERY"   / 

Why is VRIGHT not a component name??
Since the 'comp-name' is not only used in the CAPQL part I believe it 
should
be.
On top of that I was wondering if it would not be usefull to seperate 
the
CAPQL language (ABNF) more from the rest. Meaning that almost anything 
under
'cal-query' have its own rules and those are not used in the other 
itmes.

To me it sounds also a bit weird that you could create a query for 
selecting
queries. So the "VQUERY" comp-name item looks out of place in that 
sense.

>   132                / col-value SP "NOT IN" cap-colval"

The above "NOT LIKE", "IS NULL", "IS NOT NULL" and "NOT IN"
all have a single space between the 'words' would it no be usefull
to lower that requirement?? "NOT LIKE" and "NOT  LIKE" (2 spaces)
are somehow similar.
Just wondering, since I don't see the need for it.

>   134                / "STATE()" "=" ( "BOOKED"

Are the items BOOKED, UNPROCESSED and DELETED not surrounded with
single quotes (') as defined in the examples??

>   172                   ; to be treated as wildcard characters.

Also here, would this be not easier when multiple white space characters
are allowed??
Just wondering.

regards,
Harrie

---

From: Doug Royer <[email-masked]>
Date: Mon, 16 Jun 2003 10:00:13 -0600

> 'cap-val', but it is sometimes usefull to be more specific.

This WG has decided that SORT is to be removed in the -11
version of the spec. I have removed it in the sources.

I submitted an individual draft (should be showing up soon)
that has a sort-extension. 'ORDER' could be added as an
add on to that. I do agree that sorting is needed.
The WG decided that they do not want it in the base spec.

--

---

From: Doug Royer <[email-masked]>
Date: Mon, 16 Jun 2003 10:03:02 -0600

> with subject "CAP-QUERY ABNF disagrees with examples"

Yes and thanks. I wanted to put all of the ABNF together
and hopefully provoke additional comments. As ABNF is a
bit painful to edit and write, I wanted as many comments
as possible before editing into -11.

--

---

From: Doug Royer <[email-masked]>
Date: Mon, 16 Jun 2003 10:05:07 -0600

Harrie Hazewinkel wrote:

> should be.

Thanks - it was an error that it was not included.
--

---

From: Doug Royer <[email-masked]>
Date: Mon, 16 Jun 2003 10:08:35 -0600

> Just wondering, since I don't see the need for it.

The text specifically says 'single space'. It opened up the
debate for tabs, CR, LF, and other white space. So it
was limited to a single space.

--

---

From: Doug Royer <[email-masked]>
Date: Mon, 16 Jun 2003 10:10:13 -0600

> single quotes (') as defined in the examples??

Error - thanks. I'll fix it.

--

---

From: [email-masked]
Date: Thu, 19 Jun 2003 17:37:56 -0400

> the CAP ABNF from CAP draft-10.

Why is it that only the CREATE command has the queryc in it and NO other 
command does (as part of the create-comp bit of the command)?  To me that 
means that only the CREATE command can have a BEGIN:VQUERY...END:VQUERY in 
it.  As such no other commands can have VQUERYs in them.  Now that cant be 
true can it??

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: Thu, 19 Jun 2003 16:25:00 -0600

Yep.

Search is missing a 'search-comp'.

Thanks

[email-masked] wrote:
> command does (as part of the create-comp bit of the command)?  To me 
> that means that only the CREATE command can have a 
> BEGIN:VQUERY...END:VQUERY in it.  As such no other commands can have 
> VQUERYs in them.  Now that cant be true can it??

--

---

From: [email-masked]
Date: Fri, 20 Jun 2003 17:56:25 -0400

> Search is missing a 'search-comp'.

Dont forget other commands like DELETE or MOVE etc.  ("I want to delete 
all VTODOs that are 'Complete'", "Move all the VEVENTS with 
CATEGORY:REDCROSS to my other Calendar", etc)

Bruce
Warning: Dates in Calendar are closer than they appear!