Subject: (DTD != rfc2445)?

From: Michael Krivoruchko <[email-masked]>
Date: Wed, 22 Dec 1999 21:12:14 +0000

Hi All,

correct me please if I am wrong.

-----------------------------------------------

RFC 2445 #4.6.4 (Free/Busy Component)
source:  ftp://ftp.isi.edu/in-notes/rfc2445.txt

     freebusyc  = "BEGIN" ":" "VFREEBUSY" CRLF
                  fbprop
                  "END" ":" "VFREEBUSY" CRLF

     fbprop     = *(

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

                contact / dtstart / dtend / duration / dtstamp /
                organizer / uid / url /

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

                attendee / comment / freebusy / rstatus / x-prop

                )

The iCalendar DTD Document
source:  http://www.ietf.org/internet-drafts/draft-many-ical-xmldoc-01.txt

page 28:
   <!ENTITY % freebusy.opt1 "
        contact | dtstamp | start | end | duration |
        organizer | uid | url
   ">
   <!-- These properties may only appear once in a VFREEBUSY -->

   <!ENTITY % freebusy.optm "
        attendee | comment | fbdata | rstatus
   ">
   <!-- These properties may appear one or more times in a -->
   <!-- VFREEBUSY -->

page 36:
   <!-- "freebusy" element type declaration -->
   <!ELEMENT freebusy   ((%;)*, (%freebusy.optm;)*)>

-----------------------------------------------

It looks to me like _very_ different grammars:
  1. DTD allows element from 'freebusy.opt1' to appear more than once in
      'freebusy' element; this is not allowed by RFC2445
  2. DTD does not allow element from 'freebusy.opt1' appear after element
      from 'freebusy.optm'; there is no such restriction in RFC2445

The grammar in RFC2445#4.6.4 is not in EBNF because of restrictions
in comments which have sense for a reader but have no any sense for
a parser.

From my point of view it can be quite complex to provide equivalent
rule in XML DTD. Probably the simplest solution is to define sequence
of elements which must not appear more than once:

<!ELEMENT freebusy ((contact?), (dtstamp?), (start?), (end?),
   (duration?), (organizer?), (uid?), (url?), (%freebusy.optm;)*)>

I do not insist on the exact sequence but such kind of rule allows
to recognize invalid document with few, say, 'url' elements.

Michael

--
---------------------------------------------------------------
Michael Krivoruchko                 CDE Group, Sun Microsystems
  Hamilton House, East Point Business Park, Dublin 3, Ireland
Ph: +353 1 819 9272               E-mail: [email-masked]
---------------------------------------------------------------

---

From: Doug Royer <[email-masked]>
Date: Thu, 23 Dec 1999 10:56:54 -0800

>       from 'freebusy.optm'; there is no such restriction in RFC2445

They should be the same.

> in comments which have sense for a reader but have no any sense for

Not a problem as there is no requirement the RFC text be parsable by a machine.