<?xml version="1.0" encoding="UTF-8"?>
<!--
     WS-Calendar Version 1.0
     Committee Specification Draft 04 / Public Review Draft 03
     17 June 2011
     Source: http://docs.oasis-open.org/ws-calendar/ws-calendar-spec/v1.0/csprd03/xsd/
     Copyright (c) The Calendaring and Scheduling Consortium 2010-2011. All Rights Reserved.
     Copyright (c) OASIS Open 2010-2011. All Rights Reserved. -->

<!-- iCalendar availability extension schema is
     intended to work in conjunction with conformant
     implementations of IETF RFC 5545
     ( http://www.rfc-editor.org/rfc/rfc5545.txt ),
     the normative specification of iCalendar. -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" targetNamespace="urn:ietf:params:xml:ns:icalendar-2.0" elementFormDefault="qualified">
	<!-- This schema extension defines properties and components for the availability
     components defined in draft-daboo-calendar-availability -->
	<!-- ===================== Value-types ================================  -->
	<xs:include schemaLocation="iCalendar-valtypes.xsd"/>
	<!-- ===================== Components =================================  -->
	<xs:include schemaLocation="iCalendar.xsd"/>
	<!-- ===================== Properties =================================  -->
	<xs:include schemaLocation="iCalendar-props.xsd"/>
	<!-- =====================================================================
       Calendar Properties
       ===================================================================== -->
	<!-- The BUSYTYPE property is used to specify the default busy time
      type.  The values correspond to those used by the "FBTYPE"
      parameter used on a "FREEBUSY" property, with the exception that
      the "FREE" value is not used.  If not specified on a component
      that allows this property, the default is "BUSY-UNAVAILABLE".
      
      busytypevalue = "BUSY" / "BUSY-UNAVAILABLE" /
                        "BUSY-TENTATIVE" / iana-token / x-name
                        ; Default is "BUSY-UNAVAILABLE"
      
   -->
	<xs:complexType name="BusytypePropType" mixed="false">
		<xs:annotation>
			<xs:documentation xml:lang="en">
       encodingparam      = "ENCODING" "="
                          ( "8BIT"
          ; "8bit" text encoding is defined in [RFC2045]
                          / "BASE64"
          ; "BASE64" binary encoding format is defined in [RFC4648]
                          )
      busytypevalue = "BUSY" 
                    / "BUSY-UNAVAILABLE" 
                    / "BUSY-TENTATIVE" 
                    / iana-token 
                    / x-name
                    
                    ; Default is "BUSY-UNAVAILABLE".
      </xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="xcal:TextPropertyType"/>
		</xs:complexContent>
	</xs:complexType>
	<!-- =====================================================================
       Calendar Components
       ===================================================================== -->
	<xs:complexType name="VavailabilityType" mixed="false">
		<xs:complexContent>
			<xs:extension base="xcal:VcalendarContainedComponentType">
				<xs:sequence>
					<xs:element name="components" type="xcal:ArrayOfVavailabilityContainedComponents"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="vavailability" type="xcal:VavailabilityType" substitutionGroup="xcal:vcalendarContainedComponent"/>
	<xs:complexType name="ArrayOfVavailabilityContainedComponents">
		<xs:sequence>
			<xs:element ref="xcal:available" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="AvailableType" mixed="false">
		<xs:complexContent>
			<xs:extension base="xcal:BaseComponentType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="available" type="xcal:AvailableType" substitutionGroup="xcal:baseComponent"/>
</xs:schema>

