Changes between Version 82 and Version 83 of CMDI 1.2/Specification


Ignore:
Timestamp:
12/01/15 08:42:40 (8 years ago)
Author:
Menzo Windhouwer
Comment:

Added first XML examples

Legend:

Unmodified
Added
Removed
Modified
  • CMDI 1.2/Specification

    v82 v83  
    192192A 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).
    193193
     194=== Examples ===
     195
     196{{{
     197#!xml
     198<cmd:CMD CMDVersion="1.2"
     199  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     200  xmlns:cmd="http://www.clarin.eu/cmd/1"
     201  xmlns:cmdp="http://www.clarin.eu/cmd/1/profiles/clarin.eu:cr1:p_1311927752306"
     202  xsi:schemaLocation="http://www.clarin.eu/cmd/1                                        http://www.clarin.eu/cmd/1/xsd/cmd-envelop.xsd
     203                      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">
     204    <cmd:Header>
     205        ...
     206    </cmd:Header>
     207    <cmd:Resources>
     208        <cmd:ResourceProxyList>
     209            ...
     210        </cmd:ResourceProxyList>
     211        <cmd:JournalFileProxyList>
     212            ...
     213        </cmd:JournalFileProxyList>
     214        <cmd:ResourceRelationList>
     215            ...
     216        </cmd:ResourceRelationList>
     217    </cmd:Resources>
     218    <cmd:Components>
     219        ...
     220    </cmd:Components>
     221</cmd:CMD>
     222}}}
    194223
    195224==      The `<Header>` element==
     
    226255||  ||`<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.||
    227256 
    228 
     257=== Examples ===
     258
     259{{{
     260#!xml
     261<cmd:Header>
     262    <cmd:MdCreator>John Doe</cmd:MdCreator>
     263    <cmd:MdCreationDate>2012-04-17</cmd:MdCreationDate>
     264    <cmd:MdSelfLink>hdl:1234/567890</cmd:MdSelfLink>
     265    <cmd:MdProfile>clarin.eu:cr1:p_1311927752306</cmd:MdProfile>
     266    <cmd:MdCollectionDisplayName>CLARIN-NL web services</cmd:MdCollectionDisplayName>
     267</cmd:Header>
     268}}}
    229269
    230270==      The `<Resources>` element ==
     
    275315|| ||`<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||
    276316
     317=== Examples ===
     318
     319{{{
     320#!xml
     321<cmd:Resources>
     322    <cmd:ResourceProxyList>
     323        <cmd:ResourceProxy id="h0">
     324            <cmd:ResourceType>Resource</cmd:ResourceType>
     325            <cmd:ResourceRef>hdl:1839/00-SERV-0000-0000-0009-D</cmd:ResourceRef>
     326        </cmd:ResourceProxy>
     327    </cmd:ResourceProxyList>
     328    <cmd:JournalFileProxyList/>
     329    <cmd:ResourceRelationList/>
     330</cmd:Resources>
     331}}}
     332
    277333==      The components ==
    278334Sate purpose of components section, and its dependency upon profile (as given in header: MdProfile)
     
    297353|| || `@isProfile` || `xs:boolean` || 1 || Indication about the component's status as a profile ||
    298354
    299 
     355=== Examples ===
     356
     357{{{
     358#!xml
     359<ComponentSpec isProfile="true"
     360  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     361  xmlns:cue="http://www.clarin.eu/cmdi/cues/display/1.0"
     362  xsi:noNamespaceSchemaLocation="http://www.clarin.eu/cmd/1/xsd/cmd-component.xsd">
     363    <Header>
     364        ...
     365    </Header>
     366    <Component CardinalityMax="1" CardinalityMin="1" name="ToolService">
     367        ...
     368    </Component>
     369</ComponenSpec>
     370}}}
    300371
    301372==      CCSL header ==
     
    310381|| || `<StatusComment>` || `xs:string` || 0 or 1 || Comment about the status ||
    311382|| || `<Successor>` || `xs:anyURI` || 0 or 1 || ID of successor component, if available ||
     383
     384=== Examples ===
     385
     386{{{
     387#!xml
     388<Header>
     389    <ID>clarin.eu:cr1:p_1311927752306</ID>
     390    <Name>ToolService</Name>
     391    <Description>Description of a tool and/or service(s) (adapted from the AnnotationTool profile)</Description>
     392    <Status>production</Status>
     393</Header>
     394}}}
    312395
    313396==      CMD component definition ==
     
    325408|| || `AttributeList` || `xs:complexType` || 0 or 1 || Additional attributes specified by the component creator ||
    326409
     410=== Examples ===
     411
     412{{{
     413#!xml
     414<Component
     415  ComponentId="clarin.eu:cr1:c_1320657629631"
     416  name="Service"
     417  ConceptLink="http://hdl.handle.net/11459/CCR_C-4159_ca0e6cba-cab5-b51a-f430-fdcb0756c9ac"
     418  CardinalityMin="0" CardinalityMax="unbounded">
     419    ...
     420</Component>
     421}}}
    327422
    328423==      CMD element definition ==
     
    343438|| || `<AutoValue>` || `xs:string` || 0 to unbounded || Derivation rules for the element's content ||
    344439
     440=== Examples ===
     441
     442{{{
     443#!xml
     444<Element
     445  name="Name"
     446  ConceptLink="http://hdl.handle.net/11459/CCR_C-4160_192be757-0d8f-f4fe-b10b-d3d50de92482"
     447  CardinalityMin="1" CardinalityMax="1"
     448  ValueScheme="string"
     449  Multilingual="false">
     450    <Documentation>The name of the web service or set of web services.</Documentation>
     451</Element>
     452}}}
     453
    345454==      CMD attribute definition ==
    346455Both 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.
     
    356465|| || `<AutoValue>` || `xs:string` || 0 to unbounded || Derivation rules for the attribute's content ||
    357466
     467=== Examples ===
     468
     469{{{
     470#!xml
     471<Attribute
     472  name="CoreVersion"
     473  ConceptLink="http://hdl.handle.net/11459/CCR_C-2547_7883d382-b3ce-8ab4-7052-0138525a8ba1"
     474  Required="true">
     475    <ValueScheme>
     476        ...
     477    </ValueScheme>
     478</Attribute>
     479}}}
    358480
    359481==      Value restrictions for elements and attributes ==
     
    380502|| || |||||| `@ValueLanguage` || `xs:language` || 0 or 1 || preferred language in the external vocabulary ||
    381503
     504=== Examples ===
     505
     506{{{
     507#!xml
     508<ValueScheme>
     509    <Vocabulary>
     510        <enumeration>
     511            <item AppInfo="Andorra (AD)">AD</item>
     512            <item AppInfo="United Arab Emirates (AE)">AE</item>
     513            <item AppInfo="Afghanistan (AF)">AF</item>
     514            <item AppInfo="Antigua and Barbuda (AG)">AG</item>
     515            <item AppInfo="Anguilla (AI)">AI</item>
     516            <item AppInfo="Albania (AL)">AL</item>
     517            <item AppInfo="Armenia (AM)">AM</item>
     518            ...
     519        </enumeration>
     520    </Vocabulary>
     521</ValueScheme>
     522}}}
     523
    382524==      Cues attributes ==
    383525All 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.
     526
     527=== Examples ===
     528
     529{{{
     530#!xml
     531<Element
     532  name="Name"
     533  ...
     534  cue:DisplayPriority="1">
     535...
     536</Element>
     537}}}
    384538
    385539= Transformation of CCSL into a CMD profile schema definition =