- Timestamp:
- 12/01/13 19:15:16 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SMC4LRT/images/general-component-schema.xsd.tex
r3666 r4120 1 1 \lstset{language=XML} 2 2 \begin{lstlisting}[label=lst:cmd-schema, caption={general-component-schema.xsd -- schema of the CMD meta model for defining CMD profiles and components}] 3 4 3 <?xml version="1.0" encoding="UTF-8"?> 5 <!-- 6 $Revision: 2517 $ 7 $Date: 2013-01-30 16:29:31 +0100 (Wed, 30 Jan 2013) $ 4 <!-- $Revision: 2517 $ 5 $Date: 2013-01-30 16:29:31 +0100 (Wed, 30 Jan 2013) $ 8 6 --> 9 10 7 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 11 <xs:import namespace="http://www.w3.org/XML/1998/namespace" 12 schemaLocation="http://www.w3.org/2005/08/xml.xsd"/> 13 14 <!-- root element --> 15 <xs:element name="CMD_ComponentSpec"> 8 <xs:import namespace="http://www.w3.org/XML/1998/namespace" 9 schemaLocation="http://www.w3.org/2005/08/xml.xsd"/> 10 11 <!-- root element --> 12 <xs:element name="CMD_ComponentSpec"> 13 <xs:complexType> 14 <xs:sequence> 15 <xs:element name="Header"> 16 <xs:complexType> 17 <xs:sequence> 18 <xs:element name="ID" type="xs:anyURI" minOccurs="0"/> 19 <xs:element name="Name" type="xs:string" minOccurs="0"/> 20 <xs:element name="Description" type="xs:string" minOccurs="0"/> 21 </xs:sequence> 22 </xs:complexType> 23 </xs:element> 24 <xs:element name="CMD_Component" type="CMD_Component_type" maxOccurs="unbounded"> 25 <xs:annotation> 26 <xs:documentation>At the root level there should always be a 27 Component.</xs:documentation> 28 </xs:annotation> 29 </xs:element> 30 </xs:sequence> 31 <xs:attribute name="isProfile" type="xs:boolean" use="required"/> 32 </xs:complexType> 33 </xs:element> 34 35 <!-- recursive construction: A component can contain elements and/or other components --> 36 <xs:group name="group"> 37 <xs:sequence> 38 <!-- from small (attribute) to big (component) --> 39 <xs:element name="AttributeList" type="AttributeList_type" minOccurs="0" maxOccurs="1"/> 40 <xs:element name="CMD_Element" type="CMD_Element_type" minOccurs="0" 41 maxOccurs="unbounded"> </xs:element> 42 <xs:element name="CMD_Component" type="CMD_Component_type" minOccurs="0" 43 maxOccurs="unbounded"/> 44 </xs:sequence> 45 </xs:group> 46 47 <!-- type definitions --> 48 <xs:complexType name="CMD_Element_type"> 49 <xs:sequence> 50 <xs:element name="AttributeList" type="AttributeList_type" minOccurs="0" maxOccurs="1"> 51 <xs:annotation> 52 <xs:documentation>The AttributeList child of an element contains a set of XML 53 attributes for that element.</xs:documentation> 54 </xs:annotation> 55 </xs:element> 56 <xs:element minOccurs="0" maxOccurs="1" name="ValueScheme" type="ValueScheme_type"> 57 <xs:annotation> 58 <xs:documentation>When an element is linked to a regular expression or a 59 controlled vocabulary, the ValueScheme sub-element contains more information 60 about this.</xs:documentation> 61 </xs:annotation> 62 </xs:element> 63 </xs:sequence> 64 <xs:attributeGroup ref="clarin_element_attributes"/> 65 </xs:complexType> 66 67 <xs:complexType name="ValueScheme_type"> 68 <xs:choice> 69 <xs:element name="pattern" type="xs:string" maxOccurs="1"> 70 <xs:annotation> 71 <xs:documentation>Specification of a regular expression the element should 72 comply with.</xs:documentation> 73 </xs:annotation> 74 </xs:element> 75 <xs:element name="enumeration" type="enumeration_type"> 76 <xs:annotation> 77 <xs:documentation>A list of the allowed values of a controlled 78 vocabulary.</xs:documentation> 79 </xs:annotation> 80 </xs:element> 81 </xs:choice> 82 </xs:complexType> 83 84 <xs:complexType name="AttributeList_type"> 85 <xs:sequence> 86 <xs:element name="Attribute" minOccurs="1" maxOccurs="unbounded"> 16 87 <xs:complexType> 17 <xs:sequence> 18 <xs:element name="Header"> 19 <xs:complexType> 20 <xs:sequence> 21 <xs:element name="ID" type="xs:anyURI" minOccurs="0"/> 22 <xs:element name="Name" type="xs:string" minOccurs="0"/> 23 <xs:element name="Description" type="xs:string" minOccurs="0"/> 24 </xs:sequence> 25 </xs:complexType> 26 </xs:element> 27 <xs:element name="CMD_Component" type="CMD_Component_type" maxOccurs="unbounded"> 28 <xs:annotation> 29 <xs:documentation>At the root level there should always be a 30 Component.</xs:documentation> 31 </xs:annotation> 32 </xs:element> 33 </xs:sequence> 34 <xs:attribute name="isProfile" type="xs:boolean" use="required"/> 88 <xs:sequence> 89 <xs:element name="Name" type="xs:string"> 90 <xs:annotation> 91 <xs:documentation>The name of the attribute.</xs:documentation> 92 </xs:annotation> 93 </xs:element> 94 <xs:element name="ConceptLink" type="xs:anyURI" minOccurs="0"> 95 <xs:annotation> 96 <xs:documentation>A link to the ISOcat data category registry (or 97 any other concept registry).</xs:documentation> 98 </xs:annotation> 99 </xs:element> 100 <xs:choice> 101 <xs:element name="Type" type="allowed_attributetypes_type"> 102 <xs:annotation> 103 <xs:documentation>For the use of simple XML types as the type of 104 the attribute.</xs:documentation> 105 </xs:annotation> 106 </xs:element> 107 <xs:element name="ValueScheme" type="ValueScheme_type"> 108 <xs:annotation> 109 <xs:documentation>For the use of a regular expression or a 110 controlled vocabulary as the type of the 111 attribute.</xs:documentation> 112 </xs:annotation> 113 </xs:element> 114 </xs:choice> 115 </xs:sequence> 35 116 </xs:complexType> 36 </xs:element> 37 38 <!-- recursive construction: A component can contain elements and/or other components --> 39 <xs:group name="group"> 40 <xs:sequence> 41 <!-- from small (attribute) to big (component) --> 42 <xs:element name="AttributeList" type="AttributeList_type" minOccurs="0" maxOccurs="1"/> 43 <xs:element name="CMD_Element" type="CMD_Element_type" minOccurs="0" 44 maxOccurs="unbounded"> </xs:element> 45 <xs:element name="CMD_Component" type="CMD_Component_type" minOccurs="0" 46 maxOccurs="unbounded"/> 47 </xs:sequence> 48 </xs:group> 49 50 <!-- type definitions --> 51 <xs:complexType name="CMD_Element_type"> 52 <xs:sequence> 53 <xs:element name="AttributeList" type="AttributeList_type" minOccurs="0" maxOccurs="1"> 54 <xs:annotation> 55 <xs:documentation>The AttributeList child of an element contains a set of XML 56 attributes for that element.</xs:documentation> 57 </xs:annotation> 58 </xs:element> 59 <xs:element minOccurs="0" maxOccurs="1" name="ValueScheme" type="ValueScheme_type"> 60 <xs:annotation> 61 <xs:documentation>When an element is linked to a regular expression or a 62 controlled vocabulary, the ValueScheme sub-element contains more information 63 about this.</xs:documentation> 64 </xs:annotation> 65 </xs:element> 66 </xs:sequence> 67 <xs:attributeGroup ref="clarin_element_attributes"/> 68 </xs:complexType> 69 70 71 <xs:complexType name="ValueScheme_type"> 72 <xs:choice> 73 <xs:element name="pattern" type="xs:string" maxOccurs="1"> 74 <xs:annotation> 75 <xs:documentation>Specification of a regular expression the element should 76 comply with.</xs:documentation> 77 </xs:annotation> 78 </xs:element> 79 <xs:element name="enumeration" type="enumeration_type"> 80 <xs:annotation> 81 <xs:documentation>A list of the allowed values of a controlled 82 vocabulary.</xs:documentation> 83 </xs:annotation> 84 </xs:element> 85 </xs:choice> 86 </xs:complexType> 87 88 89 <xs:complexType name="AttributeList_type"> 90 <xs:sequence> 91 <xs:element name="Attribute" minOccurs="1" maxOccurs="unbounded"> 92 <xs:complexType> 93 <xs:sequence> 94 <xs:element name="Name" type="xs:string"> 95 <xs:annotation> 96 <xs:documentation>The name of the attribute.</xs:documentation> 97 </xs:annotation> 98 </xs:element> 99 <xs:element name="ConceptLink" type="xs:anyURI" minOccurs="0"> 100 <xs:annotation> 101 <xs:documentation>A link to the ISOcat data category registry (or any other concept registry).</xs:documentation> 102 </xs:annotation> 103 </xs:element> 104 <xs:choice> 105 <xs:element name="Type" type="allowed_attributetypes_type"> 106 <xs:annotation> 107 <xs:documentation>For the use of simple XML types as the type of 108 the attribute.</xs:documentation> 109 </xs:annotation> 110 </xs:element> 111 <xs:element name="ValueScheme" type="ValueScheme_type"> 112 <xs:annotation> 113 <xs:documentation>For the use of a regular expression or a 114 controlled vocabulary as the type of the 115 attribute.</xs:documentation> 116 </xs:annotation> 117 </xs:element> 118 </xs:choice> 119 </xs:sequence> 120 </xs:complexType> 121 </xs:element> 122 </xs:sequence> 123 </xs:complexType> 124 125 <xs:complexType name="CMD_Component_type"> 126 <xs:group ref="group" minOccurs="0"/> 127 <xs:attributeGroup ref="clarin_component_attributes"/> 128 </xs:complexType> 129 130 131 <!-- list of all attributes that can be bound to a cl_el --> 132 <xs:attributeGroup name="clarin_element_attributes"> 133 <xs:attribute name="name" type="xs:Name" use="required"> 134 <xs:annotation> 135 <xs:documentation>The name of the element.</xs:documentation> 136 </xs:annotation> 117 </xs:element> 118 </xs:sequence> 119 </xs:complexType> 120 121 <xs:complexType name="CMD_Component_type"> 122 <xs:group ref="group" minOccurs="0"/> 123 <xs:attributeGroup ref="clarin_component_attributes"/> 124 </xs:complexType> 125 126 <!-- list of all attributes that can be bound to a cl_el --> 127 <xs:attributeGroup name="clarin_element_attributes"> 128 <xs:attribute name="name" type="xs:Name" use="required"> 129 <xs:annotation> 130 <xs:documentation>The name of the element.</xs:documentation> 131 </xs:annotation> 132 </xs:attribute> 133 <xs:attribute name="ConceptLink" type="xs:anyURI"> 134 <xs:annotation> 135 <xs:documentation>A link to the ISOcat data category registry (or any other concept 136 registry).</xs:documentation> 137 </xs:annotation> 138 </xs:attribute> 139 <xs:attribute name="ValueScheme" type="allowed_attributetypes_type"> 140 <xs:annotation> 141 <xs:documentation>Used to specify that an element has a simple XML type (string, 142 integer, etc)</xs:documentation> 143 </xs:annotation> 144 </xs:attribute> 145 <xs:attribute name="CardinalityMin" type="cardinality_type"> 146 <xs:annotation> 147 <xs:documentation>Minimal number of occurrences.</xs:documentation> 148 </xs:annotation> 149 </xs:attribute> 150 <xs:attribute name="CardinalityMax" type="cardinality_type"> 151 <xs:annotation> 152 <xs:documentation>Maximal number of occurrences.</xs:documentation> 153 </xs:annotation> 154 </xs:attribute> 155 <xs:attribute name="Documentation" type="xs:string"> 156 <xs:annotation> 157 <xs:documentation>Some information an application (eg Arbil) can display to give 158 guidance to the user when entering metadata.</xs:documentation> 159 </xs:annotation> 160 </xs:attribute> 161 <xs:attribute name="DisplayPriority" type="xs:integer"> 162 <xs:annotation> 163 <xs:documentation>The element with the highest priority will be displayed as the 164 label for a metadata file (eg in Arbil)</xs:documentation> 165 </xs:annotation> 166 </xs:attribute> 167 <xs:attribute name="Multilingual" type="xs:boolean"> 168 <xs:annotation> 169 <xs:documentation>Indicates that this element can have values in multiple languages 170 (and thus is repeatable). This will result in the possibility of using the 171 xml:lang attribute in the metadata instances that are 172 created.</xs:documentation> 173 </xs:annotation> 174 </xs:attribute> 175 </xs:attributeGroup> 176 177 <!-- list of all attributes that can be bound to a cl_comp --> 178 <xs:attributeGroup name="clarin_component_attributes"> 179 <xs:attribute name="name" type="xs:Name"/> 180 <xs:attribute name="ComponentId" type="xs:anyURI"> 181 <xs:annotation> 182 <xs:documentation>Indicates that a component (using its unique ComponentId issued by 183 the ComponentRegistry) should be included.</xs:documentation> 184 </xs:annotation> 185 </xs:attribute> 186 <xs:attribute name="ConceptLink" type="xs:anyURI"> 187 <xs:annotation> 188 <xs:documentation>A link to the ISOcat data category registry (or any other concept 189 registry). Currently not used.</xs:documentation> 190 </xs:annotation> 191 </xs:attribute> 192 <xs:attribute name="filename" type="xs:anyURI"> 193 <xs:annotation> 194 <xs:documentation>Outdated way of including an external component. Here for backward 195 compatibility with the XML-cmdi-toolkit.</xs:documentation> 196 </xs:annotation> 197 </xs:attribute> 198 199 <!-- (components cannot have a ValueScheme attribute) --> 200 201 <xs:attribute name="CardinalityMin" type="cardinality_type"/> 202 <xs:attribute name="CardinalityMax" type="cardinality_type"/> 203 <xs:attribute ref="xml:base"/> 204 </xs:attributeGroup> 205 206 <xs:simpleType name="cardinality_type"> 207 <xs:annotation> 208 <xs:documentation>cardinality for elements and components</xs:documentation> 209 </xs:annotation> 210 <xs:union> 211 <xs:simpleType> 212 <xs:list itemType="xs:nonNegativeInteger"/> 213 </xs:simpleType> 214 <xs:simpleType> 215 <xs:restriction base="xs:string"> 216 <xs:enumeration value="unbounded"/> 217 </xs:restriction> 218 </xs:simpleType> 219 </xs:union> 220 </xs:simpleType> 221 222 <xs:simpleType name="allowed_attributetypes_type"> 223 <xs:annotation> 224 <xs:documentation>Subset of XSD types that are allowed as CMD type</xs:documentation> 225 </xs:annotation> 226 227 <xs:restriction base="xs:token"> 228 <xs:enumeration value="boolean"/> 229 <xs:enumeration value="decimal"/> 230 <xs:enumeration value="float"/> 231 <xs:enumeration value="int"/> 232 <xs:enumeration value="string"/> 233 <xs:enumeration value="anyURI"/> 234 <xs:enumeration value="date"/> 235 <xs:enumeration value="gDay"/> 236 <xs:enumeration value="gMonth"/> 237 <xs:enumeration value="gYear"/> 238 <xs:enumeration value="time"/> 239 <xs:enumeration value="dateTime"/> 240 </xs:restriction> 241 </xs:simpleType> 242 243 <xs:complexType name="enumeration_type"> 244 <xs:annotation> 245 <xs:documentation>controlled vocabularies</xs:documentation> 246 </xs:annotation> 247 <xs:choice minOccurs="0" maxOccurs="unbounded"> 248 <xs:element name="item" type="item_type"> 249 <xs:annotation> 250 <xs:documentation>An item from a controlled vocabulary.</xs:documentation> 251 </xs:annotation> 252 </xs:element> 253 <xs:element name="appinfo" type="xs:string"> 254 <xs:annotation> 255 <xs:documentation>End-user guidance about the value of the controlled vocabulary 256 as a whole. Currently not used.</xs:documentation> 257 </xs:annotation> 258 </xs:element> 259 </xs:choice> 260 </xs:complexType> 261 262 <xs:complexType name="item_type"> 263 <xs:simpleContent> 264 <xs:extension base="xs:string"> 265 <xs:attribute type="xs:anyURI" name="ConceptLink"> 266 <xs:annotation> 267 <xs:documentation>A link to the ISOcat data category registry (or any other 268 concept registry) related to this controllec vocabulary 269 item.</xs:documentation> 270 </xs:annotation> 137 271 </xs:attribute> 138 <xs:attribute name="ConceptLink" type="xs:anyURI">139 140 <xs:documentation>A link to the ISOcat data category registry (or any other concept141 registry).</xs:documentation>142 272 <xs:attribute type="xs:string" name="AppInfo"> 273 <xs:annotation> 274 <xs:documentation>End-user guidance about the value of this controlled 275 vocabulary item.</xs:documentation> 276 </xs:annotation> 143 277 </xs:attribute> 144 <xs:attribute name="ValueScheme" type="allowed_attributetypes_type"> 145 <xs:annotation> 146 <xs:documentation>Used to specify that an element has a simple XML type (string, 147 integer, etc)</xs:documentation> 148 </xs:annotation> 149 </xs:attribute> 150 <xs:attribute name="CardinalityMin" type="cardinality_type"> 151 <xs:annotation> 152 <xs:documentation>Minimal number of occurrences.</xs:documentation> 153 </xs:annotation> 154 </xs:attribute> 155 <xs:attribute name="CardinalityMax" type="cardinality_type"> 156 <xs:annotation> 157 <xs:documentation>Maximal number of occurrences.</xs:documentation> 158 </xs:annotation> 159 </xs:attribute> 160 <xs:attribute name="Documentation" type="xs:string"> 161 <xs:annotation> 162 <xs:documentation>Some information an application (eg Arbil) can display to give 163 guidance to the user when entering metadata.</xs:documentation> 164 </xs:annotation> 165 </xs:attribute> 166 <xs:attribute name="DisplayPriority" type="xs:integer"> 167 <xs:annotation> 168 <xs:documentation>The element with the highest priority will be displayed as the 169 label for a metadata file (eg in Arbil)</xs:documentation> 170 </xs:annotation> 171 </xs:attribute> 172 <xs:attribute name="Multilingual" type="xs:boolean"> 173 <xs:annotation> 174 <xs:documentation>Indicates that this element can have values in multiple languages 175 (and thus is repeatable). This will result in the possibility of using the 176 xml:lang attribute in the metadata instances that are 177 created.</xs:documentation> 178 </xs:annotation> 179 </xs:attribute> 180 </xs:attributeGroup> 181 182 <!-- list of all attributes that can be bound to a cl_comp --> 183 <xs:attributeGroup name="clarin_component_attributes"> 184 <xs:attribute name="name" type="xs:Name"/> 185 <xs:attribute name="ComponentId" type="xs:anyURI"> 186 <xs:annotation> 187 <xs:documentation>Indicates that a component (using its unique ComponentId issued by 188 the ComponentRegistry) should be included.</xs:documentation> 189 </xs:annotation> 190 </xs:attribute> 191 <xs:attribute name="ConceptLink" type="xs:anyURI"> 192 <xs:annotation> 193 <xs:documentation>A link to the ISOcat data category registry (or any other concept 194 registry). Currently not used.</xs:documentation> 195 </xs:annotation> 196 </xs:attribute> 197 <xs:attribute name="filename" type="xs:anyURI"> 198 <xs:annotation> 199 <xs:documentation>Outdated way of including an external component. Here for backward 200 compatibility with the XML-cmdi-toolkit.</xs:documentation> 201 </xs:annotation> 202 </xs:attribute> 203 204 <!-- (components cannot have a ValueScheme attribute) --> 205 206 <xs:attribute name="CardinalityMin" type="cardinality_type"/> 207 <xs:attribute name="CardinalityMax" type="cardinality_type"/> 208 <xs:attribute ref="xml:base"/> 209 </xs:attributeGroup> 210 211 212 <xs:simpleType name="cardinality_type"> 213 <xs:annotation> 214 <xs:documentation>cardinality for elements and components</xs:documentation> 215 </xs:annotation> 216 <xs:union> 217 <xs:simpleType> 218 <xs:list itemType="xs:nonNegativeInteger"/> 219 </xs:simpleType> 220 <xs:simpleType> 221 <xs:restriction base="xs:string"> 222 <xs:enumeration value="unbounded"/> 223 </xs:restriction> 224 </xs:simpleType> 225 </xs:union> 226 </xs:simpleType> 227 228 <xs:simpleType name="allowed_attributetypes_type"> 229 <xs:annotation> 230 <xs:documentation>Subset of XSD types that are allowed as CMD type</xs:documentation> 231 </xs:annotation> 232 233 <xs:restriction base="xs:token"> 234 <xs:enumeration value="boolean"/> 235 <xs:enumeration value="decimal"/> 236 <xs:enumeration value="float"/> 237 <xs:enumeration value="int"/> 238 <xs:enumeration value="string"/> 239 <xs:enumeration value="anyURI"/> 240 <xs:enumeration value="date"/> 241 <xs:enumeration value="gDay"/> 242 <xs:enumeration value="gMonth"/> 243 <xs:enumeration value="gYear"/> 244 <xs:enumeration value="time"/> 245 <xs:enumeration value="dateTime"/> 246 </xs:restriction> 247 </xs:simpleType> 248 249 <xs:complexType name="enumeration_type"> 250 <xs:annotation> 251 <xs:documentation>controlled vocabularies</xs:documentation> 252 </xs:annotation> 253 <xs:choice minOccurs="0" maxOccurs="unbounded"> 254 <xs:element name="item" type="item_type"> 255 <xs:annotation> 256 <xs:documentation>An item from a controlled vocabulary.</xs:documentation> 257 </xs:annotation> 258 </xs:element> 259 <xs:element name="appinfo" type="xs:string"> 260 <xs:annotation> 261 <xs:documentation>End-user guidance about the value of the controlled vocabulary 262 as a whole. Currently not used.</xs:documentation> 263 </xs:annotation> 264 </xs:element> 265 </xs:choice> 266 </xs:complexType> 267 268 <xs:complexType name="item_type"> 269 <xs:simpleContent> 270 <xs:extension base="xs:string"> 271 <xs:attribute type="xs:anyURI" name="ConceptLink"> 272 <xs:annotation> 273 <xs:documentation>A link to the ISOcat data category registry (or any other 274 concept registry) related to this controllec vocabulary 275 item.</xs:documentation> 276 </xs:annotation> 277 </xs:attribute> 278 <xs:attribute type="xs:string" name="AppInfo"> 279 <xs:annotation> 280 <xs:documentation>End-user guidance about the value of this controlled 281 vocabulary item.</xs:documentation> 282 </xs:annotation> 283 </xs:attribute> 284 </xs:extension> 285 </xs:simpleContent> 286 </xs:complexType> 287 278 </xs:extension> 279 </xs:simpleContent> 280 </xs:complexType> 288 281 </xs:schema> 289 282 \end{lstlisting}
Note: See TracChangeset
for help on using the changeset viewer.