| 92 | |
| 93 | === Content model for CMD elements and CMD attributes in the schema definition === |
| 94 | If a CMD element or CMD attribute in the CCSL has a `@ValueScheme` XML attribute, its value `MUST` be interpreted as the name of the XML Schema Datatype (declared in the `@type` attribute of the XML element or attribute declaration in XML Schema) that defines the allowed value range of the XML element/attribute derived from the CMD element/attribute. |
| 95 | |
| 96 | '''Otherwise''', if a CMD element or CMD attribute in the CCSL has a descendant XML element `<ValueScheme>` that contains an XML element `<pattern>`, then its text value `MUST` be interpreted as the XML Schema Regular Expressions that defines the allowed value range of the XML element/attribute derived from this CMD element/attribute. |
| 97 | |
| 98 | '''Otherwise''', if a CMD element or CMD attribute in the CCSL has a descendant XML element `<ValueScheme>` that contains an XML element `<Vocabulary>`: |
| 99 | * The XML attributes `@ValueProperty` and `@ValueLanguage` of the XML element `<Vocabulary>` `MAY` be transformed into XML attributes in the 'ann:' namespace on the XML element declaration in the case of a CMD element or XML attribute declaration in the case of a CMD attribute. |
| 100 | * The XML attribute `@URI` of the XML element `<Vocabulary>`, if present, `MUST` be transformed into an attribute `@cmd:ValueConceptLink` of the same value on the XML element or attribute declaration in the schema. |
| 101 | * The XML elements `<item>` that are descendants of `<enumeration>` contained in `<Vocabulary>` `MUST` be transformed into an enumeration based restriction with values taken from the text content of the `<item>` XML elements. Each enumeration item in the schema `MAY` be annotated the value from the XML attribute `@ConceptLink` by means of an XML attribute `@dcr:datcat` and the value of the XML attribute `@AppInfo` by means of an attribute in the 'ann' namespace. |
| 102 | |
| 103 | Note: the attributes `@cmd:ValueConceptLink` and `@dcr:datcat` should be present in the schema, not be declared |