Changeset 6901 for metadata/trunk/toolkit/src/main/resources/toolkit
- Timestamp:
- 01/12/16 14:41:23 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/src/main/resources/toolkit/xsd/cmd-component.xsd
r6859 r6901 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 $Revision$ 4 $Date$ 2 <!-- 3 $Revision$ 4 $Date$ 5 5 --> 6 6 7 7 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://purl.oclc.org/dsdl/schematron" 8 8 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0" vc:maxVersion="1.1"> 9 9 10 10 <xs:import namespace="http://www.w3.org/XML/1998/namespace" 11 11 schemaLocation="http://www.w3.org/2005/08/xml.xsd"/> … … 92 92 <!-- from small (attribute) to big (component) --> 93 93 <xs:element name="AttributeList" type="AttributeList_type" minOccurs="0" maxOccurs="1"/> 94 <xs:element name="Element" type="Element_type" minOccurs="0" maxOccurs="unbounded"/> 94 <xs:element name="Element" type="Element_type" minOccurs="0" maxOccurs="unbounded"/> 95 95 <xs:element name="Component" type="Component_type" minOccurs="0" maxOccurs="unbounded"/> 96 96 </xs:sequence> … … 117 117 </xs:simpleContent> 118 118 </xs:complexType> 119 119 120 120 <xs:complexType name="Element_type"> 121 121 <xs:annotation> … … 205 205 <xs:annotation> 206 206 <xs:appinfo> 207 <sch:pattern id="a_res">208 <sch:title>Check reserved attribute names</sch:title>209 <sch:rule context="Attribute">210 <sch:assert test="not(@name=('ref','ComponentId'))">Attribute name shouldn't be 'ref' or 'ComponentId', as these are used internally by CMD!</sch:assert>211 </sch:rule>212 </sch:pattern>213 207 <sch:pattern id="a_sibs"> 214 208 <sch:title>Check attribute siblings</sch:title> … … 273 267 <xs:anyAttribute namespace="http://www.clarin.eu/cmdi/cues/1" processContents="lax"/> 274 268 </xs:attributeGroup> 275 269 276 270 <xs:attributeGroup name="element_attributes"> 277 271 <xs:attribute name="name" type="xs:Name" use="required"> … … 361 355 8 unbounded number NOK 362 356 9 unbounded unbounded OK 363 357 364 358 UNK can be either a missing attribute or an empty value, both can be detected with normalize-space(@...)='' 365 359 366 360 default CardinalityMin is 1 (based on the XSD minOccurs default value) 367 361 default CardinalityMax is 1 (based on the XSD maxOccurs default value) 368 362 369 363 If a basic XSLT 2.0 engine, like Saxon HE, is used for Schematron validation we can't cast to xs:nonNegativeInteger. 370 364 So we cast to xs:integer. The XSD validator should have already validated that the values are valid cardinality_types. … … 455 449 </sch:rule> 456 450 </sch:pattern> 457 </xs:appinfo> 451 </xs:appinfo> 458 452 </xs:annotation> 459 453 <xs:simpleContent>
Note: See TracChangeset
for help on using the changeset viewer.