Changes between Version 26 and Version 27 of CMDI 1.2/Specification


Ignore:
Timestamp:
11/10/15 17:14:39 (9 years ago)
Author:
Twan Goosen
Comment:

updated schema section

Legend:

Unmodified
Added
Removed
Modified
  • CMDI 1.2/Specification

    v26 v27  
    332332}}}
    333333
    334 A CMD instance document that is serialised as XML according this specification SHOULD 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 document. The primary schema language targeted is XML Schema, although the infrastructure MAY provide support for other schema languages, such as DDML or Relax NG.
    335     - CMD profile schemas SHOULD NOT (MUST NOT?) be derived from CMD specifications that are not CMD profiles.
    336 
    337 Global schema properties
    338     - Linked components should be included, expanded
    339     - 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 CMD instance on all levels of description defined in one specific CMD profile.
    340     - The CMD profile schema MAY include, as a matter of annotation, a copy of (a subset of) the header information contained in the CMD profile from which it is defined.
    341     - The CMD profile schema MUST use the following namespaces:
    342         - {cmd} http://www.clarin.eu/cmd/
    343 
    344             - targeted namespace
    345         - {ann} http://www.clarin.eu
    346 
    347             - for annotation and documentation purposes that are outside the scope of instance validation
    348         - {dcr} http://www.isocat.org/ns/dcr
    349 
    350             - for embedded semantic annotation
    351 == Interpretation of CMD header ==
    352 == Interpretation of CMD component definitions in the CCSL ==
    353     - Interpretation of hierarchies in the CCSL
    354     - concept links
    355     - order of children
    356     - elements -> see elements
    357     - attributes -> see attributes
    358 == Interpretation of CMD element definitions in the CCSL ==
    359     - content model (value scheme)
    360     - concept links
    361     - order of children
    362     - attributes -> see attributes
    363 == Interpretation of CMD attribute definitions in the CCSL ==
    364     - content model (value scheme) - same as element??
    365     - concept links
     334   * A __CMD instance__ document that is serialised as XML according this specification '''SHOULD''' 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''.
     335   * __CMD profile schemas__ '''SHOULD NOT''' (MUST NOT?) be derived from __CMD specifications__ that are not __CMD profiles__.
     336   * 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.
     337
     338 * Global schema properties
     339   * 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 __CMD instance__ on all levels of description defined in one specific __CMD profile__.
     340   * The __CMD profile schema__ '''MUST''' use the following namespaces:
     341     * {cmd} http://www.clarin.eu/cmd/
     342       * targeted namespace
     343     * {ann} [http://www.clarin.eu/ http://www.clarin.eu]
     344       * for annotation and documentation purposes that are outside the scope of instance validation
     345     * {dcr} http://www.isocat.org/ns/dcr
     346       * for embedded semantic annotation
     347     * {cue} http://www.clarin.eu/cmdi/cues/display/1.0
     348       * for display cues
     349   * The __CMD profile schema__ '''MAY''' 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 defined.
     350   * The __CMD profile schema__ '''MUST''' require the presence of a __CMD instance envelope__ as described in section [CMDI Instance/The main structure]. The value of the '!MdProfile' header item '''MUST''' only be valid if it is equal to the profile id as specified in the associated __CMD profile__.
     351   * ☐Transformation '''MAY''' make use of component ids to derive (complex) types that can be reused in the schema definition.
     352
     353* Interpretation of CMD component definitions in the CCSL
     354   * __CMD Components__, represented as "Component" __XML elements__ in the CCSL, '''MUST''' be realised as __XML element declarations__ with the following property mapping:
     355     * '''MANDATORY''': Name of the __XML element__: @name
     356     * '''MANDATORY''': Minimal number of occurrences: @!CardinalityMin, '''MUST''' be evaluated as '1' if this XML attribute is missing
     357     * '''MANDATORY''': Maximal number of occurrences: @!CardinalityMax unless @Multilingual is true, in which case '''MUST''' be 'unbounded', otherwise '''MUST''' be evaluated as '1' if @!CardinalityMax is not present
     358     * '''OPTIONAL''': Concept link by means of an __XML attribute__ "!dcr:datcat" on the __XML element__ within the schema definition: @!ConceptLink
     359     * '''OPTIONAL''': Component id by means of an __XML attribute__ "!cmd:ComponentId" on the __XML element__ within the schema definition: @!ComponentId
     360   * 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.
     361   * __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 and '''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 __CMD Components__ '''MUST''' be mapped to __XML element declarations__ recursively as described in this specification.
     362   * An optional __XML Attribute__ "!cmd:ref" of type "!xs:IDREFS" '''MUST''' be allowed on the __XML container element__ derived from any __CMD component__.
     363   * "Documentation" __XML elements__ contained in __CMD Components__ '''MAY''' be transformed into documentation __XML elements__ embedded in the __XML element declaration__, in which case the content language information contained in the "!xml:lang" __XML attribute__ '''SHOULD''' be preserved.
     364   * ☐display cues (all attributes in cue namespace should be copied)
     365
     366 * Interpretation of CMD element definitions in the CCSL
     367   * __CMD elements__, represented as "Element" __XML elements__ in the CCSL, '''MUST''' be realised as __XML element declarations__ with the following property mapping:
     368     * '''MANDATORY''': Name of the __XML element__: @name
     369     * '''MANDATORY''': Minimal number of occurrences: @!CardinalityMin, '''MUST''' be evaluated as '1' if this XML attribute is missing
     370     * '''MANDATORY''': Maximal number of occurrences: @!CardinalityMax unless @Multilingual is true, in which case '''MUST''' be 'unbounded', otherwise '''MUST''' be evaluated as '1' if @!CardinalityMax is not present
     371     * '''OPTIONAL''': Concept link by means of an __XML attribute__ "!dcr:datcat" on the __XML element__ within the schema definition: @!ConceptLink
     372     * ☐!AutoValue
     373   * __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__.
     374   * The derivation of a content model for the __XML element__ __declaration__ on basis of a __CMD element__ is described below.
     375   * "Documentation" __XML elements__ contained in __CMD elements__ '''MAY''' be transformed into documentation __XML elements__ embedded in the __XML element declaration__, in which case the content language information contained in the "!xml:lang" __XML attribute__ '''SHOULD''' be preserved.
     376   * ☐display cues (all attributes in cue namespace should be copied)
     377
     378* Interpretation of CMD attribute definitions in the CCSL
     379   * __CMD attributes__, represented as "Attribute" __XML elements__ in the CCSL, '''MUST''' be realised as __XML attribute declarations__ with the following property mapping:
     380     * '''MANDATORY''': Name of the __XML attribute__: @name
     381     * '''MANDATORY''': Use of the __XML attribute__: '''MUST''' be required if and only if @Required is present and equals true, otherwise '''MUST''' evaluate to optional
     382     * '''OPTIONAL''': Concept link by means of an __XML attribute__ "!dcr:datcat" on the __XML element__ within the schema definition: @!ConceptLink
     383     * ☐!AutoValue
     384   * __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.
     385   * The derivation of a content model for the __XML attribute declaration__ on basis of a __CMD attribute__ is described below.
     386   * "Documentation" __XML elements__ contained in __CMD attributes__ '''MAY''' be transformed into documentation __XML elements__ embedded in the __XML attribute declaration__, in which case the content language information contained in the "!xml:lang" __XML attribute__ '''SHOULD''' be preserved.
     387   * ☐display cues (all attributes in cue namespace should be copied)
     388
    366389
    367390