Version 89 (modified by 8 years ago) (diff) | ,
---|
Component Metadata Infrastructure (CMDI) 1.2 [DRAFT]
- Component Metadata Infrastructure (CMDI) 1.2 [DRAFT]
- Structure of CMDI files
- The CMDI Component Specification Language (CCSL)
- Transformation of CCSL into a CMD profile schema definition
- Appendices
- Bibliography
Introduction
Many researchers, from the humanities and other domains, have a strong need to study resources in close detail. Nowadays more and more of these resources are available online. To be able to find these resources, they are described with metadata. And these metadata records are collected and made available via central catalogues. Often, resource providers want to include specific properties of the resource in the metadata. The purpose of catalogues will be more generic and addresses a broader target audience. It is hard to strike the balance between these two ends of the spectrum with one metadata schema, and mismatches can negatively impact the quality of metadata provided. The goal of the Component Metadata Infrastructure (CMDI) is to provide a flexible mechanism to build resource specific metadata schemas out of shared components and semantics.
In CMDI the metadata lifecycle starts with the need of a metadata modeller to create a dedicated metadata profile for a specific type of resources. The modeller can browse and search a registry for components and profiles that are suitable or come close to meet her requirements. A component groups together metadata elements that belong together and can be potentially reused as a group in a different context. Components can also group other components. The component registry already contains many of these general components. And these can be reused as they are or be adapted, i.e., add or remove some metadata elements and/or components. Also completely new components can be created to model the unique aspects of the resources under consideration. All the needed components are combined into one profile specific for the type of resources. Components, elements and values in this profile are linked to a semantic description, a concept, to make their meaning explicit. In the end metadata creators can create records for specific resources that comply with the profile relevant for the resource type, and these records can be provided to local and global catalogues.
This lifecycle needs many systems, which are operating in CMDI, to cooperate well together. To enable this level of cooperation this specification provides in depth descriptions and definitions how CMDI records, components and their representations in XML look like.
History
CMDI has been developed in the context of the european CLARIN infrastructure. Already in its preparatory phase, which started in 2007, the infrastructure felt the need for flexibility in the metadata domain as it was confronted with many types of resources which had to be accurately described. For version 1.0 the CMDI toolbox was created, which consists of the XML schema’s and XSLT stylesheets to validate components, profiles and records. Version 1.1 included some small changes and has seen small incremental backwards compatible advances since 2011. this version has been in use all throughout CLARIN’s construction phase. Also CMDI has seen a growing number of tools and infrastructure systems that deal with its records and components and rely on its shared syntax and semantics. This specification describes version 1.2, which adds some functionality and also fixes some issues, but also retains a high level of compatibility to version 1.1.
Terminology
The key words MUST
, MUST NOT
, REQUIRED
, SHALL
, SHALL NOT
, SHOULD
, SHOULD NOT
, RECOMMENDED
, MAY
, and OPTIONAL
in this document are to be interpreted as described in RFC2119.
Glossary
- CMD model, Component Metadata model
- The component based metadata model described in the present specification
- CMDI, Component Metadata Infrastructure
- Metadata description framework consisting of the CMD model and infrastructure
- CCSL, CMDI Component Specification Language
- XML based language for describing components according to the CMD model
- CLARIN
- The infrastructure governed by the CLARIN ERIC
- http://www.clarin.eu
- resource, language resource
- A (digitally) accessible entity that can be described in terms of its content and technical properties, referenced by a Uniform Resource Identifier
- digital object
- Resource in a repository stored in one repository container that can be addressed by an identifier; a digital object can be seen as a generalization of a directory in a file system containing one or more files which are the data stream(s). Digital objects can exist in databases, hence the comparison to directory and file structures falls short.
- metadata
- A description of a resource, usually given as a set of properties in the form of attribute-value pairs. This description may contain information about the resource, aspects or parts of the resource and/or artefacts and actors connected to the resource.
- persistent identifier, PID
- Unique Uniform Resource Identifier that assures permanent access for a digital object by providing access to it independently of its physical location or current ownership
- concept
- An abstract or generic idea generalized from particular instances (source: Merriam-Webster)
- semantic registry
- A list/directory/system maintaining (authoritative) definitions of terms, concepts or data categories. These registries should also provide persistent identifiers for their entries.
- concept link
- A reference from a CMD profile, CMD component, CMD element, CMD attribute or a value in a controlled vocabulary to an entry in a semantic registry via its persistent identifier.
- CLARIN Concept Registry
- The semantic registry maintaining concepts used/central to the CLARIN infrastructure
- http://clarin.eu/ccr
- XML
- Markup language standard as described by W3C recommendation http://www.w3.org/TR/xml/
- XML document
- ...
- XML element
- A constituent of an XML document as defined in W3C recommendation http://www.w3.org/TR/xml/ (distinct from a CMD element)
- XML schema datatype
- A predefined set of permissible content within a section of an XML document as described in http://www.w3.org/TR/xmlschema-2/
- XML container element
- An XML element that has one or more XML elements as its descendants
- XML attribute
- A property of an XML element as defined in W3C recommendation http://www.w3.org/TR/xml/ (distinct from a CMD attribute)
- Uniform Resource Identifier, URI
- An identifier for resources as described in RFC3986
- namespace
- An XML namespace as described in http://www.w3.org/TR/xml-names/
- CMD instance, metadata instance, CMDI file, metadata record, CMD record
- A file that conforms to the general CMDI instance structure as described in this specification, and at the instance payload level follows the specific structure defined by the CMD specification it relates to
- Instance header
- The section of a metadata instance marked as ‘header’, providing information on that metadata instance as such, not the resource that is described by the metadata file
- Resource proxy, CMD resource reference
- A representation of a resource within a metadata instance containing a Uniform Resource Identifier as a reference to the resource itself and a specification of its type (one of: Resource, Metadata, SearchPage, SearchService, LandingPage)
- Resource proxy reference
- A reference from any point within the CMD instance payload to any of the resource proxies
- CMD instance payload(?)
- The section of a metadata instance that follows the structure defined by the profile it references and contains the description of the resources to which that metadata instance relates
- CMD instance envelope (?)
- [todo]
- CMD specification, component specification/definition, profile specification/definition
- The implementation of a CMD component or CMD profile by means of the CCSL
- Specification header, component header, profile header
- The section of a CMD specification marked as ‘header’, providing information on that specification as such that is not part of the defined structure
- CMD component, component
- A reusable, structured template for the description of (an aspect of)a resource, defined by means of a CMD specification document with the potential of embedding other components by reference
- CMD profile, profile definition, profile
- A CMD component that is used to describe a class of resources and is not embedded into other components, and therefore provides the complete structure for an instance payload
- CMD element, element definition
- A unit of a CMD component that describes the level of the metadata instance that can carry atomic values constrained by a value scheme, and does not contain further levels except for that of the CMD attribute
- CMD attribute
- A unit of a CMD element that describes the level at which properties of a CMD element can be provided by means of value scheme constrained atomic values.
- value scheme
- A set of constraints governing the range of values allowed for a specific CMD element or CMD attribute in a metadata instance, expressed in terms of an XML schema datatype, controlled vocabulary, or regular expression
- controlled vocabulary, closed/open vocabulary
- A set of values that can be used either to constrain the set of permissible values or to provide suggestions for applicable values in a given context
- regular expression
- An expression that constrains the set of permissible values,as described in XML Schema Regular Expressions http://www.w3.org/TR/xmlschema-2/#regexs
- CMD profile schema
- A schema definition by which the correctness of a CMD instance with respect to the CMD profile it pertains to can be evaluated. May be expressed as XML Schema but also in another XML schema language.
- XML element declaration
- todo e.g. xs:element
- XML attribute declaration
- todo e.g. xs:attribute
Normative References
- RFC2119
-
Key words for use in RFCs to Indicate Requirement Levels, IETF RFC 2119, March 1997,
http://www.ietf.org/rfc/rfc2119.txt
- XML-Namespaces
-
Namespaces in XML 1.0 (Third Edition), W3C, 8 December 2009,
http://www.w3.org/TR/2009/REC-xml-names-20091208/
Non-Normative References
- RFC3023
-
XML Media Types, IETF RFC 3023, January 2001,
http://www.ietf.org/rfc/rfc3023.txt
Typographic and XML Namespace conventions
The following typographic conventions for XML fragments will be used throughout this specification:
<prefix:Element>
An XML element with the Generic Identifier Element that is bound to an XML namespace denoted by the prefix prefix.@attr
An XML attribute with the name attrstring
The literal string must be used either as element content or attribute value.
The following XML namespace names and prefixes are used throughout this specification. The column "Recommended Syntax" indicates which syntax variant SHOULD
be used by the toolkit and other creators of CMDI related documents.
Prefix | Namespace Name | Comment | Recommended Syntax |
---|---|---|---|
cmd | http://www.clarin.eu/cmd/1 | CMDI instance (general/envelope) | prefixed |
cmdp | http://www.clarin.eu/cmd/1/profiles/{profileId} | CMDI payload (profile specific) | prefixed |
cue | http://www.clarin.eu/cmd/cues/1 | Cues for tools | prefixed |
xs | http://www.w3.org/2001/XMLSchema | XML Schema | prefixed |
Structure of CMDI files
A CMDI file contains the actual metadata of one specific resource (hereafter referred to as the described resource), and might also be referred to as a CMD record. All CMDI files have the same structure at the top level. At a lower level, parts of its structure are defined by the CMD profile upon which it is based.
The main structure
A CMDI file has the root element <CMD>
with 4 subelements:
- The
<Header>
element, containing certain administrative information about the CMDI file, i.e. metadata about the file itself - The
<Resources>
element, listing resource proxies and their interrelations, by the following subelements (ordered)<ResourceProxyList>
, containing a list of<ResourceProxy>
elements, each referencing a file contained in or closely related to the described resource<JournalFileProxyList>
, containing a list of<JournalFileProxy>
elements, each referencing a file (“journal file”) containing provenance information about the described resource<ResourceRelationList>,
containing a list of<ResourceRelation>
elements, each representing a relationship between 2 resource files (as listed in the<ResourceProxyList>
)
- The
<IsPartOfList>
element, containing a list of<IsPartOf>
elements, each referencing a larger external resource of which the described resource (as a whole) forms a part - The
<Components>
element, containing one subelement corresponding to – and in turn structured according to - the CMD profile applied. Here the "real" metadata of the reosurce are to be found.
The first three elements (<Header>
, <Resources>
and <IsPartOfList>
) constitute the CMD instance envelopeand reside in the cmd
namespace. The CMD instance payload contains the <Components>
element, which (profile specific) substructure exists in the profile-specific namespace (prefix cmdp
) or cues-for-tools namespace (cue
).
A detailed specification of the above mentioned parts of a CMD instance is given in the next four sections. In addition to this, foreign attributes (XML attributes of other namespaces than those defined in the [Typographic and XML Namespace conventions]) MAY
occur anywhere in <Header>
, <Resources>
and <IsPartOfList>
elements and on the <Components>
element (but not on any of its children).
Examples
<cmd:CMD CMDVersion="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cmd="http://www.clarin.eu/cmd/1" xmlns:cmdp="http://www.clarin.eu/cmd/1/profiles/clarin.eu:cr1:p_1311927752306" xsi:schemaLocation="http://www.clarin.eu/cmd/1 http://www.clarin.eu/cmd/1/xsd/cmd-envelop.xsd http://www.clarin.eu/cmd/1/profiles/clarin.eu:cr1:p_1311927752306 https://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1311927752306/1.2/xsd"> <cmd:Header> ... </cmd:Header> <cmd:Resources> <cmd:ResourceProxyList> ... </cmd:ResourceProxyList> <cmd:JournalFileProxyList> ... </cmd:JournalFileProxyList> <cmd:ResourceRelationList> ... </cmd:ResourceRelationList> </cmd:Resources> <cmd:Components> ... </cmd:Components> </cmd:CMD>
The <Header>
element
The header of a CMDI file mainly contains administrative information about the metadata, that is metadata about the CMDI file itself. The following elements may be included in the order indicated:
Name | Value type | Occurrences | Description | |
---|---|---|---|---|
<Header> | xs:complexType | 1 | Encapsulates core admistrative data about the CMDI file | |
<MdCreator> | xs:string | 0 to unbounded | Denotes the creator of this metadata file | |
<MdCreationDate> | xs:date | 0 or 1 | The date this metadata file was created | |
<MdSelfLink> | xs:anyURI | 0 or 1 | A reference to this metadata file in its home repository, in the form of a PID (preferred) or a URL | |
<MdProfile> | xs:anyURI | 1 | The CMDI profile upon which this metadata file is based, given by its identifier in the Component Registry, e.g. clarin.eu:cr1:p_1407745711925 | |
<MdCollectionDisplayName> | xs:string | 0 or 1 | The collection to which the described resource belongs, given as a human-readable name. In VLO this name will be assigned to the Collection facet. |
Examples
<cmd:Header> <cmd:MdCreator>John Doe</cmd:MdCreator> <cmd:MdCreationDate>2012-04-17</cmd:MdCreationDate> <cmd:MdSelfLink>hdl:1234/567890</cmd:MdSelfLink> <cmd:MdProfile>clarin.eu:cr1:p_1311927752306</cmd:MdProfile> <cmd:MdCollectionDisplayName>CLARIN-NL web services</cmd:MdCollectionDisplayName> </cmd:Header>
The <Resources>
element
This section of the CMDI file enumerates
- files which are parts of or closely related to the described resource (
<ResourceProxyList>
and<JournalFileProxyList>
) - possible relations between pairs of these files (
<ResourceRelationList>
) - any external resources of which the described resource is a part (
<IsPartOfList>
)
The list of resource proxies
<ResourceProxyList>
contains a sequence of zero or more occurrences of <ResourceProxy>
, each of which representing a file/part of the described resource.
Name | Value type | Occurrences | Description | |||
---|---|---|---|---|---|---|
<ResourceProxyList> | xs:complexType | 1 | Contains a list of resource proxies (see below) | |||
<ResourceProxy> | xs:complexType | 0 to unbounded | Represents a file which is a part of or closely related to the described resource | |||
@id | xs:ID | 1 | Local identifier for the parent <ResourceProxy> , unique within this CMDI file
| |||
<ResourceType> | Value from controlled set (cmd:Resourcetype_simple ): Resource ,Metadata ,LandingPage ,SearchService ,SearchPage | 1 | The type of the file represented by this <ResourceProxy>
| |||
@mimeType | xs:string | 0 or 1 | The media type of the file | |||
<ResourceRef> | xs:anyURI | 1 | A reference to the file represented by this <ResourceProxy> , in the form of a Clarin compliant PID or a regular URL
|
The list of journal files
<JournalFileProxyList>
contains a sequence of zero or more occurrences of <JournalFileProxy>
, each of which representing a file containing provenance information about the described resource.
Name | Value type | Occurrences | Description | ||
---|---|---|---|---|---|
<JournalFileProxyList> | xs:complexType | 1 | Contains a list of journal file proxies (see below) | ||
<JournalFileProxy> | xs:complexType | 0 to unbounded | Represents a file containing provenance information about the described resource | ||
<JournalFileRef> | xs:anyURI | 1 | A reference to the file represented by this <JournalFileProxy> , in the form of a Clarin compliant PID or a regular URL
|
The list of relations between resource files
<ResourceRelationList>
contains a sequence of zero or more occurrences of <ResourceRelation>
, each of which representing a relation between any pair of <ResourceProxies>
.
Name | Value type | Occurrences | Description | ||||
---|---|---|---|---|---|---|---|
<ResourceRelationList> | xs:complexType | 1 | A representation of a relation between 2 resource proxies listed in <ResourceProxyList>
| ||||
<ResourceRelation> | xs:complexType | 0 to unbounded | A representation of a relation between 2 resource proxies listed in <ResourceProxyList>
| ||||
<RelationType> | xs:string | 1 | The type of the relation represented by its parent <ResourceRelation>
| ||||
@ConceptLink | xs:anyURI | 0 or 1 | A reference to some concept registry (Clarin Concept Registry by default), indicating the semantics of <RelationType>
| ||||
<Resource> | xs:complexType | 2 | References one of the resource proxies participating in the relationship | ||||
@ref | xs:IDREF | 1 | A reference to the <ResourceProxy> with id=ref (the <ResourceProxy> represented by its parent <Resource> element)
| ||||
<Role> | xs:string | 0 or 1 | Indicates the role its parent Resource plays in the relationship | ||||
@ConceptLink | xs:anyURI | 0 or 1 | A reference to some concept registry (Clarin Concept Registry by default), indicating the semantics of <RelationType>
|
The IsPartOf List
<IsPartOfList>
contains a sequence of zero or more occurrences of <IsPartOf>
, each representing an external resource of which the described resource constitutes a part.
Name | Value type | Occurrences | Description | |
---|---|---|---|---|
<IsPartOfList> | xs:complexType | 0 or 1 | Contains a list of <IsPartOf> (see below)
| |
<IsPartOf> | xs:anyURI | 0 to unbounded | A reference to an external resource of which the described resource is a part, in the form of a Clarin compliant PID or a regular URL |
Examples
<cmd:Resources> <cmd:ResourceProxyList> <cmd:ResourceProxy id="h0"> <cmd:ResourceType>Resource</cmd:ResourceType> <cmd:ResourceRef>hdl:1839/00-SERV-0000-0000-0009-D</cmd:ResourceRef> </cmd:ResourceProxy> </cmd:ResourceProxyList> <cmd:JournalFileProxyList/> <cmd:ResourceRelationList/> </cmd:Resources>
The components
This part of the CMDI file forms what may be referred to as «real» metadata about the described resource. Both content and structure are completely defined by the CMD Profile referenced by the XML element<MdProfile>
in <Header>
.
Name | Value type | Occurrences | Description | |||
---|---|---|---|---|---|---|
<Components> | xs:complexType | 1 | Contains 1 occurrence of an XML element named according to selected CMD profile | |||
<{CMDProfile}> | xs:complexType | 1 | The XML element housing all the metadata about the described resource, complying with the {CMDProfile} schema | |||
<{CMDElement}> | Subset of XSD datatypes | 0 to unbounded | Atomic piece of information about the described resource | |||
@xml:lang | xs:string | 0 or 1 | Indicates the language of the {CMDElement} content, by a 2 letter language tag from ISO 639 | |||
@ConceptLink | xs:anyURI | 0 or 1 | Reference to a concept in an external vocabulary. Used in case the value {CMDElement} is selected from a controlled vocabulary | |||
<{CMDComponent}> | xs:complexType | 0 to unbounded | A chunk of information about the described resource, recursively composed of CMD Elements and other CMD Components | |||
@ComponentId | xs:anyURI | 0 or 1 | Reference to the specification of {{CMDComponent} in Component Registry. If not present, {CMDComponent} is defined locally within its parent CMD component |
The CMDI Component Specification Language (CCSL)
The CMDI Component Specification Language (CCSL) is used to describe a CMD component or CMD profile. Hence, a CCSL document provides the structure for describing an aspect of a resource or (in the case of a profile specification) the complete structure of the CMD instance. It is also basis for the generation of the XML schema file that is used to validate a CMD instance (see section Transformation of CCSL into a CMD schema definition for details).
A CCSL document MUST
contain a CCSL header and the actual CMD component description. Its root element MUST
contain an XML attribute isProfile to indicate if the document specifies a CMD profile or a CMD component.
Name | Valuetype | Occurrences | Description | |
---|---|---|---|---|
<ComponentSpec> | xs:complexType | 1 | Root element of the CCSL document | |
<Header> | xs:complexType | 1 | Header of the component specification | |
<Component> | xs:complexType | 1 | Definition of the component's structure | |
@isProfile | xs:boolean | 1 | Indication about the component's status as a profile |
Examples
<ComponentSpec isProfile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cue="http://www.clarin.eu/cmdi/cues/display/1.0" xsi:noNamespaceSchemaLocation="http://www.clarin.eu/cmd/1/xsd/cmd-component.xsd"> <Header> ... </Header> <Component CardinalityMax="1" CardinalityMin="1" name="ToolService"> ... </Component> </ComponenSpec>
CCSL header
The CCSL header provides information relevant to identify and describe the component. This part includes a persistent identifier, the name, the description of the component and information about the status of the specification. The header MUST
contain an element indicating the component's status in its lifecycle (using the three lifecycles development, production, or deprecated) and MAY
contain the element statusComment to contain information about the reason for the current status. In the case of a deprecated specification that was succeeded by a new specification, the identifier of the direct successor MAY
be stored in the element Successor.
Name | Valuetype | Occurrences | Description | |
---|---|---|---|---|
<Header> | xs:complexType | Descriptive information about the component | ||
<ID> | xs:anyURI | 0 or 1 | ID of the component specification | |
<Name> | xs:string | 0 or 1 | Name of the component | |
<Description> | xs:string | 0 or 1 | Description of the component | |
<Status> | xs:string ("development", "production", "deprecated") | 1 | Status in lifecycle | |
<StatusComment> | xs:string | 0 or 1 | Comment about the status | |
<Successor> | xs:anyURI | 0 or 1 | ID of successor component, if available |
Examples
<Header> <ID>clarin.eu:cr1:p_1311927752306</ID> <Name>ToolService</Name> <Description>Description of a tool and/or service(s) (adapted from the AnnotationTool profile)</Description> <Status>production</Status> </Header>
<Header> <ID>clarin.eu:cr1:p_1311927752306</ID> <Name>ToolService</Name> <Description>Description of a tool and/or service(s) (adapted from the AnnotationTool profile)</Description> <Status>deprecated</Status> <Successor>clarin.eu:cr1:p_1234567890</Successor> </Header>
CMD component definition
Components are defined as a sequence of elements which MAY
be followed by other components. The latter is allowed because components may be embedded in other components. If an already defined CMD component (i.e. a CMD component with its own identifier) should be referenced, @ComponentId
MUST
be used to indicate its identifier. If this is not the case, the specification of a CMD components MAY
contain the name of the component, the component's identifier, a concept link, and information about the allowed cardinality of the component. Furthermore documentation texts and further CMD attributes MAY
be specified.
Name | Valuetype | Occurrences | Description | |
---|---|---|---|---|
<Component> | xs:complexType | Root element of every CMD component definition | ||
@name | xs:Name | 0 or 1 | Name of the component | |
@ComponentId | xs:anyURI | 0 or 1 | Identifier of the component | |
@ConceptLink | xs:anyURI | 0 or 1 | Concept link | |
@CardinalityMin | xs:nonNegativeInteger | 0 or 1 | Minimum number of times this component has to occur | |
@CardinalityMax | xs:nonNegativeInteger or “unbounded” | 0 or 1 | Maximum number of times this component may occur | |
Documentation | xs:string | 0 to unbounded | Documentation about the purpose of the component | |
AttributeList | xs:complexType | 0 or 1 | Additional attributes specified by the component creator |
Examples
<Component ComponentId="clarin.eu:cr1:c_1320657629631" name="Service" ConceptLink="http://hdl.handle.net/11459/CCR_C-4159_ca0e6cba-cab5-b51a-f430-fdcb0756c9ac" CardinalityMin="0" CardinalityMax="unbounded"> <Documentation>...</Documentation> <AttributeList> ... </AttributeList> ... </Component>
CMD element definition
CMD elements are a template for storing atomic values constrained by a value scheme in a CMD instance. The CCSL specification of an CMD element MUST
contain the name of the element and MAY
contain a concept link, the value schema, and information about the allowed cardinality of the element. Furthermore it MAY
be indicated if the element may have different instance values in multiple languages, and hence an unlimited upper cardinality bound.
Besides standard XML schema datatypes the value of a CMD element MAY
be constrained by using regular expressions or vocabularies. The latter can be specified by giving the complete list of allowed values or by stating the URI of an external vocabulary (for details see Value restrictions for elements and attributes). If the instance's content of the element can be derived from other values, the element AutoValue
MAY
be used to give indication about the derivation function. The CCSL does not prescribe or suggest a specific set of derivation functions.
Name | Valuetype | Occurrences | Description | |
---|---|---|---|---|
<Element> | xs:complexType | Root element of every CMD element definition | ||
@name | xs:Name | 1 | Name of the element | |
@ConceptLink | xs:anyURI | 0 or 1 | Concept link | |
@ValueScheme | Subset of XSD datatypes | 0 or 1 | Allowed data type if simple XML type is used | |
@CardinalityMin | xs:nonNegativeInteger or "unbounded" | 0 or 1 | Minimum number of times this element has to occur | |
@CardinalityMax | xs:nonNegativeInteger or "unbounded" | 0 or 1 | Maximum number of times this element may occur | |
@Multilingual | xs:boolean | 0 or 1 | Indication that the element can have values in multiple languages | |
<Documentation> | xs:string | 0 to unbounded | Documentation about the purpose of the element | |
<AttributeList> | xs:complexType | 0 or 1 | Additional attributes specified by the component creator | |
<ValueScheme> | xs:complexType | 0 or 1 | Value restrictions based on a regular expression or a specified vocabulary. See Value restrictions for elements and attributes for details. | |
<AutoValue> | xs:string | 0 to unbounded | Derivation rules for the element's content |
Examples
<Element name="Name" ConceptLink="http://hdl.handle.net/11459/CCR_C-4160_192be757-0d8f-f4fe-b10b-d3d50de92482" CardinalityMin="1" CardinalityMax="1" ValueScheme="string" Multilingual="false"> <Documentation>The name of the web service or set of web services.</Documentation> </Element>
CMD attribute definition
Both the CMD element and component description allow the specification of additional CMD attributes. Every CMD attribute definition MUST
contain a @name
attribute and MAY
contain other attributes or elements for a more detailled description.
Name | Valuetype | Occurrences | Description | |
---|---|---|---|---|
<Attribute> | xs:complexType | Root element of every CMD attribute definition | ||
@name | xs:Name | 1 | Name of the attribute | |
@ConceptLink | xs:anyURI | 0 or 1 | Concept link | |
@ValueScheme | Subset of XSD datatypes | 0 or 1 | Allowed data type if simple XML type is used | |
@Required | xs:boolean | 0 or 1 | Indication if attribute is required | |
<Documentation> | xs:string | 0 to unbounded | Documentation about the purpose of the attribute | |
<ValueScheme> | xs:complexType | 0 or 1 | Value restrictions based on a regular expression or a specified vocabulary. See Value restrictions for elements and attributes for details. | |
<AutoValue> | xs:string | 0 to unbounded | Derivation rules for the attribute's content |
Examples
<Attribute name="CoreVersion" ConceptLink="http://hdl.handle.net/11459/CCR_C-2547_7883d382-b3ce-8ab4-7052-0138525a8ba1" Required="true"> <ValueScheme> ... </ValueScheme> </Attribute>
Value restrictions for elements and attributes
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:
- specifying all allowed values with
OPTIONAL
attributes for every value to include a concept link and a description of the specific value, or - referring to an external vocabulary via a URI specified in
@URI
.OPTIONAL
XML attributes@ValueProperty
and@ValueLanguage
MAY
be used to give more information about preferred label and language in the chosen vocabulary.
Name | Valuetype | Occurrences | Description | ||||
---|---|---|---|---|---|---|---|
<ValueScheme> | xs:complexType | Specification of the value scheme of an element or attribute. | |||||
<pattern> | xs:string | 0 or 1 | Specification of a regular expression the element/attribute should comply with. | ||||
<Vocabulary> | xs:complexType | 0 or 1 | Specification of a CMD vocabulary | ||||
<Enumeration> | xs:complexType | 0 or 1 | Enumeration of items from a controlled vocabulary | ||||
<item> | xs:string | 0 to unbounded | An item from a controlled vocabulary | ||||
@ConceptLink | xs:anyURI | 0 or 1 | Concept link of item value | ||||
@AppInfo | xs:string | 0 or 1 | End-user guidance about the value of this controlled vocabulary item. | ||||
<appinfo> | xs:string | 0 to unbounded | End-user guidance about the value of the controlled vocabulary as a whole. Currently not used. | ||||
@URI | xs:anyURI | 0 or 1 | URI of an external vocabulary | ||||
@ValueProperty | xs:string | 0 or 1 | preferred label in the external vocabulary | ||||
@ValueLanguage | xs:language | 0 or 1 | preferred language in the external vocabulary |
Examples
<ValueScheme> <Vocabulary URI="http://openskos.meertens.knaw.nl/iso-639-3" ValueProperty="skos:notation"> <enumeration> <item AppInfo="Ghotuo (aaa)" ConceptLink="http://cdb.iso.org/lg/CDB-00132443-001">aaa</item> <item AppInfo="Alumu-Tesu (aab)" ConceptLink="http://cdb.iso.org/lg/CDB-00133770-001">aab</item> <item AppInfo="Ari (aac)" ConceptLink="http://cdb.iso.org/lg/CDB-00133769-001">aac</item> <item AppInfo="Amal (aad)" ConceptLink="http://cdb.iso.org/lg/CDB-00133768-001">aad</item> <item AppInfo="Arbëreshë Albanian (aae)" ConceptLink="http://cdb.iso.org/lg/CDB-00133767-001">aae</item> <item AppInfo="Aranadan (aaf)" ConceptLink="http://cdb.iso.org/lg/CDB-00133766-001">aaf</item> ... </enumeration> </Vocabulary> </ValueScheme>
<ValueScheme> <pattern>((\\p{L}|\\p{N}|\\p{P}|\\p{S})+|\\s)+</pattern> </ValueScheme>
Cues attributes
All CMD attribute, element, and component specifications may contain additional attributes with the namespace “http://www.clarin.eu/cmd/cues/1”. These MAY
be used to give information about how the payload contained in the respective part of the CMD instance should be presented. Cues are grouped in component specific styles. Different styles for the same CMD component MAY
be developed. The CCSL does not prescribe or suggest a specific set of cue attributes.
Examples
<Element name="Name" ... cue:DisplayPriority="1"> ... </Element>
Transformation of CCSL into a CMD profile schema definition
A CMD instance document that is serialised as XML according this specification SHOULD
contain a reference the location of a CMD profile schema. The infrastructure MUST
provide a mechanism to derive such a schema for any specific CMD profile on basis of its definition and that of the CMD components that it references. This section specifies how different aspects of a CMD specification should be transformed into elements of a schema definition. The primary schema language targeted is XML Schema, although the infrastructure MAY
provide support for other schema languages, such as DDML or Relax NG.
CMD profile schemas SHOULD NOT
(MUST NOT
?) be derived from CMD specifications that are not CMD profiles.
The transformation as described here is assumed to take place on the fully expanded CMD profile, i.e. a version of the specification that has all referenced (non-inline) CMD Component definitions are resolved and substituted, recursively, by their full definitions.
General properties of the CMD profile schema definition
A CMD profile schema MUST
be a single document {or set of linked documents with a single entry point}(?) that allows for the evaluation of a CMD instance on all levels of description defined in one specific CMD profile.
The schema MUST
require the presence of a CMD instance envelope as described in section "Structure of CMDI-files". The value of the <MdProfile>
header item in the CMD instance envelope MUST
only be valid if it is equal to the profile id as specified in the associated CMD profile.
The CMD profile schema SHOULD
include, as a matter of annotation, a copy of (a subset of) the information contained in the Header
section of the CMD profile from which it is derived.
The transformation MAY
make use of embedded component identifiers in the CMD component definition to derive (complex) types that can be reused throughout the schema definition.
The schema MUST
declare a profile specific payload namespace in addition to the fixed, global namespaces that are used (in particular cmd
and cue
). This namespace, with RECOMMENDED
prefix cmdp
, MUST
have the following format: http://www.clarin.eu/cmd/1/profiles/{profileId}
, where {profileId}
refers to the identifier of the profile from which the schema is derived in the Component Registry. All XML elements and XML attributes derived from CMD components, CMD elements and CMD attributes MUST
be declared in this namespace.
Interpretation of CMD component definitions in the CCSL
CMD Components which are represented as <Component>
XML elements in the CCSL, MUST
be realised as XML element declarations with the following property mapping:
Property | XML schema attribute | Derived from | Use |
---|---|---|---|
Name of the XML element | @name | @name | REQUIRED
|
Minimal number of occurrences | @minOccurs | @CardinalityMin , or '1' if XML attribute not present | REQUIRED 1
|
Maximal number of occurrences | @maxOccurs | @CardinalityMax , or '1' if XML attribute not present | REQUIRED 1
|
Concept link | @dcr:datcat | @ConceptLink | OPTIONAL
|
Component id | @cmd:ComponentId | @ComponentId | OPTIONAL
|
1The implementation may make use of default evaluation of the schema language if it matches these requirements, as is the case with XML Schema, and therefore omit explicit declaration of these properties
An optional XML Attribute @cmd:ref
of type xs:IDREFS MUST
be allowed on the XML container element derived from any CMD component.
<Documentation>
XML elements contained in CMD Components SHOULD
be transformed into documentation elements embedded in the XML element declaration. In these, the content language information contained in the @xml:lang
XML attribute SHOULD
be preserved.
XML attributes of CMD Components in the 'cue' namespace SHOULD
be copied into the XML element declaration, in which case the XML attribute name, namespace and value SHOULD
be preserved.
Document structure prescribed by the schema
The first CMD component defined in the CMD profile (the "root component") MUST
be mapped as the mandatory, only direct descendant of the <Components>
XML element of the CMD instance envelope.
CMD components that are defined as direct descendants of another CMD component MUST
be mapped as direct descendants of the XML element declaration to which it is transformed. XML components at the CMD component level in the metadata instance MUST
be required to be included in the same order as defined in the CMD specification, the first of the resulting XML elements appearing after the last XML element derived from a CMD element at the same level, if present. These descendant CMD Components MUST
also be mapped to XML element declarations recursively as described in this specification.
CMD elements MUST
be mapped as direct descendants of the XML element declaration derived from the CMD component of which they are direct descendants, and MUST
be required to be included in the same order as defined in the CMD specification.
CMD attributes that are defined in the CCSL within <Attribute>
XML elements within an <AttributeList>
XML element that is a direct descendant of a CMD Component MUST be mapped to XML attribute definitions on the XML container element to which it is transformed.
Interpretation of CMD element definitions in the CCSL
CMD elements, represented as <Element>
XML elements in the CCSL, MUST
be realised as XML element declarations with the following property mapping:
Property | XML schema attribute | Derived from | Use |
---|---|---|---|
Name of the XML element | @name | @name | REQUIRED
|
Minimal number of occurrences | @minOccurs | @CardinalityMin unless @Multilingual is true,in which case MUST be 'unbounded', or '1' if neither XML attribute is present | REQUIRED 1
|
Maximal number of occurrences | @maxOccurs | @CardinalityMax , or '1' if XML attribute not present | REQUIRED 1
|
Type of the XML element | @type | See section 'Content model' | |
Concept link | @dcr:datcat | @ConceptLink | OPTIONAL
|
Auto value instruction | @cmd:AutoValue | @AutoValue | OPTIONAL
|
1The implementation may make use of default evaluation of the schema language if it matches these requirements, as is the case with XML Schema, and therefore omit explicit declaration of these properties
<Documentation>
XML elements contained in CMD elements SHOULD
be transformed into documentation elements embedded in the XML element declaration In these, the content language information contained in the @xml:lang
XML attribute SHOULD
be preserved.
XML attributes of CMD Elements in the 'cue' namespace SHOULD
be copied into the XML element declaration, in which case the XML attribute name, namespace and value SHOULD
be preserved.
An optional XML Attribute @cmd:ValueConceptLink
of type xs:anyURI MUST
be allowed on the XML element derived from a CMD element that has a vocabulary with XML attribute @URI
defined (see section "Content model for CMD elements and CMD attributes in the schema definition").
The derivation of a content model for the XML element declaration on basis of a CMD element is described below.
Interpretation of CMD attribute definitions in the CCSL
CMD attributes, represented as <Attribute>
XML elements in the CCSL, MUST
be realised as XML attribute declarations with the following property mapping:
Property | XML schema attribute | Derived from | Use |
---|---|---|---|
Name of the XML element | @name | @name | REQUIRED
|
Use of the XML attribute | @use | 'required' if and only if @Required is present and equals true, otherwise 'optional' | REQUIRED 1
|
Type of the XML attribute | @type | See section 'Content model' | |
Concept link | @dcr:datcat | @ConceptLink | OPTIONAL
|
Auto value instruction | @cmd:AutoValue | @AutoValue | OPTIONAL
|
1The implementation may make use of default evaluation of the schema language if it matches these requirements, as is the case with XML Schema, and therefore omit explicit declaration of these properties
<Documentation>
XML elements contained in CMD attributes SHOULD
be transformed into documentation elements embedded in the XML attribute declaration In these, the content language information contained in the @xml:lang
XML attribute SHOULD
be preserved.
XML attributes of CMD Attributes in the 'cue' namespace SHOULD
be copied into the XML attribute declaration, in which case the XML attribute name, namespace and value SHOULD
be preserved.
The derivation of a content model for the XML attribute declaration on basis of a CMD attribute is described below.
Content model for CMD elements and CMD attributes in the schema definition
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.
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.
Otherwise, if a CMD element or CMD attribute in the CCSL has a descendant XML element <ValueScheme>
that contains an XML element <Vocabulary>
:
- The XML attribute
@URI
of the XML element<Vocabulary>
, if present,SHOULD
be transformed into an attributecmd:Vocabulary
1 of the same value on the XML element or attribute declaration in the schema. - The XML attributes
@ValueProperty
and@ValueLanguage
of the XML element<Vocabulary>
SHOULD
be transformed into XML attributes1 in the 'cmd:' namespace on the XML element declaration in the case of a CMD element or XML attribute declaration in the case of a CMD attribute. - 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 schemaSHOULD
be annotated the value from the XML attribute@ConceptLink
by means of an XML attribute@dcr:datcat
1 and the value of the XML attribute@AppInfo
by means of an attribute@cmd:label
.
1The attributes @cmd:Vocabulary
, @cmd:ValueProperty
, @cmd:ValueLanguage
and @dcr:datcat
should be present in the schema, not be declared as attributes allowed in the CMD instance
Appendices
Bibliography
IETF RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
IETF RFC 2046, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
IETF RFC 5646, Tags for Identifying Languages
ISO 639‐1, Codes for the representation of names of languages — Part 1: Alpha-2 code
ISO 639‐3, Codes for the representation of names of languages -- Part 3: Alpha-3 code for comprehensive coverage of languages
ISO 3166‐1, Codes for the representation of names of countries and their subdivisions — Part 1: Country codes
ISO 8601, Data elements and interchange formats — Information interchange — Representation of dates and times
ISO/IEC 10646‐1, Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 1: Architecture and Basic Multilingual Plane XML Schema Part 2: Datatypes, Biron, P.V. and Malhotra, A. (eds.), W3C Recommendation 02 May 2001, available at <http://www.w3.org/TR/xmlschema-2/>
Attachments (12)
- CCSL.png (202.3 KB) - added by 8 years ago.
- CMDI_structure.png (204.8 KB) - added by 8 years ago.
-
CMDI_1.png (44.0 KB) - added by 8 years ago.
CMDI 1 model diagram
- CMDI 1.2 extensions to the component metadata model.html (3.7 KB) - added by 6 years ago.
- CCSL2.html (7.1 KB) - added by 6 years ago.
- CMDIFilStructure.html (6.2 KB) - added by 6 years ago.
- CMDI 1.2 extensions to the component metadata model.xml (3.0 KB) - added by 6 years ago.
- CCSL2.xml (6.5 KB) - added by 6 years ago.
- CMDIFilStructure.xml (5.6 KB) - added by 6 years ago.
- CCSL2.pdf (95.2 KB) - added by 6 years ago.
- CMDIFilStructure.pdf (102.0 KB) - added by 6 years ago.
- CMDI 1.2 extensions to the component metadata model.pdf (48.8 KB) - added by 6 years ago.
Download all attachments as: .zip