<xsd:schema
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="urn:schemas-microsoft-com:xdb"
    xmlns:hs="http://schemas.microsoft.com/hs/2001/10/core"
    targetNamespace="http://schemas.microsoft.com/hs/2001/10/myCalendar"
    xmlns="http://schemas.microsoft.com/hs/2001/10/myCalendar"
    elementFormDefault="qualified"
    version="1.0">

    <xsd:annotation>
        <xsd:documentation>
            Schema for .NET Calendar service
            Copyright (c) 2001 Microsoft Corporation. All rights reserved.
        </xsd:documentation>

        <xsd:appinfo>
            <xdb:blue select="/myCalendar"/>
            <xdb:blue select="/myCalendar/*"/>
            <xdb:blue select="/myCalendar/event/*"/>
            <xdb:blue select="/myCalendar/event/recurrence/rule"/>
            <xdb:blue select="/myCalendar/event/recurrence/exception"/>

            <xdb:red select="//@changeNumber"/>
            <xdb:red select="//@id"/>
            <xdb:red select="//cat"/>
            <xdb:red select="//@creator"/>
            <xdb:red select="//cat/@ref"/>
            <xdb:red select="/myCalendar/event/@calendarType"/>

            <xdb:red select="/myCalendar/event/body/$any"/>
            <xdb:red select="/myCalendar/event/attendeeEventExtra/$any"/>
            <xdb:red select="/myCalendar/event/attendee/$any"/>
            <xdb:red select="/myCalendar/event/recurrence/rule/repeat/$any"/>
            <xdb:red select="/myCalendar/event/recurrence/rule/$any"/>
            <xdb:red select="/myCalendar/event/recurrence/exception/$any"/>
            <xdb:red select="/myCalendar/event/recurrence/$any"/>

            <xdb:red select="/myCalendar/event/body/title"/>
            <xdb:red select="/myCalendar/event/body/startTime"/>
            <xdb:red select="/myCalendar/event/body/endTime"/>

            <xdb:red select="/myCalendar/event/body/organizer/puid"/>
            <xdb:red select="/myCalendar/event/body/organizer/email"/>
            <xdb:red select="/myCalendar/event/body/cuid"/>

            <xdb:red select="/myCalendar/event/attendee/puid"/>
            <xdb:red select="/myCalendar/event/attendee/email"/>
<!--
            <xdb:red select="/myCalendar/event/attendee/inviteType"/>
            <xdb:red select="/myCalendar/event/attendee/responseTime"/>
            <xdb:red select="/myCalendar/event/attendee/responseType"/>
-->

            <xdb:red select="/myCalendar/event/recurrence/exception/recurrenceId"/>
<!--
            <xdb:red select="/myCalendar/event/recurrence/rule/windowStart"/>
            <xdb:red select="/myCalendar/event/recurrence/rule/windowEnd"/>
            <xdb:red select="/myCalendar/event/recurrence/rule/repeatForever"/>
-->

            <xdb:red select="/myCalendar/event/recurrence/exception/body/startTime"/>
            <xdb:red select="/myCalendar/event/recurrence/exception/body/endTime"/>


            <xdb:red select="/myCalendar/event/reminder/nextTriggerTime"/>
            <xdb:sqlScript source="myCalendarCustomSQL.sql" />

            <xdb:namespaceMap>
                <xdb:mapping uri="http://schemas.microsoft.com/hs/2001/10/myCalendar" alias="m"/>
                <xdb:mapping uri="http://schemas.microsoft.com/hs/2001/10/core" alias="hs"/>
            </xdb:namespaceMap>
        </xsd:appinfo>
    </xsd:annotation>

    <xsd:import namespace="http://schemas.microsoft.com/hs/2001/10/core" schemaLocation="hscommon.xsd"/>

<!--........................................................................-->
    <!--
    //
    // myCalendar
    //  - root element for the .NET Calendar service
    //
    -->
    <xsd:element name="myCalendar">
        <xsd:annotation>
            <xsd:documentation>
            This element encapsulates the content document for this service. This element
            establishes a global cache scope for the service and contains other
            root level system attributes for this instance of the service.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="myCalendarType">
                    <xsd:attributeGroup ref="hs:documentRootAttributeGroup"/>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType
        name="myCalendarType"
        >
        <xsd:annotation>
            <xsd:documentation>
            This element defines the basic myCalendar types.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <xsd:element
                name="event"
                type="eventType"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The event is the myCalendar root object for calendar events, appointments, and meetings.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="subscription"
                type="hs:subscriptionType"
                minOccurs="0"
                maxOccurs="unbounded"
            />

            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
            </xsd:any>

        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="bodyType">
        <xsd:sequence>
            <xsd:element
                name="cat"
                type="hs:catType"
                minOccurs="0"
                maxOccurs="unbounded"
            />

<!--  WHFIX:  move to namespaced category
            <xsd:element
                name="sensitivity"
                type="sensitivityEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This optional attribute defines the importance of this event normal, personal, private, confidential.
                         The default is set to normal.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->

            <xsd:element
                name="title"
                type="hs:localizableString"
            />

            <xsd:element
                name="fullDescription"
                type="hs:longText"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This element contains an xhtml-compliant, free form, full description of the event.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="location"
                type="hs:localizableString"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This optional element contains the event's location.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="meetingStatus"
                type="meetingStatusEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Tracks the status of this meeting {not-sent, sent, cancelled}.  A regular appointment will
                        not have this element.  If &lt;meetingStatus&gt; exists, this event should be rendered as
                        a meeting, not as an appointment.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="recurrenceId"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The recurrence id indicates the original start time of an occurrence of a
                        recurring master appointment.  It is required to identify what instance
                        an orphan exception is modifying, since users are allowed to change the
                        start time on the orphan.  The recurrenceId method is stored in UTC.  It does not
                        appear in the master schema, except in the specific case that an attendee is invited
                        to an instance of a recurring event.  Otherwise, &lt;recurrenceId&gt; is usually
                        only a part of getCalendarDays.
                        <br/><b>ICAL Equivalent</b>: RECURRENCEID
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="lastUpdateTime"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This is updated by the organizer whenever s/he creates and sends a new meeting
                        request.  This helps the attendee to identify which meeting request is the
                        most recent one.  It is stored in UTC.  This property is not modifiable
                        by clients and is assigned by the server on modification and by the
                        sendMeetingRequest.
                        <br/><b>ICAL Equivalent</b>: DTSTAMP.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="startTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        The startTime method defines the start time of the event.  An all-day event
                        by convention starts at 12:00:00 AM of the day of the event.  This is stored
                        in UTC.  Maximum range is January 1, 1753 to December 31, 9999 to an accuracy
                        of 3.33 milliseconds.
                        <br/>If this event is a <b>recurring event</b>, &lt;startTime&gt; defines the
                        dateTime when the recurrence window starts.  The recurring master does not
                        have to be an instance of the recurring event itself.  An event in March set
                        to recur every April will only appear in April.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="endTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        The endTime method defines the end time of the event.  An all-day event by
                        convention ends at 11:59:59 PM of the ending day.  This is stored in UTC.
                        Maximum range is January 1, 1753 to December 31, 9999 to an accuracy of 3.33
                        milliseconds.  The duration of the event is inferred from endTime - startTime.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="allDay"
                type="xsd:boolean"
                minOccurs="0"
                maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        False or absence of this element indicates a regular event.
                        Otherwise, this attribute indicates that the event is an
                        all-day event.  All day events may span multiple days.  By
                        convention, all day events start at 12:00:00 am of the day
                        of startTime, regardless of what time it actually is, and it will
                        end at 11:59:59 pm of the endTime date.  In other words,
                        if the allDay element is present and has value=true, .NET Calendar
                        will ignore the actual times of the events and consider only the
                        date part of the field.
                        <br/>The allDay tag is meant to operate as a hint to UI
                        renders to display specialized icons indicating  an all-day event.
                        allDay events are distinguishable between 24-hr events starting
                        at 12am.  In the case of a meeting request, an allDay event
                        will <b>not</b> appear in the local user's time zone, but rather
                        in the organizer's time zone.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="floating"
                type="xsd:boolean"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The floating attribute indicates that this event is to
                        occur in the current local time zone no matter what time zone
                        the system is currently in (that is, it floats).  For example,
                        holidays are floating events.  Floating values are stored
                        as-is: no time-zone translations are needed to convert them
                        to UTC or any local time zone.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="travelTimeTo"
                type="xsd:int"
                minOccurs="0"
                maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        This is the amount of time (in minutes) that it takes to
                        travel to the meeting location.
                        <p>
                        This optional element shows in free/busy calculations.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element
                name="travelTimeFrom"
                type="xsd:int"
                minOccurs="0"
                maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        This is the amount of time (in minutes) that it takes to
                        return from the meeting location.
                        <p>
                        This optional element shows in free/busy calculations.
                        </p>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="freeBusyStatus"
                type="freeBusyStatusType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This optional element annotates the freeBusy behavior of this event.
                        All events by default appear as "busy".  The user may explicitly define
                        this event to be annotated by setting .NET Calendar values to free, tentative, busy or away.
                        <br/>CONSIDER:  turn into some freeform mechanism + set values.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="cuid"
                type="xsd:string"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The cuid (CorrelationUID) links an organizer's event to an attendee's
                        event.  It identifies which response from an attendee is for which
                        request from an organizer, and which meeting request update from the
                        organizer is for which previously accepted meeting by the attendee.
                        The "cuid" is the same on both the attendee's and the organizer's copy
                        of the appointment.
                        It is also identical on the orphan exception and the recurring master.
                        This value is assigned by the .NET Calendar server and is non-modifiable.
                        <br/><b>ICAL Equivalent</b>: UID.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="organizer"
                type="hs:userReference"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This is the email address of the event organizer for non-.NET My Services organizers.
                        <br/><b>ICAL Equivalent</b>: ORGANIZER.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Additional body elements.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>

        </xsd:sequence>
        <xsd:attributeGroup ref="hs:unnamedBlueAttributeGroup"/>
    </xsd:complexType>

    <xsd:complexType name="recurrenceBaseType">
        <xsd:sequence>
            <xsd:element name="rule" type="recurrenceRuleBodyBaseType"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="recurrenceRuleType">
        <xsd:complexContent>
            <xsd:extension base="recurrenceRuleBodyType">
                <xsd:sequence>
                    <xsd:any
                        processContents="skip"
                        namespace="##other"
                        minOccurs="0"
                        maxOccurs="unbounded"
                        >
                        <xsd:annotation>
                            <xsd:documentation>
                                Additional recurrence rule logic that cannot be expressed in .NET Calendar logic.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:any>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="recurrenceType">
        <xsd:sequence>
            <xsd:element name="rule" type="recurrenceRuleType"/>

            <xsd:element
                name="exception"
                type="modifiedExceptionType"
                minOccurs="0"
                maxOccurs="unbounded"
            />

            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Additional recurrence rule elements.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
        <xsd:attributeGroup ref="hs:unnamedBlueAttributeGroup"/>
    </xsd:complexType>

    <xsd:complexType name="recurrenceRuleBodyBaseType">
        <xsd:sequence>
            <xsd:element
                name="creationDate"
                type="xsd:dateTime"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This is required in order to exactly determine which timezone recurrence rule to use.
                        We cannot use the startTime of the event because of the ability to create events in
                        the past and in the future.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element
                name="firstDayOfWeek"
                type="dayOfWeekEnum">
                <xsd:annotation>
                    <xsd:documentation>
                        This stores what the first day of the week is for this
                        user. Typical values are (su) Sunday or (mo) Monday.
                        <br/><br/>
                        Recurrence rule's specified FirstDOW for calculating the recurrence expansion.
                        Allows recurring meetings to be expanded in the organizer's FirstDOW instead
                        of the invitee's FirstDOW.  <br/><b>Outlook and ICAL Equivalents</b>: FirstDOW
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="tzid"
                type="tzidEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Identifies the time zone for this recurring event.  <b>All dateTime information in
                        this event is stored in UTC</b> (converted from the local time zone defined
                        by the time zone sub-schema).  If this field is absent, the recurring event is assumed
                        to be recurring in UTC time.  However, it is only a <b>floating recurring event</b> if
                        the &lt;floating&gt; attribute is set.
                        <strong>@afterDay is used as a placeholder for v1.  @afterDay will not be use for
                        .NET My Services V1.</strong>

<pre>
        &lt;timeZone floating="..." <b><u><font color="red">id</font></u></b>="..."&gt;<font color="#aa9988"><sub>1..1</sub></font>
            &lt;standardBias&gt;<font color="#aa9988"><sub>1..1</sub></font>&lt;/standardBias&gt;
            &lt;additionalDaylightBias&gt;<font color="#aa9988"><sub>0..1</sub></font>&lt;/additionalDaylightBias&gt;
            &lt;standardDate&gt;<font color="#aa9988"><sub>0..1</sub></font>
                &lt;transitionRule weekdayOfMonth="..." day="..." dayOfMonth="..." month="..." afterDay="..."&gt;<font color="#aa9988"><sub>1..1</sub></font>&lt;/transitionRule&gt;
                &lt;transitionTime&gt;<font color="#aa9988"><sub>1..1</sub></font>&lt;/transitionTime&gt;
            &lt;/standardDate&gt;
            &lt;daylightDate&gt;<font color="#aa9988"><sub>0..1</sub></font>
                &lt;transitionRule weekdayOfMonth="..." day="..." dayOfMonth="..." month="..." afterDay="..."&gt;<font color="#aa9988"><sub>1..1</sub></font>&lt;/transitionRule&gt;
                &lt;transitionTime&gt;<font color="#aa9988"><sub>1..1</sub></font>&lt;/transitionTime&gt;
            &lt;/daylightDate&gt;
        &lt;/timeZone&gt;
</pre>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="isLeapYear"
                type="xsd:boolean"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        [International calendar support]
                        <br/>It is possible to derive isLeapYear from leapMonthValue, but .NET Calendar stores both separately.
                        See leapMonthValue for a use-case scenario.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element
                name="leapMonthValue"
                type="monthValueEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        [International calendar support]
                        <br/>&lt;leapMonthValue&gt; cannot be derived from a particular year and thus must be stored.  For
                        example, a user creates a recurrence on a Hebrew Lunar calendar.  The year is a leap year and it
                        has 13 months.  In that year, the leapMonthValue is 7.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>


            <xsd:element name="repeat" type="repeatRuleType"/>

<!--
            <xsd:element
                name="windowStart"
                type="windowStartType"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The windowStart is the beginning of the timeSpan over which the recurrence
                        occurs.  This is typically set to equal the startTime of a recurring event
                        upon its creation.  However, there are no provisions that this must be the
                        case.  This is stored in UTC.  Maximum range is January 1, 1753 to
                        December 31, 9999 to an accuracy of 3.33 milliseconds.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->

            <xsd:element
                name="windowEnd"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This dateTime indicates the end of the window over which the recurrence
                        occurs.  This is stored in UTC.  Maximum range is January 1, 1753 to
                        December 31, 9999 to an accuracy of 3.33 milliseconds.
                        <b>TODO:</b> windowEnd, repeatForever, repeatInstances should be xsd:choice when implemented by XDB.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="repeatForever"
                type="xsd:boolean"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Overrides the windowEnd date and specifies that this recurrence repeats
                        forever.  Client implementations cannot depend on date values
                        repeating forever, like 23:59:59pm Dec 31, 9999 or 23:59 Aug 31, 4500.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="repeatInstances"
                type="xsd:int"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Overrides the windowEnd date and specifies that this recurrence repeats
                        for the specified number of instances.  repeatInstances and repeatForever
                        are mutually exclusive, but repeatInstances will override repeatForever
                        for errant schemas.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>



<!--
            <xsd:element
                name="addedExceptionDate"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Additional days added to the recurrence rule appear as a list of
                        dateTime elements.
                        This is stored in UTC.
                        <br/><b>ICAL Equivalent</b>: RDATE.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="recurrenceRuleBodyType">
        <xsd:complexContent>
            <xsd:extension base="recurrenceRuleBodyBaseType">
                <xsd:sequence>
                    <xsd:element
                        name="deletedExceptionDate"
                        type="xsd:dateTime"
                        minOccurs="0"
                        maxOccurs="unbounded"
                        >
                        <xsd:annotation>
                            <xsd:documentation>
                                Exceptions to a recurrence rule are added as an element list of dates.
                                The service logic ignores the hh:mm:ss of the dateTime and merely
                                blocks out the particular day.  Any days can be added to an exception
                                rule, including days where no occurrences of a recurrence rule would
                                fall in the first place (ICAL EXDATE).
                                This is stored in UTC.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>

                <xsd:attributeGroup ref="hs:unnamedBlueAttributeGroup"/>

            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="repeatRuleType">
        <xsd:sequence>
            <xsd:element
                name="daily"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Repeat every [...] days.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:attribute name="dayFrequency" type="xsd:int" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                 The periodicity of days over which repetition occurs,
                                for example, repeat every 3 days.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>

            <xsd:element
                name="weekly"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Repeat every [...] week(s) on {su,mo,tu,we,th,fr,sa}.
                        <br/>The presence of a weekday attribute means to repeat
                        on this particular day.  Any combination of the seven days is valid.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:complexContent>
                        <xsd:extension base="weekDayAttributesType">
                            <xsd:attribute name="weekFrequency" type="xsd:int">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        The repeatWeekly recurrence occurs every period of weeks.  If the
                                        attribute is not present, it defaults to 1 (every week).
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:attribute>
                        </xsd:extension>
                    </xsd:complexContent>
                </xsd:complexType>
            </xsd:element>

            <xsd:element
                name="monthlyByDay"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        <br/>Repeat on the [First, Second, Third, Fourth, Last] {su, mo, tu, we, th, fr, sa} of every [...] month(s).
                        <br/>Any combination of the {weekday} attributes are valid, including user-defined combinations for
                        weekdays and weekend days.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:complexContent>
                        <xsd:extension base="weekDayAttributesType">
                            <xsd:attribute
                                name="monthFrequency"
                                type="xsd:int"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Specifies the month periodicity to recur on.  If this
                                        attribute is not present, it defaults to 1 (every month).
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:attribute>
                            <xsd:attribute name="weekdayOfMonth" type="weekdayOfMonthEnum" use="required"/>
                        </xsd:extension>
                    </xsd:complexContent>
                </xsd:complexType>

            </xsd:element>

            <xsd:element
                name="monthly"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Repeats the occurrence every month on a particular day.  The very first occurrence is
                        created from the parent event's startTime and endTime, but the recurrence
                        occurs as follows:
                        <li>Repeat every month on [day] of [month].</li>
                        <li>Repeat every [monthFrequency] month(s) on [day] of [month].</li>
                        Typically, the first occurrence is also an instance of the recurrence,
                        but this need not be the case.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:attribute name="monthFrequency" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>
                                This optional attribute indicates the month periodicity.  By default,
                                it is 1, periodic every month.  The start of the periodicity is
                                determined from event startTime.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>

                    <xsd:attribute name="day" type="dayValueEnum" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                Specifies the day of the month to recur on.  Value is between 1-31.
                                See forceExact for invalid day-month combinations.
                                The proper recurrence pattern for repeating on the last day of the
                                month is to use repeatMonthlyByDay.  "Repeat on the [last] [day, weekday, weekend day] of ..."
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="forceExact" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                By default, an invalid day-month combination will cause .NET Calendar to search backwards to
                                find a valid day-month combination.  If forceExact is true, an invalid starting [month ,day]
                                combination such as [6, 31] is ignored and will not be included as an instance of the
                                recurrence.  With forceExact, .NET Calendar follows ICAL behavior.
                                <li>day=31 will only pick up months that have 31 days.</li>
                                <li>day=30 will pick up all months except February.</li>
                                <li>day=29 will pick up all months except February, except on leap
                                years. February 29 is included on leap years.</li>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>

            <xsd:element
                name="yearlyByDay"
                type="yearlyByDayType"
                minOccurs="0"
                maxOccurs="1"
            />

            <xsd:element
                name="yearly"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Repeat every year on a particular date.  The very first occurrence is
                        created from the parent event's startTime and endTime, but the recurrence
                        occurs as follows:
                        <li>Repeat yearly on [day] of [month].</li>
                        <li>Repeat every [yearFrequency] years on [day] of [month].</li>
                        Typically, the first occurrence is also an instance of the recurrence,
                        but this need not be the case.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:attribute name="yearFrequency" type="xsd:int">
                        <xsd:annotation>
                            <xsd:documentation>
                                This optional attribute indicates the year periodicity.  By
                                default, it is 1 (repeat every year).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="month" type="monthValueEnum" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                Specifies the month to recur on.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="day" type="dayValueEnum" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                Specifies the day of the month to recur on.  Value is between 1-31.
                                See forceExact for invalid day-month combinations.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="forceExact" type="xsd:boolean">
                        <xsd:annotation>
                            <xsd:documentation>
                                By default, an invalid day-month-year combination will cause .NET Calendar to search backwards to
                                find a valid day for a particular month, year.  If forceExact is true, an invalid starting
                                [month ,day] combination such as [6, 31] is ignored and will not be included as an instance of
                                the recurrence.  With forceExact, .NET Calendar follows ICAL behavior.
                                <li>day=31 will only pick up months that have 31 days.</li>
                                <li>day=30 will pick up all months except February.</li>
                                <li>day=29 will pick up all months except February, except on leap
                                years. February 29 is included on leap years.</li>
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Any additional repeat rules.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>

        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="modifiedExceptionType">
        <xsd:annotation>
            <xsd:documentation>
                Contains a list of modified event properties for this particular
                orphan event.  The properties that are not modified are inherited
                from the original event upon recurrence expansion (client-side).
                <b>recurrenceId</b> is always present. It is used to determine
                which instance of the original rule this modifiedException applies
                to.
                <br/><br/><b>TODO</b>:  decide what other properties must belong.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element
                name="recurrenceId"
                type="xsd:dateTime"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This is the original start time (recurrenceId) of the occurrence that is
                        being modified by this exception.  ModifiedExceptions with recurrenceIds
                        that do not match the recurrenceId of any occurrence are ignored.
                        This is stored in UTC.  modifiedException does not expose the id
                        attribute. recurrenceId should be used to predicate instead, it functions
                        as the id of modifiedException.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="body"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This contains only the modifiable properties of the eventBody.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element
                            name="title"
                            type="hs:localizableString"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Suppose the title changes.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="fullDescription"
                            type="hs:longText"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Suppose this particular instance has a revised description.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="location"
                            type="hs:localizableString"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Switch meeting location for this instance only.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="startTime"
                            type="xsd:dateTime"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Switch the start time for this instance only.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="endTime"
                            type="xsd:dateTime"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Switch the end time for this instance only.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="allDay"
                            type="xsd:boolean"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    This particular instance is allDay.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="travelTimeTo"
                            type="xsd:int"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Suppose traffic is really bad for this instance.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="travelTimeFrom"
                            type="xsd:int"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Suppose traffic is really bad for this instance.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="freeBusyStatus"
                            type="freeBusyStatusType"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Priority is changed for this meeting.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="organizer"
                            type="hs:userReference"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Suppose the original organizer is replaced by another organizer.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element
                name="attendeeEventExtra"
                type="attendeeEventExtraType"
                minOccurs="0"
                maxOccurs="1"
            />

            <xsd:element
                name="deletedAttendee"
                type="hs:idRefType"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The meeting organizer of a recurring meeting may wish to exclude a particular
                        attendee for an instance of the meeting.  This hs:idRefType (puid) indicates which
                        attendee, (from the list of attendees at the event level) are not invited to
                        this particular meeting instance.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="deletedAttachment"
                type="attachmentIdType"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The meeting organizer of a recurring meeting may wish to exclude a particular
                        attachment for an instance of the meeting.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
<!--
            <xsd:element
                name="deletedReminder"
                type="hs:idRefType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This appointment creator may not wish to be reminded about this particular recurring
                        instance.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->
            <xsd:element
                name="attachment"
                type="attachmentMetadataType"
                minOccurs="0"
                maxOccurs="unbounded"
            />

            <xsd:element
                name="attendee"
                type="attendeeType"
                minOccurs="0"
                maxOccurs="unbounded"
            />

            <xsd:element
                name="reminder"
                type="reminderExceptionType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        These are the properties of the reminder that may be modified.  If there is no
                        reminder subschema in the event body, exception reminders are ignored.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Additional properties of the myCalendar/BaseEventType schema.  Only certain
                        event properties may exist here.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
        <xsd:attributeGroup ref="hs:standardBlueAttributeGroup">
            <xsd:annotation>
                <xsd:documentation>
                    This id is assigned by .NET Calendar.  On a modify operation, sending
                    in an id attempts to modify the modifiedException, and a blank id
                    means that this modify operation adds a new modifiedException.  On
                    an insert operation, the id must be blank (it will be ignored if
                    encountered due to the expense of this kind of validation).
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attributeGroup>
    </xsd:complexType>

    <xsd:complexType name="transitionRuleType">
        <xsd:annotation>
            <xsd:documentation>
                The TransitionRule specifies the recurrence pattern for daylight savings
                time transitions.
                <li>Repeat on the [First, Second, Third, Fourth, Last]
                [day, weekday, weekend day, su ,mo, tu, we, th, fr, sa]
                of [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] [after [afterDay]].</li>
                <li>Repeat on the [dayOfMonth] of [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]</li>
                <br/>
            </xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="weekdayOfMonth" type="weekdayOfMonthEnum">
            <xsd:annotation>
                <xsd:documentation>
                    Used to specify a particular weekday of the month to transition on.  If this attribute
                    is present, then @day must also be present.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="day" type="allDaysEnum">
            <xsd:annotation>
                <xsd:documentation>
                    Used to specify a day of the week for the transition to occur on.  If this
                    attribute is present, then @dayOfMonth must also be present.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="dayOfMonth" type="xsd:int">
            <xsd:annotation>
                <xsd:documentation>
                    Used to specify a transition on a particular day of a month.  Eg, Iraq (Baghdad)
                    transitions on 5/1 and 9/30.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="month" type="monthValueEnum" use="required"/>
        <xsd:attribute
            name="afterDay"
            type="dayValueEnum"
            >
            <xsd:annotation>
                <xsd:documentation>
                    <b>afterDay</b> is needed to support certain time-zone recurrence rules for
                    countries that use the format of the first Friday after the 15th (i.e. New
                    Zealand, which ends the first Sunday on or after 5 March).
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="yearlyByDayType">
        <xsd:annotation>
            <xsd:documentation>
                <li>Repeat on the [First, Second, Third, Fourth, Last] {su, mo, tu, we, th, fr, sa}
                of [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] every [yearFrequency] years.</li>
                <br/>
                Any combination of the {weekday} attributes are valid, including user-defined combinations
                denoting weekdays and weekend days.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="weekDayAttributesType">
                <xsd:attribute name="yearFrequency" type="xsd:int">
                    <xsd:annotation>
                        <xsd:documentation>
                            This optional attribute indicates the year periodicity.  By
                            default, it is 1 (repeat every year).
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="weekdayOfMonth" type="weekdayOfMonthEnum" use="required"/>
                <xsd:attribute name="month" type="monthValueEnum" use="required"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="reminderExceptionType">
        <xsd:sequence>
            <xsd:element name="set" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="offset" type="xsd:int" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="interruptability" type="xsd:int" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="reminderType">
        <xsd:sequence>
            <xsd:element name="set" type="xsd:boolean">
                <xsd:annotation>
                    <xsd:documentation>
                        Boolean flag that indicates whether the reminder is active for this
                        event.  In most cases, this will be true, but in the case of a recurring
                        appointment, this flag may default to true with specific instances not to
                        be reminded, or default to false, with specific instances to be reminded.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="to" type="hs:localizableString">
                <xsd:annotation>
                    <xsd:documentation>
                        Friendly name that this reminder is being sent to.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="offset" type="xsd:int">
                <xsd:annotation>
                    <xsd:documentation>
                        Specifies the offset, in minutes, of how long before the
                        event the user should be reminded.  Recommended values
                        are the following:
                        <table cellpadding="1" cellspacing="1" border="1">
                            <tr>
                                <td align="center"><b>Value</b></td>
                                <td align="center"><b>Description</b></td>
                            </tr>
                            <tr>
                                <td>5, 10, 20, 30, 45</td>
                                <td>5, 10, 20, 30, 45 minutes before the event</td>
                            </tr>
                            <tr>
                                <td>60, 120, 180,</td>
                                <td>1, 2, 3 hours before the event</td>
                            </tr>
                            <tr>
                                <td>startTime - startDay</td>
                                <td>The day of the event (reminder sent at 12:00am)</td>
                            </tr>
                            <tr>
                                <td>startTime - (startDay - (1440 * x))</td>
                                <td>"x" days before the event (reminder sent at 12:00am "x" days before)</td>
                            </tr>
                        </table>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="interruptability"
                type="xsd:int"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This optional element defines how interruptible this event is and it is
                        used by notification routing software to make decisions about the relay
                        and deferral of notifications that might occur while this meeting is
                        active. The value contained in this element is a numeric value between
                        1 - 10. Low values represent a high cost of disruption, high values
                        represent a low cost of disruption.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="lastSentTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        Required by reminder engine.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="nextTriggerTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        Determines the next time to trigger reminder.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
<!-- WHFIX:  myNotifications should handle this.
            <xsd:element name="device" type="deviceEnum">
                <xsd:annotation>
                    <xsd:documentation>
                        Allow for client, mobile, email, and messenger notifications
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="deviceId" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        Specifies the device to send to.  This may be an email address, a messenger Id,
                        or a mobile alert number/id. <b>TBD</b>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="reminderMessage"
                type="hs:localizableString"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Optional message to be sent on a notification.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="reminderBlueType">
        <xsd:complexContent>
            <xsd:extension base="reminderType">
                <xsd:sequence>
                </xsd:sequence>

                <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="attendeeEventExtraType">
        <xsd:annotation>
            <xsd:documentation>
                Additional information about an event, found only in an
                event invitee's schema
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <xsd:element
                name="intendedFreeBusy"
                type="freeBusyStatusType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The intendedFreeBusy element is the event organizer's freeBusy information
                        and is thus equal to event/freeBusyStatus.  Invitees may overwrite event/freeBusyStatus
                        with a new value, and intendedFreeBusy is intended to store the organizer's original
                        freeBusyStatus.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:group ref="attendeeResponseGroup"/>

            <xsd:element
                name="delegateResponder"
                type="hs:userReference"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        A delegate who responds on behalf of an invitee will have their information
                        stored here.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:any
                processContents="skip"
                namespace="##other"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Additional attendee extra properties.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:any>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="attendeeType">
        <xsd:annotation>
            <xsd:documentation>
                The attendeeType contains the full information about an attendee.
                The display, email, puid, and the attendee's response.
            </xsd:documentation>
        </xsd:annotation>

        <!-- WHFIX:  This is the only way to do an extension based on 2
             different groups...make 1st an extension, include 2nd as a group.
        -->
        <xsd:complexContent>
            <xsd:extension base="attendeeInfoType">
                <xsd:sequence>
                    <xsd:group ref="attendeeResponseGroup"/>

                    <xsd:any
                        processContents="skip"
                        namespace="##other"
                        minOccurs="0"
                        maxOccurs="unbounded"
                        >
                    </xsd:any>

                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
<!--
        <xsd:sequence>
            <xsd:group ref="attendeeInfoGroup"/>
            <xsd:group ref="attendeeResponseGroup"/>
        </xsd:sequence>
-->
    </xsd:complexType>

    <xsd:complexType name="attendeeInfoType">
        <xsd:complexContent>
            <xsd:extension base="hs:userReference">
                <xsd:sequence>
                    <xsd:element
                        name="inviteType"
                        type="inviteTypeEnum"
                        >
                        <xsd:annotation>
                            <xsd:documentation>
                                The meeting organizer uses this to define the kind of invitee {required, optional, resource}.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>

                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

<!--
    <xsd:group name="attendeeInfoGroup">
        <xsd:sequence>
            <xsd:element
                name="displayName"
                type="hs:localizableString"
                >
            </xsd:element>
            <xsd:element
                name="puid"
                type="hs:puidType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        TODO: need to figure out if there is a better way to use this information.
                        That is, perhaps a link to the contact information is better. However, if the
                        attendee isn't a .NET My Services user or isn't in .NET Contacts, then we need the other fields.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="email" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        E-mail address of user.  The user may be a non-.NET My Services user.  Precedence is given
                        to the puid fragment before the email fragment.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:group>
-->

    <xsd:complexType name="attendeeResponseType">
        <xsd:group ref="attendeeResponseGroup"/>
    </xsd:complexType>

    <xsd:group name="attendeeResponseGroup">
        <xsd:sequence>
            <xsd:element
                name="responseTime"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The reply time on each attendee is set to the current time (Now) when the organizer
                        sends a meeting invitation.  When the attendee responds, they always update their
                        responseTime. When the organizer receives responses, they will honor only those that
                        have a higher responseTime than what s/he maintains in his/her own copy of the event for
                        each attendee. While processing the response, the organizer will update their
                        responseTime. This guarantees that the organizer honors only the most recent response
                        from the attendee.  This is stored in UTC.
                        <br/><b>ICAL Equivalent</b>: reply time on message.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="responseType"
                type="attendeeAcceptEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The accept status indicates the valid types of responses that an attendee
                        can reply with {accept, decline, tentative, counterpropose}.  The absense
                        of this field indicates that no response has been recorded (either the
                        invitation has not been sent, or that a reply has not been received).
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="counterProposeStartTime"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        If responseType=[counterPropose], then either the {startTime, endTime}, or
                        location, or both can be present.  This is the invitee's counterProposal
                        for a new start time for the meeting.  This is stored in UTC.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="counterProposeEndTime"
                type="xsd:dateTime"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        If responseType=[counterPropose], then either the {startTime, endTime}, or
                        location, or both can be present.  This is the invitee's counterProposal
                        for a new end time for the meeting.  This is stored in UTC.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="counterProposeLocation"
                type="xsd:string"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        If responseType=[counterPropose], then either the {startTime, endTime}, or
                        location, or both can be present.  This is the invitee's counterProposal
                        for a location for the meeting.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="responseBody"
                type="hs:longText"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Optional message for invitees to include along with the response.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

        </xsd:sequence>
    </xsd:group>

    <xsd:simpleType name="inviteTypeEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="required"/>
            <xsd:enumeration value="optional"/>
            <xsd:enumeration value="resource"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="attendeeAcceptEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="accept"/>
            <xsd:enumeration value="decline"/>
            <xsd:enumeration value="tentative"/>
            <xsd:enumeration value="counterPropose"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="meetingStatusEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="not-sent"/>
            <xsd:enumeration value="sent"/>
            <xsd:enumeration value="cancelled"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="freeOrBusyEventType">
        <xsd:sequence>
            <xsd:element name="startTime" type="xsd:dateTime"/>
            <xsd:element name="endTime" type="xsd:dateTime"/>
            <xsd:element name="type" type="xsd:string">
                <xsd:annotation>
                    <xsd:documentation>
                        The type belongs to the following enumeration {free, tentative, busy, away}.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="deviceEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="client"/>
            <xsd:enumeration value="email"/>
            <xsd:enumeration value="messenger"/>
            <xsd:enumeration value="mobile"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="domainStandardMethodParametersType">
        <xsd:sequence>
            <xsd:element
                name="calendarType"
                type="calendarLocaleEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Optional calendar type to return.  Defaults to Gregorian.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="startTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        The starting time window of calendar objects to retrieve.
                        This dateTime also contains the timeZone to retrieve the
                        calendar information in.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="endTime" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>
                        The ending time window to retrieve calendar objects.
                        This dateTime also contains the timeZone to retrieve the
                        calendar information in. It must be the same timeZone as
                        startTime.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
<!--
            <xsd:element
                name="tzid"
                type="tzidEnum"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Determines the time zone of the window for which to pull
                        events.  If neither tzid or biasOffset are present,
                        getCalendarDays defaults to UTC (+0:00).  Note that
                        defaulting to UTC or specifying UTC will also pull
                        floating events because we store all dateTimes in UTC.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="biasOffset"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Determines the biasOffset of the window for which to pull
                        events.  It takes the form [GMT/UTC]{+/-}xx[:yy].  In other
                        words, it is a GMT/UTC bias for (thin) clients who would
                        prefer to specify the bias instead of an enum.  If neither
                        tzid or biasOffset are present, getCalendarDays defaults
                        to UTC (+0:00).  tzid takes precedence over biasOffset.  It
                        is restricted to a maximum of 9 characters.
                        <b>TODO:  convert to RegEx.</b>
                    </xsd:documentation>
                </xsd:annotation>

                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="9"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:element>

            <xsd:element
                name="puid"
                type="hs:puidType"
                minOccurs="1"
                maxOccurs="64"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        The puid of the user for whom to retrieve calendar information.
                        <br/>TODO:  need email/nickname/puid reverse-lookup mechanism.
                        This is required for meeting invitations as well.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
-->
        </xsd:sequence>
    </xsd:complexType>

    <!--
    //  Domain specific methods
    //  getCalendarDays Request
    -->
    <xsd:element name="getCalendarDaysRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function returns an XML stream of calendar appointments /
                events between two dates. Recurrence rules are expanded to create
                individual calendar items.  Holidays are represented as all-day
                events, and these are returned as well.  getCalendarDays is a
                query-retrieval of data, but the behavior expands recurrence rules
                into individual (aliased) events, adds in holidays, and adds regular
                events and sorts the entire list based on start time. No merging of
                event blocks occurs.  Any object which overlaps the method parameters
                {startTime, endTime} will be returned. For example, if an event crosses
                midnight and the startTime is 12am, that event will be returned. In
                case the startDate, endDate is one day, the events are
                sorted in the following order: holidays, all-day events, and regular
                events (based on startTime).

                <br/>The {startTime, endTime] time window can define any
                interval:  24hr period, week, month, or any other user-defined
                period.
                <br/><b>getCalendarDays</b> returns the calendaring info of
                any puid that is specified for which the caller has sufficient
                privileges.  The user's own puid must be specified to retrieve their own
                information.
                <br/><b>getCalendarDays</b> may be used to retrieve multiple calendar data from
                other users using
                <li>&lt;h:key instance="0" cluster="0" puid="xyz"/&gt;</li>

                in the SOAP headers provided that puid "xyz" is provisioned on the .NET Calendar
                server, and provided that the user has been granted access in puid "xyz"'s rolelist.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="domainStandardMethodParametersType">
                    <xsd:sequence>
                        <xsd:element name="removeRecurrence" type="xsd:boolean" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Normally, the recurrence sub-schema, (minus modifiedException and minus
                                    deletedExceptionDate components) is returned with each instance of a
                                    recurring event, like "recurring-instance" and "recurring-exception".  This
                                    allows clients to properly render the recurrence pattern without having
                                    to explicitly query the recurring-master.  However, because it is heavy
                                    on bandwith, .NET Calendar includes the option to not return this data.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="getCalendarDaysResponse">
        <xsd:annotation>
            <xsd:documentation>
                Response XML blob format, consists of the base event type minus recurrence.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="event"
                    minOccurs="0"
                    maxOccurs="unbounded"
                    >
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element
                                name="body"
                                type="bodyType"
                            />

                            <xsd:element
                                name="attachment"
                                type="attachmentMetadataType"
                                minOccurs="0"
                                maxOccurs="unbounded"
                            />

                            <xsd:element
                                name="reminder"
                                type="reminderType"
                                minOccurs="0"
                                maxOccurs="1"
                            />

                            <xsd:element
                                name="attendee"
                                type="attendeeType"
                                minOccurs="0"
                                maxOccurs="unbounded"
                            />

                            <xsd:element
                                name="recurrence"
                                type="recurrenceBaseType"
                                minOccurs="0"
                                maxOccurs="1"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Depending on if &lt;removeRecurrence&gt; parameter is passed into getCalendarDays
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute
                            name="instanceType"
                            type="instanceTypeEnum"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Distinguishes between a single instance of an event or an instance of a recurring event.
                                    The recurring instance is a modified exception if eventBody/recurrenceId is present:
                                    single, recurring-master, recurring-instance, recurring-exception.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>
                        <xsd:attribute name="calendarType" type="calendarLocaleEnum"/>
                        <xsd:attribute name="advanceHijriValue" type="hijriValueEnum"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>

            <xsd:attributeGroup ref="hs:standardResponseAttributeGroup"/>

        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  getCalendarView Request
    -->
<!--
    <xsd:element name="getCalendarViewRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function allows a user to retrieve unexpanded calendar
                information in a method similar to unmerged freebusy info.
                Each block contains the [startTime, endTime], plus a puid
                alias back to the original event.  Specific properties of
                that event may be surfaced in a future schema revision.
                <br/><br/>getCalendarView presents an alternate method to
                retrieve lightweight data, where a user is interested in
                where events lie in their calendar, but they wish to defer
                loading of that event for performance, bandwidth, or
                additional processing reasons.  This method is an
                additional view of the calendar information.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="startTime" type="xsd:dateTime" use="required">
                    <xsd:annotation>
                        <xsd:documentation>
                            The starting time window of calendar objects to retrieve.
                            This dateTime also contains the timeZone to retrieve the
                            calendar information in.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="endTime" type="xsd:dateTime" use="required">
                    <xsd:annotation>
                        <xsd:documentation>
                            The ending time window of calendar objects to retrieve.
                            This dateTime also contains the timeZone to retrieve the
                            calendar information in. It must be the same timeZone as
                            startTime.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element
                    name="puid"
                    type="hs:puidType"
                    minOccurs="1"
                    maxOccurs="64">
                    <xsd:annotation>
                        <xsd:documentation>
                            The puid of the user for whom to retrieve calendar information.
                            <br/>TODO:  need email/nickname/puid reverse-lookup mechanism.
                            This is required for meeting invitations as well.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="getCalendarViewResponse">
        <xsd:annotation>
            <xsd:documentation>
                Response XML blob format.
                <b>CONSIDER</b>: surfacing additional user-specified properties.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="user"
                    minOccurs="1"
                    maxOccurs="64"
                    >
                    <xsd:complexType>
                        <xsd:attribute
                            name="puid"
                            type="hs:puidType"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Puid of this particular user's calendar information.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:sequence>
                            <xsd:element name="startTime" type="xsd:dateTime">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        The time when this event starts, might be an instance of a recurrence.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                            <xsd:element name="endTime" type="xsd:dateTime">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        The time when this event ends, might be an instance of a recurrence.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>

                            <xsd:element
                                name="event"
                                minOccurs="0"
                                maxOccurs="unbounded"
                                >
                                <xsd:complexType>
                                    <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>
                                    <xsd:sequence>
                                        <xsd:element name="name" type="hs:localizableString"/>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element
                                name="error"
                                type="xsd:string"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        TODO:  per-user error information.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>

            <xsd:attributeGroup ref="hs:standardResponseAttributeGroup"/>

        </xsd:complexType>
    </xsd:element>
-->

    <!--
    //  Domain specific methods
    //  getFreeBusyDays Request
    -->
    <xsd:element name="getFreeBusyDaysRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function returns a stream of xml fragments defining the user's
                freeBusy information between two dates.  Single events and recurring
                events within the time window are translated into blocks of free/busy
                time.
                <br/><b>getFreeBusyDays</b> only returns the blocks and their
                associated type.  There is no explicit method to return unmerged
                freeBusy info, that kind of behavior is fully contained within
                getCalendarDays.
                <br/>This method follows the precedence order:
                <ul>
                    <li>Away(OOF), Busy, Tentative, Free</li>
                    <li>Overlapping blocks of the same freeOrBusyStatus kind
                        are coalesced to form larger blocks.</li>
                    <li>Overlapping blocks of different freeOrBusyStatus are
                        overlaid.  The events with higher precedence overlay
                        on top (<b>not</b> by starting time).</li>
                </ul>
                <br/>For example:
                <li>Busy from 8 to 9</li>
                <li>Tentative from 8:30 to 10</li>
                <li>OOF from 9:30 to 11</li>
                <li>Free from 10:30 to 12</li>

                <br/>Merged as:
                <li>Busy from 8 to 9</li>
                <li>Tentative from 9 to 9:30</li>
                <li>OOF from 9:30 to 11</li>
                <li>Free from 11 to 12</li>

                <br/>Multiple users' freeBusy information are retrieved
                by specifying a puid for each user in question.  The caller of
                this function must also specify their own puid, no implicit
                assumptions are made.
                <br/>The calling method takes a startDate and an endDate to
                define the duration over which freebusy information is returned.
                A third parameter determines if free blocks are explicitly
                returned.  Free blocks are intervals where no calendar object
                exists.

                <br/><b>getFreeBusyDays</b> may be used to retrieve multiple calendar data from
                other users using
                <li>&lt;h:key instance="0" cluster="0" puid="xyz"/&gt;</li>

                in the SOAP headers provided that puid "xyz" is provisioned on the .NET Calendar
                server, and provided that the user has been granted access in puid "xyz"'s rolelist.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="domainStandardMethodParametersType">
                    <xsd:sequence>
                        <xsd:element name="getFreeBlocks" type="xsd:boolean" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    This boolean causes .NET Calendar to explicitly return
                                    free time as freeBusy blocks.  By default, free blocks are not returned.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="returnIndividualBlocks" type="xsd:boolean" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    This boolean causes .NET Calendar not to coalesce/merge freeBusy information.
                                    By default, freeBusy information is merged.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="getFreeBusyDaysResponse">
        <xsd:annotation>
            <xsd:documentation>
                Response XML blob format, consists of freebusy xml fragments.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="freeOrBusyEvent"
                    type="freeOrBusyEventType"
                    minOccurs="0"
                    maxOccurs="unbounded"
                />
            </xsd:sequence>

            <xsd:attributeGroup ref="hs:standardResponseAttributeGroup"/>

        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  sendMeeting Request
    -->
    <xsd:element name="sendMeetingRequest">
        <xsd:annotation>
            <xsd:documentation>
                The purpose of this method is for a meeting organizer to invite and uninvite
                (cancel) attendees to this event.  sendMeeting also sends updated invitations
                to existing invitees.  Inviting a user to a single instance of a recurring
                event will cause only that instance to be sent.  However, future updates to
                that event will overwrite the existing instance, including the case where an
                update is the full recurring event.
                <br/>Meeting requests will be sent out as iCal attachments from an SMTP server
                unknown at this point in the design.
                <br/>When inviting or uninviting, .NET Calendar searches for these existing
                attendees by puid first, and then by email address such that the puid receives
                precedence in the search predication.  .NET Calendar will not allow multiple
                meeting requests/cancellations to the same puid or email address within the
                scope of the same invite or uninvite block.  However, an organizer may uninvite
                an attendee and then reinvite again (non-standard behavior).
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:attribute name="eventId" type="hs:idRefType" use="required">
                <xsd:annotation>
                    <xsd:documentation>
                        This is the puid of the event which to send meeting invitations
                        or cancellations to.  This event must already exist within the
                        .NET Calendar service.  Additional server constraints are
                        implemented which verify that potential updates to the attendee
                        tables occur for this event only.  This is a required field.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>

            <xsd:attribute name="criticalChange" type="xsd:boolean" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        When this attribute is set to "true", &lt;lastUpdateTime&gt; is
                        updated when invitations are sent to the attendees.  If "false",
                        &lt;lastUpdateTime&gt; remains untouched.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>

            <xsd:attribute name="recurrenceId" type="xsd:dateTime" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        The optional recurrenceId allows the meeting organizer to send
                        invitations for only a particular instance of a recurring event.
                        If the event is not a recurring event, or if recurrenceId does
                        not correspond to a valid instance/exception, sendMeetingRequest
                        will fail with an error.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>

            <xsd:attribute name="continueOnFailure" type="xsd:boolean" use="required">
                <xsd:annotation>
                    <xsd:documentation>
                        Specifies to .NET Calendar to continue performing the
                        sendMeetingRequest even on a failure.  Points of failure:

                        <li>&lt;uninvite&gt; may delete attendees, and the HSDL delete may encounter errors</li>
                        <li>&lt;updateRequest&gt; may encounter HSDL errors.</li>
                        <li>The optional final delete of the event may encounter errors.</li>
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>

            <xsd:attribute name="deleteOnCompletion" type="xsd:boolean" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        This event will be deleted upon completion of this sendMeetingRequest.
                        This behavior is intended for deleting a meeting and sending cancellations.
                        If recurrenceId is present (and valid), <b>only this particular recurring
                        instance or exception is deleted</b>, in which case a new
                        &lt;deletedExceptionDate&gt; is added to the recurrence rule.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>

            <xsd:sequence>
                <xsd:element name="uninvite">
                    <xsd:complexType>
                        <xsd:attribute name="behavior" type="sendMeetingBehaviorEnum" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    This attribute will give the option to either choose to send
                                    cancellations to "all" attendees in the event's attendee table,
                                    or send to "none" of them.  A third value of "default" would
                                    give the default behavior of sending cancellations to all
                                    attendees who are replaced in the &lt;replaceRequest&gt; block.
                                    When this attribute is set, .NET Calendar will ignore anything
                                    within the &lt;uninvite&gt; node.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:sequence>
                            <xsd:element
                                name="attendee"
                                type="uninviteAttendeeType"
                                minOccurs="0"
                                maxOccurs="unbounded"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Contains a list of people to uninvite.  Uninvited attendees must already exist
                                        in the organizer's attendee table, or else these users are ignored.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>

                <xsd:element
                    name="replaceRequest"
                    type="hs:replaceRequestType"
                    minOccurs="0"
                    maxOccurs="1"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            This replace request can only affect the meeting invitation in question, and is
                            thus constrained to be only @select="/m:myCalendar/m:event[@id=@eventId]/...".
                            It will not be allowed to replace-on-null so that event creation cannot be a
                            side-effect.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>

                <xsd:element name="invite">
                    <xsd:complexType>
                        <xsd:attribute name="behavior" type="sendMeetingBehaviorEnum" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    This attribute will give the option to either choose to send
                                    invitations to "all" attendees in the event's attendee table,
                                    or send to "none" of them.  A third value of "default" would
                                    give the default behavior of sending invitations to only the
                                    new attendees in the &lt;replaceRequest&gt; block.  When this
                                    attribute is set, .NET Calendar will ignore anything within
                                    the &lt;invite&gt; node.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:sequence>
                            <xsd:element
                                name="attendee"
                                type="hs:userReference"
                                minOccurs="0"
                                maxOccurs="unbounded"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Contains information about this attendee to be invited.  An invited
                                        attendee must already exist in the organizer's attendee table.  This
                                        attendee may originally be there prior to the sendMeetingRequest
                                        method, or be the result of the update operation to this meeting.
                                        <br/>To change the attendee's inviteType, the update operation should
                                        be used.
                                        <br/>When invitations are sent, the attendee's &lt;responseTime&gt;
                                        is set to the current time (now) as a side-effect.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>

            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  respond Request
    -->
    <xsd:element name="respondRequest">
        <xsd:annotation>
            <xsd:documentation>
                The purpose of this method is for a meeting invitee to respond to an
                invitation.  Invitees may accept, decline, accept tentatively, or
                counterpropose in some means.  Currently, we allow the counterproposing
                of time and location, but we may consider future additions.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="attendeeResponseType">
                    <xsd:sequence>
                        <xsd:element name="eventId" type="hs:idRefType">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The eventId for the meeting.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="puid" type="hs:puidType">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The invitee.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  setReminder Request
    -->
    <xsd:element name="updateReminderRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function is used to update the status of a reminder once the
                user has received the notification.  We may expose this as an
                HTTP API so that non-.NET My Services clients have a means to dismiss,
                snooze, or be reminded again at a different time.  (WIP)
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="reminder"
                    type="reminderType"
                />
                <xsd:element
                    name="id"
                    type="hs:idRefType"
                />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="setReminderResponse">
        <xsd:annotation>
            <xsd:documentation>
                Response XML blob format, contains the myAlerts hs:idType
                for the resultant create/modify operation.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="notificationId"
                    type="hs:idRefType"
                    minOccurs="0"
                    maxOccurs="1"
                />
            </xsd:sequence>

            <xsd:attributeGroup ref="hs:standardResponseAttributeGroup"/>

        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  deleteReminder Request
    -->
    <xsd:element name="deleteReminderRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function delegates a call to .NET Alerts to delete
                an existing meeting reminder.  .NET Calendar acts as a client
                to the Notification Service.  In the underlying implementation,
                setReminderRequest simply issues a .NET My Services delete message.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="notificationId"
                    type="hs:idRefType"
                    minOccurs="0"
                    maxOccurs="1"
                />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <!--
    //  Domain specific methods
    //  getQuickView Request
    -->
    <xsd:element name="getQuickViewRequest">
        <xsd:annotation>
            <xsd:documentation>
                This function provides an efficient, lightweight means to query a
                date range to indicate days that have 1 or more appointments (1)
                and days without appointments (0).  Outlook and OWA use this for
                their datepicker functionality.
                <br/><br/>The date range takes timeZone-specific start and end
                times, using just the year, month, and day.  The time zone can be a
                simple bias, since this is merely a request for data.  startTime
                and endTime are required to have the same time-zone bias.  In effect,
                the method "overlays" the incoming time zone onto the user's
                calendar to define the dayblocks for which the QuickView returns
                data.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="domainStandardMethodParametersType">
                    <xsd:sequence>
                        <xsd:element
                            name="tzid"
                            type="tzidEnum"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Optionally specifies a timezone to retrieve the quickView in.  If this or biasOffset are
                                    both missing, TZ_UTC is assumed.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element
                            name="biasOffset"
                            type="xsd:int"
                            minOccurs="0"
                            maxOccurs="1"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Optionally specifies a numeric <b>integer</b> offset timezone bias to retrieve the quickView in.
                                    tzid takes precedence over biasOffset (pending xsd:choice).
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="getQuickViewResponse">
        <xsd:annotation>
            <xsd:documentation>
                The return value of getQuickView is a list of calendar days
                grouped into months.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element
                    name="month"
                    minOccurs="1"
                    maxOccurs="unbounded"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            Specifies the month block for the grouping of calendar days.
                        </xsd:documentation>
                    </xsd:annotation>

                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element
                                name="day"
                                minOccurs="1"
                                maxOccurs="31"
                                >
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Specifies whether this day is free (0) or has at least one event
                                        on it or overlapping (1).
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:simpleContent>
                                        <xsd:extension base="xsd:boolean">
                                            <xsd:attribute name="d" type="dayValueEnum">
                                                <xsd:annotation>
                                                    <xsd:documentation>
                                                        Specifies day in this month.
                                                    </xsd:documentation>
                                                </xsd:annotation>
                                            </xsd:attribute>
                                        </xsd:extension>
                                    </xsd:simpleContent>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="m" type="monthValueEnum"/>
                        <xsd:attribute name="year" type="xsd:int"/>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>

            <xsd:attributeGroup ref="hs:standardResponseAttributeGroup"/>

        </xsd:complexType>
    </xsd:element>
<!-- ...............................................................................................................-->
<!--
    <xsd:complexType name="CalendarPrefType">
        <xsd:annotation>
            <xsd:documentation>
                Stores the user's global calendar preferences (myCalendar/*) or a meeting
                organizer's preferences (myCalendar/event/recurrence/*).  The latter case
                will override the user's global preferences and is used only for an
                invitation event that recurs.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
-->

    <xsd:complexType name="TimeZoneExtendedType">
        <xsd:annotation>
            <xsd:documentation>
                Contains the full (extended) structural definition of the timezone.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <xsd:element name="tzid" type="tzidEnum"/>

        <!--
                    <xsd:element
                        name="name"
                        type="hs:localizableString"
                        >
                        <xsd:annotation>
                            <xsd:documentation>
                                The current name of this time zone.  Time zones currently in
                                the daylight period will switch names to daylightName.  This
                                property is read only, except for id is <b>USER_DEFINED</b>.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
        -->
            <xsd:element
                name="standardBias"
                type="xsd:int"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        Specifies the current bias, in minutes, for local time translation.
                        The bias is the difference, in minutes, between Coordinated Universal
                        Time (UTC) and local time.  All translations between UTC and local
                        time are based on the following formula:
                        <PRE>UTC = local time + bias </PRE>
                        This property is read only, except for id is <b>USER_DEFINED</b>.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        <!--
                    <xsd:element
                        name="daylightName"
                        type="hs:localizableString"
                        minOccurs="0"
                        maxOccurs="1"
                        >
                        <xsd:annotation>
                            <xsd:documentation>
                                [Optional] Specifies the name of the timeZone during daylight periods.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
        -->
            <xsd:element
                name="additionalDaylightBias"
                type="xsd:int"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        [Optional] Specifies an additional bias value to be added to standardBias
                        used during local time translations that occur during daylight
                        saving time.  In most time zones, the value of this member is minus 60.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="standardDate"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This fragment describes the standard date to daylight date transition
                        using the RepeatYearlyByDay recurrence rule.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element
                            name="transitionRule"
                            type="transitionRuleType"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Specifies a date and local time when the transition from
                                    standard time to daylight time occurs.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="transitionTime"
                            type="xsd:dateTime"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Specifies the local time (e.g. 2am) to transition from standard
                                    to daylight.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element
                name="daylightDate"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This fragment describes the daylight date to standard date transition
                        using the RepeatYearlyByDay recurrence rule.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element
                            name="transitionRule"
                            type="transitionRuleType"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Specifies a date and local time when the transition from daylight
                                    saving time to standard time occurs.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>

                        <xsd:element
                            name="transitionTime"
                            type="xsd:dateTime"
                            >
                            <xsd:annotation>
                                <xsd:documentation>
                                    Specifies the local time (e.g. 2am) to transition from daylight
                                    to standard.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="freeBusyStatusType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="free"/>
            <xsd:enumeration value="busy"/>
            <xsd:enumeration value="tentative"/>
            <xsd:enumeration value="away"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="attachmentMetadataType">
        <xsd:annotation>
            <xsd:documentation>
                The scheme the message contents were encoded in.  Examples of this are '7bit', '8bit' and 'base64'.
            </xsd:documentation>
        </xsd:annotation>

        <xsd:sequence>
            <xsd:element name="name" type="hs:localizableString">
                <xsd:annotation>
                    <xsd:documentation>
                      This element contains information about an individual attachment in a mail message.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <!-- TODO: perhaps this should be an enumeration -->
            <!-- TODO: factor this out to a simpleType -->
            <xsd:element name="contentType" type="hs:string">
                <xsd:annotation>
                    <xsd:documentation>
                        This element contains the content type of the attachment.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <!-- TODO: validate this with a regex -->
            <xsd:element name="contentTransferEncoding" type="hs:string">
                <xsd:annotation>
                    <xsd:documentation>
                       This element contains the encoding of the attachment. This information is necessary
                       for decoding the attachment.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <!-- TODO: perhaps this should be an enumeration -->
            <!-- TODO: factor this out into a simpleType -->
            <xsd:element name="size" type="xsd:unsignedLong">
                <xsd:annotation>
                    <xsd:documentation>
                        This element contains the size of the attachment in bytes.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element name="attachmentBody" type="xsd:base64Binary" >
                <xsd:annotation>
                    <xsd:documentation>
                        This element contains the MIME body of the attachment.
                    </xsd:documentation>
                    <xsd:appinfo>
                        <xdb:system type="calculatedFieldLateBound"/>
                    </xsd:appinfo>
                </xsd:annotation>
            </xsd:element>

        </xsd:sequence>
    </xsd:complexType>

    <xsd:simpleType name="cdataContentType">
        <xsd:annotation>
            <xsd:documentation>
                Contains the attachment body.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

    <xsd:simpleType name="attachmentIdType">
        <xsd:annotation>
            <xsd:documentation>
                The system define unique id of an attachment on a given message.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:maxLength value="128"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="instanceTypeEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="single"/>
            <xsd:enumeration value="recurring-master"/>
            <xsd:enumeration value="recurring-instance"/>
            <xsd:enumeration value="recurring-exception"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="dayOfWeekEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="su"/>
            <xsd:enumeration value="mo"/>
            <xsd:enumeration value="tu"/>
            <xsd:enumeration value="we"/>
            <xsd:enumeration value="th"/>
            <xsd:enumeration value="fr"/>
            <xsd:enumeration value="sa"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="weekdayOfMonthEnum">
        <xsd:annotation>
            <xsd:documentation>
                Specifies which week in a month [first, second, third, fourth, last].
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="first"/>
            <xsd:enumeration value="second"/>
            <xsd:enumeration value="third"/>
            <xsd:enumeration value="fourth"/>
            <xsd:enumeration value="last"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="weekDayAttributesType">
        <xsd:annotation>
            <xsd:documentation>
                This element's attributes contain whether a given day is or is not considered
                by the user as part of the work week.  If this element has no attributes, we
                will assume that the user has a Monday to Friday work week.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="su" type="xsd:boolean"/>
        <xsd:attribute name="mo" type="xsd:boolean"/>
        <xsd:attribute name="tu" type="xsd:boolean"/>
        <xsd:attribute name="we" type="xsd:boolean"/>
        <xsd:attribute name="th" type="xsd:boolean"/>
        <xsd:attribute name="fr" type="xsd:boolean"/>
        <xsd:attribute name="sa" type="xsd:boolean"/>
    </xsd:complexType>

    <xsd:simpleType name="allDaysEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="day"/>
            <xsd:enumeration value="weekday"/>
            <xsd:enumeration value="weekend day"/>
            <xsd:enumeration value="su"/>
            <xsd:enumeration value="mo"/>
            <xsd:enumeration value="tu"/>
            <xsd:enumeration value="we"/>
            <xsd:enumeration value="th"/>
            <xsd:enumeration value="fr"/>
            <xsd:enumeration value="sa"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="dayValueEnum">
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="1"/>
            <xsd:maxInclusive value="31"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="monthValueEnum">
        <xsd:annotation>
            <xsd:documentation>
                Restrict to 1-13.  Some calendars have 13 months.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="1"/>
            <xsd:maxInclusive value="13"/>
        </xsd:restriction>
<!--
    TODO:  consider xsd:union?

    <xsd:element name='size'>
    <xsd:simpleType>
      <xsd:union>
        <xsd:simpleType>
          <xsd:restriction base='integer'/>
        </xsd:simpleType>
        <xsd:simpleType>
          <xsd:restriction base='string'/>
        </xsd:simpleType>
      </xsd:union>
    </xsd:simpleType>
  </xsd:element>

  <size>1</size>
  <size>large</size>
  <size xsi:type='xsd:string'>1</size>


        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="Jan"></xsd:enumeration>
            <xsd:enumeration value="Feb"></xsd:enumeration>
            <xsd:enumeration value="Mar"></xsd:enumeration>
            <xsd:enumeration value="Apr"></xsd:enumeration>
            <xsd:enumeration value="May"></xsd:enumeration>
            <xsd:enumeration value="Jun"></xsd:enumeration>
            <xsd:enumeration value="Jul"></xsd:enumeration>
            <xsd:enumeration value="Aug"></xsd:enumeration>
            <xsd:enumeration value="Sep"></xsd:enumeration>
            <xsd:enumeration value="Oct"></xsd:enumeration>
            <xsd:enumeration value="Nov"></xsd:enumeration>
            <xsd:enumeration value="Dec"></xsd:enumeration>
        </xsd:restriction>
-->
    </xsd:simpleType>

    <xsd:simpleType name="tzidEnum">
        <xsd:annotation>
            <xsd:documentation>
                This is a .NET My Services specific integer enumeration defining
                the exact supported time zone.  If id is <b>USER_DEFINED = -1</b>,
                then this time zone's schema defines the entire time zone
                rule, including any applicable daylight bias. <b>.NET My Services
                clients are expected to understand the base set of
                enumerations.  .NET Calendar as a service will provide the
                enumerations and the additional metadata necessary to
                fully describe the time zone, including daylight calculations.
                .NET Calendar will not provide localizable names for the
                enumerations.</b>
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="-1"/>
        </xsd:restriction>
<!--
        <xsd:union>
            <xsd:simpleType>
                <xsd:restriction base="xsd:int">
            </xsd:simpleType>
            <xsd:simpleType>
                <xsd:restriction base='string'>
                    <xsd:enumeration value="USER_DEFINED"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:union>
-->
    </xsd:simpleType>

    <xsd:simpleType name="hijriValueEnum">
        <xsd:restriction base="xsd:int">
            <xsd:minInclusive value="-3"/>
            <xsd:maxInclusive value="3"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="sensitivityEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="normal"/>
            <xsd:enumeration value="personal"/>
            <xsd:enumeration value="private"/>
            <xsd:enumeration value="confidential"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="calendarLocaleEnum">
        <xsd:annotation>
            <xsd:documentation>
                This field identifies an enumeration which determines the kind
                of calendar event this is.  <b>.NET My Services v1 will only support HSCAL_GREGORIAN_US.</b>
                <br/><a href="http://msdn.microsoft.com/library/psdk/winbase/nls_9bg8.htm">http://msdn.microsoft.com/library/psdk/winbase/nls_9bg8.htm</a>
                plus several others:
                <br/><br/>
                <table cellpadding="1" cellspacing="1" border="1">
                    <tr>
                        <td align="center"><b>Value</b></td>
                        <td align="center"><b>Enumeration Constant</b></td>
                        <td align="center"><b>Description</b></td>
                    </tr>
                    <tr>
                        <td>-1</td>
                        <td>HSCAL_ALL_CALENDARS</td>
                        <td>Unknown Calendar; system default (HSCAL_GREGORIAN_US)</td>
                    </tr>
                    <tr>
                        <td>1</td>
                        <td>HSCAL_GREGORIAN</td>
                        <td>Gregorian (localized) calendar</td>
                    </tr>
                    <tr>
                        <td>2</td>
                        <td>HSCAL_GREGORIAN_US</td>
                        <td>Gregorian (U.S.) calendar</td>
                    </tr>
                    <tr>
                        <td>3</td>
                        <td>HSCAL_JAPAN</td>
                        <td>Japanese Emperor Era calendar</td>
                    </tr>
                    <tr>
                        <td>4</td>
                        <td>HSCAL_TAIWAN</td>
                        <td>Taiwan Era calendar</td>
                    </tr>
                    <tr>
                        <td>5</td>
                        <td>HSCAL_KOREA</td>
                        <td>Korean Tangun Era calendar</td>
                    </tr>
                    <tr>
                        <td>6</td>
                        <td>HSCAL_HIJRI</td>
                        <td>Hijri (Arabic Lunar) calendar</td>
                    </tr>
                    <tr>
                        <td>7</td>
                        <td>HSCAL_THAI</td>
                        <td>Thai calendar</td>
                    </tr>
                    <tr>
                        <td>8</td>
                        <td>HSCAL_HEBREW</td>
                        <td>Hebrew (Lunar) calendar</td>
                    </tr>
                    <tr>
                        <td>9</td>
                        <td>HSCAL_GREGORIAN_ME_FRENCH</td>
                        <td>Gregorian Middle East French calendar</td>
                    </tr>
                    <tr>
                        <td>10</td>
                        <td>HSCAL_GREGORIAN_ARABIC</td>
                        <td>Gregorian Arabic calendar</td>
                    </tr>
                    <tr>
                        <td>11</td>
                        <td>HSCAL_GREGORIAN_XLIT_ENGLISH</td>
                        <td>Gregorian Transliterated English calendar</td>
                    </tr>
                    <tr>
                        <td>12</td>
                        <td>HSCAL_GREGORIAN_XLIT_FRENCH</td>
                        <td>Gregorian Transliterated French calendar</td>
                    </tr>
                    <tr>
                        <td>13</td>
                        <td>HSCAL_KOREA_LUNAR</td>
                        <td>Default Korea Lunar calendar</td>
                    </tr>
                    <tr>
                        <td>14</td>
                        <td>HSCAL_JAPAN_LUNAR</td>
                        <td>Default Japanese Lunar calendar</td>
                    </tr>
                    <tr>
                        <td>15</td>
                        <td>HSCAL_CHINESE_LUNAR</td>
                        <td>Chinese Lunar calendar</td>
                    </tr>
                    <tr>
                        <td>16</td>
                        <td>HSCAL_SAKA</td>
                        <td>Indian Saka calendar</td>
                    </tr>
                    <tr>
                        <td>17</td>
                        <td>HSCAL_LUNAR_ETO_CHN</td>
                        <td>Chinese Zodiac calendar</td>
                    </tr>
                    <tr>
                        <td>18</td>
                        <td>HSCAL_LUNAR_ETO_KOR</td>
                        <td>Korean Zodiac calendar</td>
                    </tr>
                    <tr>
                        <td>19</td>
                        <td>HSCAL_LUNAR_ROKUYOU</td>
                        <td>Japanese Lucky days calendar</td>
                    </tr>
                </table>
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
<!--
            <xsd:minInclusive value="-1"/>
            <xsd:maxInclusive value="19"/>
-->
            <xsd:enumeration value="-1"/>
            <xsd:enumeration value="1"/>
            <xsd:enumeration value="2"/>
            <xsd:enumeration value="3"/>
            <xsd:enumeration value="4"/>
            <xsd:enumeration value="5"/>
            <xsd:enumeration value="6"/>
            <xsd:enumeration value="7"/>
            <xsd:enumeration value="8"/>
            <xsd:enumeration value="9"/>
            <xsd:enumeration value="10"/>
            <xsd:enumeration value="11"/>
            <xsd:enumeration value="12"/>
            <xsd:enumeration value="13"/>
            <xsd:enumeration value="14"/>
            <xsd:enumeration value="15"/>
            <xsd:enumeration value="16"/>
            <xsd:enumeration value="17"/>
            <xsd:enumeration value="18"/>
            <xsd:enumeration value="19"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="attachmentMetadataBlueType">
        <xsd:complexContent>
            <xsd:extension base="attachmentMetadataType">
                <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="attendeeBlueType">
        <xsd:complexContent>
            <xsd:extension base="attendeeType">
                <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="attendeeEventExtraBlueType">
        <xsd:complexContent>
            <xsd:extension base="attendeeEventExtraType">
                <xsd:attributeGroup ref="hs:unnamedBlueAttributeGroup"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="eventType">
        <xsd:sequence>
            <xsd:element
                name="body"
                type="bodyType"
            />

            <xsd:element
                name="attendeeEventExtra"
                type="attendeeEventExtraBlueType"
                minOccurs="0"
                maxOccurs="1"
            />

            <xsd:element
                name="attachment"
                type="attachmentMetadataBlueType"
                minOccurs="0"
                maxOccurs="unbounded"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        This element contains attachment metadata, name, content-type and id's, and
                        may also contain the attachmentBody.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>

            <xsd:element
                name="reminder"
                type="reminderBlueType"
                minOccurs="0"
                maxOccurs="1"
                >
                <xsd:annotation>
                    <xsd:documentation>
                        A user may optionally define a reminder for this appointment.  Reminders
                        for recurring appointments will be sent periodically before the appointment
                        as per the rules defined in the reminder subschema.  A non-recurring event may
                        have the following:

                        <li>Define no reminders</li>
                        <li>Define a reminder with &lt;set&gt; = "true"</li>
                        <li>Define a reminder with &lt;set&gt; = "false" (<b>useless</b>)</li><br/>

                        A recurring meeting may have any of the following:

                        <li>Define no reminders</li>
                        <li>Define a recurring reminder with all instances receiving reminders</li>
                        <li>To define no reminders by default, but to define reminders for particular
                        meeting instances in the exception body:  Create a reminder &lt;set&gt; = "false", and turn it on
                        and/or modify it for particular instances.</li>
                        <li>To define a recurring reminder, but turn it off for particular meeting instances:  Create a
                        reminder &lt;set&gt; = "true", and turn it off for particular instances.</li><br/>
                        If the event's reminder subschema is non-existent, yet the exception body has a reminder blob,
                        then the exception reminder is ignored.  The alternative is to require 1..1.
                    </xsd:documentation>
                </xsd:annotation>
<!--
                <xsd:annotation>
                    <xsd:documentation>
                        A user may optionally define 1 to 4 reminders for this event for
                        each device type.
                        Reminders are hosted on .NET Calendar, but they use .NET Alerts as
                        a gateway to deliver the actual notification.  Client-support
                        for reminders is also included in the base schema.  The user
                        may define any or all of the four kinds of reminders:
                        <br/><br/>
                        <table cellpadding="1" cellspacing="1" border="1">
                            <tr>
                                <td align="center"><b>Value</b></td>
                                <td align="center"><b>Description</b></td>
                            </tr>
                            <tr>
                                <td>client</td>
                                <td>Client performs the reminder</td>
                            </tr>
                            <tr>
                                <td>email</td>
                                <td>.NET Calendar sends an email to the specified address (via??)</td>
                            </tr>
                            <tr>
                                <td>messenger</td>
                                <td>.NET Calendar sends a messenger alert to the user (via .NET Alerts)</td>
                            </tr>
                            <tr>
                                <td>mobile</td>
                                <td>.NET Calendar sends a mobile alert to the user (via .NET Alerts)</td>
                            </tr>
                        </table>
                    </xsd:documentation>
                </xsd:annotation>
-->
            </xsd:element>

            <xsd:element
                name="attendee"
                type="attendeeBlueType"
                minOccurs="0"
                maxOccurs="unbounded"
                >
            </xsd:element>

            <xsd:element
                name="recurrence"
                type="recurrenceType"
                minOccurs="0"
                maxOccurs="1"
            />
        </xsd:sequence>
        <xsd:attributeGroup ref="hs:standardBlueAttributeGroup"/>

        <xsd:attribute
            name="calendarType"
            type="calendarLocaleEnum"
        />

        <xsd:attribute
            name="advanceHijriValue"
            type="hijriValueEnum"
            >
            <xsd:annotation>
                <xsd:documentation>
                    Required for Hijri calendar support.  @advanceHijriValue ranges from
                    {-3,-2,-1,1,2,3} and is added to the current date, but the day of the
                    week stays the same.  For example, if today is the 24th and
                    @advanceHijriValue is set to be +2, then the user sees the date as
                    being the 26th.  Typically @advanceHijriValue is +/-1, and this
                    suffices in most cases.  Theoretically it can be any number, but the
                    worst case scenario is +/-3.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>

<!--
    <xsd:complexType name="windowStartType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:dateTime">
                <xsd:attribute
                    name="isLeapYear"
                    type="xsd:boolean"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            International calendar support is used to save some
                            information about the year in which the recurrence was
                            created.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute
                    name="leapMonthValue"
                    type="monthValueEnum"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            International calendar support is used to save some
                            information about the year in which the recurrence was
                            created.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="windowEndType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:dateTime">
                    <xsd:attribute
                    name="repeatForever"
                    type="xsd:boolean"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            Overrides the windowEnd date and specifies that this recurrence repeats
                            forever.  Client implementations cannot depend on date values
                            repeating forever, like 23:59:59pm Dec 31, 9999 or 23:59 Aug 31, 4500.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute
                    name="repeatInstances"
                    type="xsd:int"
                    >
                    <xsd:annotation>
                        <xsd:documentation>
                            Overrides the windowEnd date and specifies that this recurrence repeats
                            for the specified number of instances.  repeatInstances and repeatForever
                            are mutually exclusive, but repeatInstances will override repeatForever
                            for errant schemas.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
-->

    <xsd:complexType name="uninviteAttendeeType">
        <xsd:complexContent>
            <xsd:extension base="hs:userReference">
                <xsd:attribute name="deleteAttendee" type="xsd:boolean">
                    <xsd:annotation>
                        <xsd:documentation>
                            Optionally specifies whether or not to delete this attendee
                            from the organizer's attendee table.  If the attendee is
                            not deleted, .NET Calendar will not know the status of this
                            attendee because the status {not-sent, sent, cancelled} is
                            not stored per-attendee.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:simpleType name="sendMeetingBehaviorEnum">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="all"/>
            <xsd:enumeration value="none"/>
            <xsd:enumeration value="default"/>
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>
