| 1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 3 | |
| 4 | <xs:annotation> |
| 5 | <xs:documentation>This schema document provides attribute declarations and |
| 6 | attribute group, complex type and simple type definitions which can be used in |
| 7 | the construction of user schemas to define the structure of particular linking |
| 8 | constructs, e.g. |
| 9 | <![CDATA[ |
| 10 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 11 | xmlns:xl="http://www.w3.org/1999/xlink"> |
| 12 | |
| 13 | <xs:import namespace="http://www.w3.org/1999/xlink" |
| 14 | location="http://www.w3.org/1999/xlink.xsd"> |
| 15 | |
| 16 | <xs:element name="mySimple"> |
| 17 | <xs:complexType> |
| 18 | ... |
| 19 | <xs:attributeGroup ref="xl:simpleAttrs"/> |
| 20 | ... |
| 21 | </xs:complexType> |
| 22 | </xs:element> |
| 23 | ... |
| 24 | </xs:schema>]]></xs:documentation> |
| 25 | </xs:annotation> |
| 26 | |
| 27 | <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> |
| 28 | |
| 29 | <xs:attribute name="type" type="xlink:typeType"/> |
| 30 | |
| 31 | <xs:simpleType name="typeType"> |
| 32 | <xs:restriction base="xs:token"> |
| 33 | <xs:enumeration value="simple"/> |
| 34 | <xs:enumeration value="extended"/> |
| 35 | <xs:enumeration value="title"/> |
| 36 | <xs:enumeration value="resource"/> |
| 37 | <xs:enumeration value="locator"/> |
| 38 | <xs:enumeration value="arc"/> |
| 39 | </xs:restriction> |
| 40 | </xs:simpleType> |
| 41 | |
| 42 | <xs:attribute name="href" type="xlink:hrefType"/> |
| 43 | |
| 44 | <xs:simpleType name="hrefType"> |
| 45 | <xs:restriction base="xs:anyURI"/> |
| 46 | </xs:simpleType> |
| 47 | |
| 48 | <xs:attribute name="role" type="xlink:roleType"/> |
| 49 | |
| 50 | <xs:simpleType name="roleType"> |
| 51 | <xs:restriction base="xs:anyURI"> |
| 52 | <xs:minLength value="1"/> |
| 53 | </xs:restriction> |
| 54 | </xs:simpleType> |
| 55 | |
| 56 | <xs:attribute name="arcrole" type="xlink:arcroleType"/> |
| 57 | |
| 58 | <xs:simpleType name="arcroleType"> |
| 59 | <xs:restriction base="xs:anyURI"> |
| 60 | <xs:minLength value="1"/> |
| 61 | </xs:restriction> |
| 62 | </xs:simpleType> |
| 63 | |
| 64 | <xs:attribute name="title" type="xlink:titleAttrType"/> |
| 65 | |
| 66 | <xs:simpleType name="titleAttrType"> |
| 67 | <xs:restriction base="xs:string"/> |
| 68 | </xs:simpleType> |
| 69 | |
| 70 | <xs:attribute name="show" type="xlink:showType"/> |
| 71 | |
| 72 | <xs:simpleType name="showType"> |
| 73 | <xs:restriction base="xs:token"> |
| 74 | <xs:enumeration value="new"/> |
| 75 | <xs:enumeration value="replace"/> |
| 76 | <xs:enumeration value="embed"/> |
| 77 | <xs:enumeration value="other"/> |
| 78 | <xs:enumeration value="none"/> |
| 79 | </xs:restriction> |
| 80 | </xs:simpleType> |
| 81 | |
| 82 | <xs:attribute name="actuate" type="xlink:actuateType"/> |
| 83 | |
| 84 | <xs:simpleType name="actuateType"> |
| 85 | <xs:restriction base="xs:token"> |
| 86 | <xs:enumeration value="onLoad"/> |
| 87 | <xs:enumeration value="onRequest"/> |
| 88 | <xs:enumeration value="other"/> |
| 89 | <xs:enumeration value="none"/> |
| 90 | </xs:restriction> |
| 91 | </xs:simpleType> |
| 92 | |
| 93 | <xs:attribute name="label" type="xlink:labelType"/> |
| 94 | |
| 95 | <xs:simpleType name="labelType"> |
| 96 | <xs:restriction base="xs:NCName"/> |
| 97 | </xs:simpleType> |
| 98 | |
| 99 | <xs:attribute name="from" type="xlink:fromType"/> |
| 100 | |
| 101 | <xs:simpleType name="fromType"> |
| 102 | <xs:restriction base="xs:NCName"/> |
| 103 | </xs:simpleType> |
| 104 | |
| 105 | <xs:attribute name="to" type="xlink:toType"/> |
| 106 | |
| 107 | <xs:simpleType name="toType"> |
| 108 | <xs:restriction base="xs:NCName"/> |
| 109 | </xs:simpleType> |
| 110 | |
| 111 | <xs:attributeGroup name="simpleAttrs"> |
| 112 | <xs:attribute ref="xlink:type" fixed="simple"/> |
| 113 | <xs:attribute ref="xlink:href"/> |
| 114 | <xs:attribute ref="xlink:role"/> |
| 115 | <xs:attribute ref="xlink:arcrole"/> |
| 116 | <xs:attribute ref="xlink:title"/> |
| 117 | <xs:attribute ref="xlink:show"/> |
| 118 | <xs:attribute ref="xlink:actuate"/> |
| 119 | </xs:attributeGroup> |
| 120 | |
| 121 | <xs:group name="simpleModel"> |
| 122 | <xs:sequence> |
| 123 | <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
| 124 | </xs:sequence> |
| 125 | </xs:group> |
| 126 | |
| 127 | <xs:complexType mixed="true" name="simple"> |
| 128 | <xs:annotation> |
| 129 | <xs:documentation> |
| 130 | Intended for use as the type of user-declared elements to make them |
| 131 | simple links. |
| 132 | </xs:documentation> |
| 133 | </xs:annotation> |
| 134 | <xs:group ref="xlink:simpleModel"/> |
| 135 | <xs:attributeGroup ref="xlink:simpleAttrs"/> |
| 136 | </xs:complexType> |
| 137 | |
| 138 | <xs:attributeGroup name="extendedAttrs"> |
| 139 | <xs:attribute ref="xlink:type" fixed="extended" use="required"/> |
| 140 | <xs:attribute ref="xlink:role"/> |
| 141 | <xs:attribute ref="xlink:title"/> |
| 142 | </xs:attributeGroup> |
| 143 | |
| 144 | <xs:group name="extendedModel"> |
| 145 | <xs:choice> |
| 146 | <xs:element ref="xlink:title"/> |
| 147 | <xs:element ref="xlink:resource"/> |
| 148 | <xs:element ref="xlink:locator"/> |
| 149 | <xs:element ref="xlink:arc"/> |
| 150 | </xs:choice> |
| 151 | </xs:group> |
| 152 | |
| 153 | <xs:complexType name="extended"> |
| 154 | <xs:annotation> |
| 155 | <xs:documentation> |
| 156 | Intended for use as the type of user-declared elements to make them |
| 157 | extended links. |
| 158 | Note that the elements referenced in the content model are all abstract. |
| 159 | The intention is that by simply declaring elements with these as their |
| 160 | substitutionGroup, all the right things will happen. |
| 161 | </xs:documentation> |
| 162 | </xs:annotation> |
| 163 | <xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/> |
| 164 | <xs:attributeGroup ref="xlink:extendedAttrs"/> |
| 165 | </xs:complexType> |
| 166 | |
| 167 | <xs:element name="title" type="xlink:titleEltType" abstract="true"/> |
| 168 | |
| 169 | <xs:attributeGroup name="titleAttrs"> |
| 170 | <xs:attribute ref="xlink:type" fixed="title" use="required"/> |
| 171 | <xs:attribute ref="xml:lang"> |
| 172 | <xs:annotation> |
| 173 | <xs:documentation> |
| 174 | xml:lang is not required, but provides much of the |
| 175 | motivation for title elements in addition to attributes, and so |
| 176 | is provided here for convenience. |
| 177 | </xs:documentation> |
| 178 | </xs:annotation> |
| 179 | </xs:attribute> |
| 180 | </xs:attributeGroup> |
| 181 | |
| 182 | <xs:group name="titleModel"> |
| 183 | <xs:sequence> |
| 184 | <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
| 185 | </xs:sequence> |
| 186 | </xs:group> |
| 187 | |
| 188 | <xs:complexType mixed="true" name="titleEltType"> |
| 189 | <xs:group ref="xlink:titleModel"/> |
| 190 | <xs:attributeGroup ref="xlink:titleAttrs"/> |
| 191 | </xs:complexType> |
| 192 | |
| 193 | <xs:element name="resource" type="xlink:resourceType" abstract="true"/> |
| 194 | |
| 195 | <xs:attributeGroup name="resourceAttrs"> |
| 196 | <xs:attribute ref="xlink:type" fixed="resource" use="required"/> |
| 197 | <xs:attribute ref="xlink:role"/> |
| 198 | <xs:attribute ref="xlink:title"/> |
| 199 | <xs:attribute ref="xlink:label"/> |
| 200 | </xs:attributeGroup> |
| 201 | |
| 202 | <xs:group name="resourceModel"> |
| 203 | <xs:sequence> |
| 204 | <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
| 205 | </xs:sequence> |
| 206 | </xs:group> |
| 207 | |
| 208 | <xs:complexType mixed="true" name="resourceType"> |
| 209 | <xs:group ref="xlink:resourceModel"/> |
| 210 | <xs:attributeGroup ref="xlink:resourceAttrs"/> |
| 211 | </xs:complexType> |
| 212 | |
| 213 | <xs:element name="locator" type="xlink:locatorType" abstract="true"/> |
| 214 | |
| 215 | <xs:attributeGroup name="locatorAttrs"> |
| 216 | <xs:attribute ref="xlink:type" fixed="locator" use="required"/> |
| 217 | <xs:attribute ref="xlink:href" use="required"/> |
| 218 | <xs:attribute ref="xlink:role"/> |
| 219 | <xs:attribute ref="xlink:title"/> |
| 220 | <xs:attribute ref="xlink:label"> |
| 221 | <xs:annotation> |
| 222 | <xs:documentation> |
| 223 | label is not required, but locators have no particular |
| 224 | XLink function if they are not labeled. |
| 225 | </xs:documentation> |
| 226 | </xs:annotation> |
| 227 | </xs:attribute> |
| 228 | </xs:attributeGroup> |
| 229 | |
| 230 | <xs:group name="locatorModel"> |
| 231 | <xs:sequence> |
| 232 | <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/> |
| 233 | </xs:sequence> |
| 234 | </xs:group> |
| 235 | |
| 236 | <xs:complexType name="locatorType"> |
| 237 | <xs:group ref="xlink:locatorModel"/> |
| 238 | <xs:attributeGroup ref="xlink:locatorAttrs"/> |
| 239 | </xs:complexType> |
| 240 | |
| 241 | <xs:element name="arc" type="xlink:arcType" abstract="true"/> |
| 242 | |
| 243 | <xs:attributeGroup name="arcAttrs"> |
| 244 | <xs:attribute ref="xlink:type" fixed="arc" use="required"/> |
| 245 | <xs:attribute ref="xlink:arcrole"/> |
| 246 | <xs:attribute ref="xlink:title"/> |
| 247 | <xs:attribute ref="xlink:show"/> |
| 248 | <xs:attribute ref="xlink:actuate"/> |
| 249 | <xs:attribute ref="xlink:from"/> |
| 250 | <xs:attribute ref="xlink:to"> |
| 251 | <xs:annotation> |
| 252 | <xs:documentation> |
| 253 | from and to have default behavior when values are missing |
| 254 | </xs:documentation> |
| 255 | </xs:annotation> |
| 256 | </xs:attribute> |
| 257 | </xs:attributeGroup> |
| 258 | |
| 259 | <xs:group name="arcModel"> |
| 260 | <xs:sequence> |
| 261 | <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/> |
| 262 | </xs:sequence> |
| 263 | </xs:group> |
| 264 | |
| 265 | <xs:complexType name="arcType"> |
| 266 | <xs:group ref="xlink:arcModel"/> |
| 267 | <xs:attributeGroup ref="xlink:arcAttrs"/> |
| 268 | </xs:complexType> |
| 269 | |
| 270 | </xs:schema> |