Changes between Version 9 and Version 10 of CMDI 1.2/Cues/Derived values


Ignore:
Timestamp:
02/17/14 16:06:52 (10 years ago)
Author:
teckart
Comment:

+proposal 2

Legend:

Unmodified
Added
Removed
Modified
  • CMDI 1.2/Cues/Derived values

    v9 v10  
    2626* How will this information be generated and by whom? (Part of component registry/separate editor,separate registry?)
    2727
    28 == Proposed solution ==
     28
     29== First solution ==
     30
    2931The idea is to specify a generic solution for value derivation in CMDI 1.2 without specific restrictions on allowed functions or constants. This is particularly important as there was no broader evaluation of needed functionality (and the above mentioned examples are probably just a start). Furthermore additional extensions in the infrastructure that are needed to support this functionality can be developed at a later time (as long as they are not directly related to the CMDI 1.2 specification process).
    3032
     
    3638
    3739==== Cons ====
    38 * Needs additional components in the infrastructure, namely: a "function registry" where the semantics of all operations/constants is described and all allowed arguments are defined (semantics + allowed datatypes).
    39 * The proposed solution does not guarantee that referenced nodes do exist (usage of a component in various contexts or when refering to optional elements). This is especially important for derivation of values depending on component-external elements. In this case the editor should notify the user of this problem.
     40* needs additional components in the infrastructure, namely: a "function registry" where the semantics of all operations/constants is described and all allowed arguments are defined (semantics + allowed datatypes).
     41* the proposed solution does not guarantee that referenced nodes do exist (usage of a component in various contexts or when refering to optional elements). This is especially important for derivation of values depending on component-external elements. In this case the editor should notify the user of this problem.
    4042
    4143
     
    8890
    8991
    90 
     92==== Open questions ====
     93* Using new namespace?
     94
     95== Second solution ==
     96A simpler solution would be to define a fixed set of functions (numeric operations + some frequently used functions like replacement of language codes with language names) and keywords (like $filesize, $current_time etc.)).
     97
     98The CMD general component schema is extended with one additional (optional) attribute (AutoValue) for the elements and attributes specification. This attribute contains the function that is used to generate the content of the element/attribute and is based on these predefined functions and keywords. Content of other elements that is needed to generate the value is addressed by using XPath expressions.
     99
     100
     101==== Pros ====
     102* simpler solution as proposal 1 (reduces implementation effort)
     103* no need to build new infrastructure components
     104
     105==== Cons ====
     106* may lack expressiveness (missing functions may become clear at some later point)
     107* adding new functions needs changes in all editors (may occur regularly)
     108* the proposed solution does not guarantee that referenced nodes do exist (usage of a component in various contexts or when refering to optional elements). This is especially important for derivation of values depending on component-external elements. In this case the editor should notify the user of this problem.
     109
     110==== Centre impact ====
     111
     112* Affected tools
     113 * Infrastructure
     114  * Component Registry
     115 * Editors
     116  * Arbil
     117  * ProForma
     118 * Viewers
     119  *
     120* Impact on instances
     121
     122=== Implementation examples ===
     123The specification of CMDI elements and attributes is extended by one optional attribute (AutoValue (xs:string)).
     124{{{
     125<!-- list of all attributes that can be bound to a cl_el -->
     126    <xs:attributeGroup name="clarin_element_attributes">
     127        <xs:attribute name="name" type="xs:Name" use="required">
     128            <xs:annotation>
     129                <xs:documentation>The name of the element.</xs:documentation>
     130            </xs:annotation>
     131        </xs:attribute>
     132        ...
     133        <xs:attribute name="AutoValue" type="xs:string">
     134            <xs:annotation>
     135                <xs:documentation>A function that is used to derive the content of this element based on external information.</xs:documentation>
     136            </xs:annotation>
     137        </xs:attribute>
     138    </xs:attributeGroup>
     139}}}
     140and similar for Attribute specifications
     141
     142==== Implementation on component model level ====
     143Example:
     144{{{
     145<CMD_Element name="AgeOfFile" AutoValue="$CurrentDate-date({../CreationDate})"/>
     146}}}
     147
     148
     149
     150==== Open questions ====
     151* Using new namespace?
     152* Allowed syntax?
    91153
    92154{{{#!comment
     
    131193[[TicketQuery(keywords=~derivedvalues,milestone=CMDI 1.2,format=table,col=summary|owner|component|priority|status)]]
    132194
     195
    133196== Discussion ==
    134197