| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<!--Update operation for icalendar. |
|---|
| 3 |
This schema makes no assumptions about the service which provides access to |
|---|
| 4 |
calendar entities. It is up to including services to specify how to target the |
|---|
| 5 |
actual entity to be modified. |
|---|
| 6 |
|
|---|
| 7 |
This schema addresses the actual updates to the entity. |
|---|
| 8 |
--> |
|---|
| 9 |
|
|---|
| 10 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|---|
| 11 |
xmlns:xcup="urn:ietf:params:xml:ns:icalendar-upd-1.0" |
|---|
| 12 |
xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" |
|---|
| 13 |
targetNamespace="urn:ietf:params:xml:ns:icalendar-upd-1.0" |
|---|
| 14 |
elementFormDefault="qualified"> |
|---|
| 15 |
|
|---|
| 16 |
<!-- ==================================================================== |
|---|
| 17 |
We use a number of icalendar elements |
|---|
| 18 |
==================================================================== --> |
|---|
| 19 |
|
|---|
| 20 |
<xs:import schemaLocation="iCalendar.xsd" |
|---|
| 21 |
namespace="urn:ietf:params:xml:ns:icalendar-2.0" /> |
|---|
| 22 |
|
|---|
| 23 |
<xs:complexType name="updates-type"> |
|---|
| 24 |
<xs:annotation> |
|---|
| 25 |
<xs:documentation xml:lang="en"> |
|---|
| 26 |
List of updates to a calendar entity. |
|---|
| 27 |
</xs:documentation> |
|---|
| 28 |
</xs:annotation> |
|---|
| 29 |
<xs:sequence> |
|---|
| 30 |
<xs:element name="update" type="xcup:update-type" maxOccurs="unbounded"/> |
|---|
| 31 |
</xs:sequence> |
|---|
| 32 |
</xs:complexType> |
|---|
| 33 |
|
|---|
| 34 |
<xs:element name="updates" type="xcup:updates-type" /> |
|---|
| 35 |
|
|---|
| 36 |
<!-- An update has 2 parts: a select xs:element which determines what part of the |
|---|
| 37 |
entity is affected by the change and the actual change --> |
|---|
| 38 |
<xs:complexType name="update-type" > |
|---|
| 39 |
<xs:sequence> |
|---|
| 40 |
<xs:element name="select" type="xcup:select-type" /> |
|---|
| 41 |
<xs:choice> |
|---|
| 42 |
<xs:element ref="xcup:create"/> |
|---|
| 43 |
<xs:element ref="xcup:replace"/> |
|---|
| 44 |
<xs:element ref="xcup:delete"/> |
|---|
| 45 |
</xs:choice> |
|---|
| 46 |
</xs:sequence> |
|---|
| 47 |
</xs:complexType> |
|---|
| 48 |
|
|---|
| 49 |
<!-- This type selects the part of the entity to be acted on. |
|---|
| 50 |
For the moment this is simply an xpath expression |
|---|
| 51 |
--> |
|---|
| 52 |
<xs:simpleType name="select-type"> |
|---|
| 53 |
<xs:restriction base="xs:string"/> |
|---|
| 54 |
</xs:simpleType> |
|---|
| 55 |
|
|---|
| 56 |
<!-- ============================= create =============================== |
|---|
| 57 |
Create will add a new child element of the current selected node. |
|---|
| 58 |
If the node is a multi-valued property, e.g. categories, then the |
|---|
| 59 |
created child must be a new value. |
|---|
| 60 |
|
|---|
| 61 |
If the current node is a component or icalendar, then the new node may |
|---|
| 62 |
be a new property and values or a new component, e.g. an alarm for an |
|---|
| 63 |
event. |
|---|
| 64 |
--> |
|---|
| 65 |
<xs:complexType name="create-type" > |
|---|
| 66 |
<xs:sequence> |
|---|
| 67 |
<xs:choice> |
|---|
| 68 |
<!-- Add values to current property --> |
|---|
| 69 |
<xs:element name="values" type="xcup:array-of-values"/> |
|---|
| 70 |
|
|---|
| 71 |
<!-- Add parameters to current property --> |
|---|
| 72 |
<xs:element name="parameters" type="xcal:ArrayOfParameters"/> |
|---|
| 73 |
|
|---|
| 74 |
<!-- Add properties to current component or icalendar --> |
|---|
| 75 |
<xs:element name="properties" type="xcal:ArrayOfProperties"/> |
|---|
| 76 |
|
|---|
| 77 |
<!-- Add components to current component or icalendar --> |
|---|
| 78 |
<xs:element name="components" type="xcal:ArrayOfComponents"/> |
|---|
| 79 |
</xs:choice> |
|---|
| 80 |
</xs:sequence> |
|---|
| 81 |
</xs:complexType> |
|---|
| 82 |
|
|---|
| 83 |
<xs:element name="create" type="xcup:create-type"/> |
|---|
| 84 |
|
|---|
| 85 |
<!-- ============================= replace =============================== |
|---|
| 86 |
Replace will replace the current selected node or its value. |
|---|
| 87 |
|
|---|
| 88 |
if a parameter or property is targetted and if a value or values is |
|---|
| 89 |
provided we are replacing the value of the property or parameter. |
|---|
| 90 |
|
|---|
| 91 |
If the node is a multi-valued property, e.g. categories, all values will |
|---|
| 92 |
be replaced. |
|---|
| 93 |
|
|---|
| 94 |
Otherwise we are replacing the entire parameter, property or component and |
|---|
| 95 |
the replacement must be of the same kind. |
|---|
| 96 |
|
|---|
| 97 |
If the current node is a component or icalendar, then the entire component |
|---|
| 98 |
must be specified. |
|---|
| 99 |
--> |
|---|
| 100 |
<xs:complexType name="replace-type" > |
|---|
| 101 |
<xs:sequence> |
|---|
| 102 |
<xs:choice> |
|---|
| 103 |
<!-- Add values to current property --> |
|---|
| 104 |
<xs:element name="values" type="xcup:array-of-values"/> |
|---|
| 105 |
|
|---|
| 106 |
<!-- Add parameters to current property --> |
|---|
| 107 |
<xs:element name="parameters" type="xcal:ArrayOfParameters"/> |
|---|
| 108 |
|
|---|
| 109 |
<!-- Add properties to current component or icalendar --> |
|---|
| 110 |
<xs:element name="properties" type="xcal:ArrayOfProperties"/> |
|---|
| 111 |
|
|---|
| 112 |
<!-- Add components to current component or icalendar --> |
|---|
| 113 |
<xs:element name="components" type="xcal:ArrayOfComponents"/> |
|---|
| 114 |
</xs:choice> |
|---|
| 115 |
</xs:sequence> |
|---|
| 116 |
</xs:complexType> |
|---|
| 117 |
|
|---|
| 118 |
<xs:element name="replace" type="xcup:replace-type"/> |
|---|
| 119 |
|
|---|
| 120 |
<!-- ============================= delete =============================== |
|---|
| 121 |
Deletion will remove the current selected node or its value. |
|---|
| 122 |
--> |
|---|
| 123 |
<xs:complexType name="delete-type" > |
|---|
| 124 |
</xs:complexType> |
|---|
| 125 |
|
|---|
| 126 |
<xs:element name="delete" type="xcup:delete-type"/> |
|---|
| 127 |
|
|---|
| 128 |
<xs:complexType name="array-of-values"> |
|---|
| 129 |
<xs:sequence> |
|---|
| 130 |
<xs:element ref="xcup:base-value-type" maxOccurs="unbounded"/> |
|---|
| 131 |
</xs:sequence> |
|---|
| 132 |
</xs:complexType> |
|---|
| 133 |
|
|---|
| 134 |
<xs:element name="base-value-type" abstract="true" /> |
|---|
| 135 |
|
|---|
| 136 |
<xs:element name="boolean" type="xcal:booleanType" |
|---|
| 137 |
substitutionGroup="xcup:base-value-type" /> |
|---|
| 138 |
|
|---|
| 139 |
<xs:element name="cal-address" type="xcal:cal-addressType" |
|---|
| 140 |
substitutionGroup="xcup:base-value-type" /> |
|---|
| 141 |
|
|---|
| 142 |
<xs:element name="date" type="xs:string" |
|---|
| 143 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 144 |
|
|---|
| 145 |
<xs:element name="date-time" type="xs:string" |
|---|
| 146 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 147 |
|
|---|
| 148 |
<xs:element name="duration" type="xs:string" |
|---|
| 149 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 150 |
|
|---|
| 151 |
<xs:element name="float" type="xs:string" |
|---|
| 152 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 153 |
|
|---|
| 154 |
<xs:element name="integerType" type="xs:string" |
|---|
| 155 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 156 |
|
|---|
| 157 |
<xs:element name="period" type="xs:string" |
|---|
| 158 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 159 |
|
|---|
| 160 |
<xs:element name="recur" type="xcal:recurType" |
|---|
| 161 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 162 |
|
|---|
| 163 |
<xs:element name="text" type="xs:string" |
|---|
| 164 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 165 |
|
|---|
| 166 |
<xs:element name="time" type="xs:string" |
|---|
| 167 |
substitutionGroup="xcup:base-value-type"/> |
|---|
| 168 |
|
|---|
| 169 |
<xs:element name="uri" type="xcal:uriType" |
|---|
| 170 |
substitutionGroup="xcup:base-value-type" /> |
|---|
| 171 |
|
|---|
| 172 |
<xs:element name="utc-offset" type="xcal:utc-offsetType" |
|---|
| 173 |
substitutionGroup="xcup:base-value-type" /> |
|---|
| 174 |
</xs:schema> |
|---|