Skip to main content

Using CMDI: information for metadata authors

Understanding your context

As a metadata author, your options depend on the context in which you will create, edit and/or publish your metadata. So before you start, you will need to know if there are any specific constraints or requirements that apply to you. Broadly speaking, there are three possibilities:

  1. You will have to provide metadata through a user interface provided to you, for instance via forms offered within a repository system. In this case,  compliant metadata will be created automatically as needed based on this input.
  2. You will have to provide metadata records in a format other than CMDI. In this case, some system will take care of representing the same metadata in a CMDI compliant way automatically.
  3. You will have to provide metadata records to the repository system in CMDI format.

If you are not sure which possibilities are available to you, you can find out by contacting the maintainer of the repository that will ingest your metadata. In some contexts, more than one of these possibilities may be available. If the possibility to enter sufficiently rich metadata via a form is available (option 1), explore that approach first. If you do not yet know what system you will submit your metadata to, contact your CLARIN centre; alternatively, you may contact one of the depositing services or your national consortium. If you are still not sure, have a look at the means of contact at the general CLARIN support page.

Producing CMDI documents

If neither of the first two options listed above apply to your situation, you will have to produce CMDI documents that contain your metadata. There are various ways to do so. It is important to first understand which CMDI profile(s) you will be using as a blueprint for your records. Ask the CLARIN centre that will be ingesting your metadata if there are any requirements or guidelines in this regard. If any CMDI records can be accepted into the repository, try to find a Profile in the Component Registry that meets your requirements. If there is no such Profile, you can become a modeller and create your own – for more information, see above.

Once you have selected (or created) your CMDI profile, you can start creating records, either by editing the raw XML in an editor like oXygen or by generating/converting records programmatically. There is also the dedicated CMDI editor COMEDI, maintained by CLARINO in Norway. Another generic CMDI editor is expected to be made available in the near future by the KNAW Humanities Cluster.

Working on CMDI XML

If you prefer to work on the raw XML, or if the particular constraints and requirements that apply to you leave this as the best or only option, keep the following important things in mind when getting started:

  1. reference the CMD envelope schema and the profile specific schema for which the URL can be found in the Component Registry (example); namespaces with recommended prefixes are xmlns:cmd=” for the envelope and xmlns:cmdp="…{profileId}/xsd" for the component specific payload, substituting {profile} with the profile’s actual identifier.
  2. use cmd:CMD as the root element of the document
  3. use the top level element of the profile definition as the only child of the cmd:Components element, for example cmdp:Corpus for a profile named ‘Corpus’.
  4. use XML schema validation to verify the validity of the record

Looking at some examples of valid, existing CMDI records is probably the easiest way to get started. A link to the CMDI record for an item in the VLO can be found in the ‘technical details’ section of the record page that appears when clicking a search result.

There is an extensive Best Practice Guide to help you with authoring CMDI records, in particular if you choose to work on the raw XML.

See also