733 | | Apart from standard XML schema datatypes the content of a CMD element or attribute instance can be restricted by two means. The `<ValueScheme>` element `MAY` contain either an XML element `<pattern>` with the specification of a regular expression the element/attribute should comply with, or the definition of a controlled vocabulary of allowed values. CMDI 1.2 supports two approaches to describe such a vocabulary: |
734 | | |
735 | | * specifying all allowed values with `OPTIONAL` attributes for every value to include a concept link and a description of the specific value, or |
736 | | * referring to an external vocabulary via a URI specified in `@URI`. The `OPTIONAL` XML attributes `@ValueProperty` and `@ValueLanguage` `MAY` be used to give more information about preferred label and language in the chosen vocabulary. |
737 | | |
738 | | The order and structure described in the following table `MUST` be followed when specifying value restrictions: |
| 733 | Apart from standard XML schema datatypes the content of a CMD element or attribute instance can be restricted by two means. The `<ValueScheme>` element `MAY` contain either an XML element `<pattern>` with the specification of a regular expression the element/attribute should comply with, or the definition of a controlled vocabulary. CMDI 1.2 supports two types of vocabularies: |
| 734 | |
| 735 | * a closed vocabulary where all allowed values are specified with `OPTIONAL` attributes for every value to include a concept link and a description of the specific value, or |
| 736 | * an open vocabulary by referring to an external vocabulary via a URI specified in `@URI`, where, in this case, the external vocabulary provides suggested values. |
| 737 | |
| 738 | A closed vocabulary `MAY` also refer to an external vocabulary via a URI, where the external service `MAY` be used during metadata creation or search.The `OPTIONAL` XML attributes `@ValueProperty` and `@ValueLanguage` `MAY` be used to give more information about the property and language to be used in the specified external vocabulary. |
| 739 | |
| 740 | The order and structure described in the following table `MUST` be followed when specifying value schemes: |
770 | | <Vocabulary URI="http://openskos.meertens.knaw.nl/iso-639-3" ValueProperty="skos:notation"> |
771 | | <enumeration> |
772 | | <item AppInfo="Ghotuo (aaa)" ConceptLink="http://cdb.iso.org/lg/CDB-00132443-001">aaa</item> |
773 | | <item AppInfo="Alumu-Tesu (aab)" ConceptLink="http://cdb.iso.org/lg/CDB-00133770-001">aab</item> |
774 | | <item AppInfo="Ari (aac)" ConceptLink="http://cdb.iso.org/lg/CDB-00133769-001">aac</item> |
775 | | <item AppInfo="Amal (aad)" ConceptLink="http://cdb.iso.org/lg/CDB-00133768-001">aad</item> |
776 | | <item AppInfo="Arbëreshë Albanian (aae)" ConceptLink="http://cdb.iso.org/lg/CDB-00133767-001">aae</item> |
777 | | <item AppInfo="Aranadan (aaf)" ConceptLink="http://cdb.iso.org/lg/CDB-00133766-001">aaf</item> |
778 | | ... |
779 | | </enumeration> |
780 | | </Vocabulary> |
| 770 | <Vocabulary URI="http://openskos.meertens.knaw.nl/iso-639-3" ValueProperty="skos:notation"> |
| 771 | <enumeration> |
| 772 | <item AppInfo="Ghotuo (aaa)" ConceptLink="http://cdb.iso.org/lg/CDB-00132443-001">aaa</item> |
| 773 | <item AppInfo="Alumu-Tesu (aab)" ConceptLink="http://cdb.iso.org/lg/CDB-00133770-001">aab</item> |
| 774 | <item AppInfo="Ari (aac)" ConceptLink="http://cdb.iso.org/lg/CDB-00133769-001">aac</item> |
| 775 | <item AppInfo="Amal (aad)" ConceptLink="http://cdb.iso.org/lg/CDB-00133768-001">aad</item> |
| 776 | <item AppInfo="Arbëreshë Albanian (aae)" ConceptLink="http://cdb.iso.org/lg/CDB-00133767-001">aae</item> |
| 777 | <item AppInfo="Aranadan (aaf)" ConceptLink="http://cdb.iso.org/lg/CDB-00133766-001">aaf</item> |
| 778 | … |
| 779 | </enumeration> |
| 780 | </Vocabulary> |
| 781 | </ValueScheme> |
| 782 | }}} |
| 783 | |
| 784 | === Example 16 Value scheme without enumeration but with external vocabulary (open vocabulary) === |
| 785 | |
| 786 | This example shows a value scheme with a reference to an external vocabulary without an embedded enumeration, i.e., an open vocabulary. The external vocabulary suggests preferred labels for known organisations, but it is allowed to use other names (preferably the names of unknown organisations). |
| 787 | |
| 788 | {{{ |
| 789 | #!xml |
| 790 | <ValueScheme> |
| 791 | <Vocabulary URI="http://openskos.meertens.knaw.nl/Organisations" ValueProperty="skos:prefLabel"/> |