| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<!DOCTYPE schema [ |
|---|
| 3 |
<!ENTITY ncname "\i\c*"> |
|---|
| 4 |
<!ENTITY qname "(&ncname;:)?&ncname;"> |
|---|
| 5 |
<!ENTITY aname "@&qname;"> |
|---|
| 6 |
<!ENTITY pos "\[\d+\]"> |
|---|
| 7 |
<!ENTITY attr "\[&aname;='(.)*'\]|\[&aname;="(.)*"\]"> |
|---|
| 8 |
<!ENTITY valueq "\[(&qname;|\.)="(.)*"\]"> |
|---|
| 9 |
<!ENTITY value "\[(&qname;|\.)='(.)*'\]|&valueq;"> |
|---|
| 10 |
<!ENTITY cond "&attr;|&value;|&pos;"> |
|---|
| 11 |
<!ENTITY step "(&qname;|\*)(&cond;)*"> |
|---|
| 12 |
<!ENTITY piq "processing-instruction\(("&ncname;")\)"> |
|---|
| 13 |
<!ENTITY pi "processing-instruction\(('&ncname;')?\)|&piq;"> |
|---|
| 14 |
<!ENTITY id "id\(('&ncname;')?\)|id\(("&ncname;")?\)"> |
|---|
| 15 |
<!ENTITY com "comment\(\)"> |
|---|
| 16 |
<!ENTITY text "text\(\)"> |
|---|
| 17 |
<!ENTITY nspa "namespace::&ncname;"> |
|---|
| 18 |
<!ENTITY cnodes "(&text;(&pos;)?)|(&com;(&pos;)?)|((π)(&pos;)?)"> |
|---|
| 19 |
<!ENTITY child "&cnodes;|&step;"> |
|---|
| 20 |
<!ENTITY last "(&child;|&aname;|&nspa;)"> |
|---|
| 21 |
]> |
|---|
| 22 |
<!-- This is the schema for the XML patch operations defined in RFC 5261 as |
|---|
| 23 |
modified for xcalendar updates and according to appropriate conventions. |
|---|
| 24 |
|
|---|
| 25 |
As this is intended for use in a SOAP environment the xs:any for the new or |
|---|
| 26 |
replacement value is going to be a problem. |
|---|
| 27 |
|
|---|
| 28 |
For icalendar patching we can restrict the value to be an icalendar element. |
|---|
| 29 |
|
|---|
| 30 |
We select the outer vcalendar is we wish to add a component |
|---|
| 31 |
|
|---|
| 32 |
We select a component if we wish to add a property or a component to that |
|---|
| 33 |
component or if we wish to delete that component |
|---|
| 34 |
|
|---|
| 35 |
We select a property to change it's parameters or it's value or delete it. The |
|---|
| 36 |
value can be a parameter to add, a new value for the property or nothing to delete |
|---|
| 37 |
|
|---|
| 38 |
We select a parameter to delete it or change its value. The value is a value-type |
|---|
| 39 |
element |
|---|
| 40 |
|
|---|
| 41 |
--> |
|---|
| 42 |
|
|---|
| 43 |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|---|
| 44 |
xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0" |
|---|
| 45 |
xmlns="urn:ietf:params:xml:ns:pidf-diff" |
|---|
| 46 |
targetNamespace="urn:ietf:params:xml:ns:pidf-diff" |
|---|
| 47 |
elementFormDefault="qualified"> |
|---|
| 48 |
|
|---|
| 49 |
<xs:import schemaLocation="iCalendar.xsd" |
|---|
| 50 |
namespace="urn:ietf:params:xml:ns:icalendar-2.0" /> |
|---|
| 51 |
|
|---|
| 52 |
<xs:simpleType name="XpathType"> |
|---|
| 53 |
<xs:restriction base="xs:string"> |
|---|
| 54 |
<xs:pattern |
|---|
| 55 |
value="(/)?((&id;)((/&step;)*(/&last;))?|(&step;/)*(&last;))"/> |
|---|
| 56 |
</xs:restriction> |
|---|
| 57 |
</xs:simpleType> |
|---|
| 58 |
|
|---|
| 59 |
<xs:simpleType name="XpathAddType"> |
|---|
| 60 |
<xs:restriction base="xs:string"> |
|---|
| 61 |
<xs:pattern |
|---|
| 62 |
value="(/)?((&id;)((/&step;)*(/&child;))?|(&step;/)*(&child;))"/> |
|---|
| 63 |
</xs:restriction> |
|---|
| 64 |
</xs:simpleType> |
|---|
| 65 |
|
|---|
| 66 |
<xs:simpleType name="PosType"> |
|---|
| 67 |
<xs:restriction base="xs:string"> |
|---|
| 68 |
<xs:enumeration value="before"/> |
|---|
| 69 |
<xs:enumeration value="after"/> |
|---|
| 70 |
<xs:enumeration value="prepend"/> |
|---|
| 71 |
</xs:restriction> |
|---|
| 72 |
</xs:simpleType> |
|---|
| 73 |
|
|---|
| 74 |
<xs:simpleType name="AddValueType"> |
|---|
| 75 |
<xs:restriction base="xs:string"> |
|---|
| 76 |
<xs:pattern value="&aname;|&nspa;"/> |
|---|
| 77 |
</xs:restriction> |
|---|
| 78 |
</xs:simpleType> |
|---|
| 79 |
|
|---|
| 80 |
<xs:complexType name="BaseUpdateType" abstract="true"> |
|---|
| 81 |
<xs:attribute name="sel" type="XpathAddType" |
|---|
| 82 |
use="required"/> |
|---|
| 83 |
</xs:complexType> |
|---|
| 84 |
|
|---|
| 85 |
<xs:complexType name="NewValueType" abstract="true"> |
|---|
| 86 |
<xs:complexContent mixed="false"> |
|---|
| 87 |
<xs:extension base="BaseUpdateType"> |
|---|
| 88 |
<xs:choice> |
|---|
| 89 |
<xs:element name="component" type="xcal:BaseComponentType"/> |
|---|
| 90 |
<xs:element name="property" type="xcal:BasePropertyType"/> |
|---|
| 91 |
<xs:element name="parameter" type="xcal:BaseParameterType"/> |
|---|
| 92 |
</xs:choice> |
|---|
| 93 |
</xs:extension> |
|---|
| 94 |
</xs:complexContent> |
|---|
| 95 |
</xs:complexType> |
|---|
| 96 |
|
|---|
| 97 |
<xs:simpleType name="WhitespaceType"> |
|---|
| 98 |
<xs:restriction base="xs:string"> |
|---|
| 99 |
<xs:enumeration value="before"/> |
|---|
| 100 |
<xs:enumeration value="after"/> |
|---|
| 101 |
<xs:enumeration value="both"/> |
|---|
| 102 |
</xs:restriction> |
|---|
| 103 |
</xs:simpleType> |
|---|
| 104 |
|
|---|
| 105 |
<xs:complexType name="AddType"> |
|---|
| 106 |
<xs:complexContent mixed="false"> |
|---|
| 107 |
<xs:extension base="NewValueType"> |
|---|
| 108 |
<xs:attribute name="pos" type="PosType"/> |
|---|
| 109 |
<xs:attribute name="type" type="AddValueType"/> |
|---|
| 110 |
</xs:extension> |
|---|
| 111 |
</xs:complexContent> |
|---|
| 112 |
</xs:complexType> |
|---|
| 113 |
|
|---|
| 114 |
<xs:complexType name="ReplaceType"> |
|---|
| 115 |
<xs:complexContent mixed="false"> |
|---|
| 116 |
<xs:extension base="NewValueType"> |
|---|
| 117 |
</xs:extension> |
|---|
| 118 |
</xs:complexContent> |
|---|
| 119 |
</xs:complexType> |
|---|
| 120 |
|
|---|
| 121 |
<xs:complexType name="RemoveType"> |
|---|
| 122 |
<xs:complexContent mixed="false"> |
|---|
| 123 |
<xs:extension base="BaseUpdateType"> |
|---|
| 124 |
<xs:attribute name="ws" type="WhitespaceType"/> |
|---|
| 125 |
</xs:extension> |
|---|
| 126 |
</xs:complexContent> |
|---|
| 127 |
</xs:complexType> |
|---|
| 128 |
</xs:schema> |
|---|
| 129 |
|
|---|