Template:— assigning_language_code (asg_lang_code)
Context:— FMV
Date: 2008/02/05 12:07:42
Revision: 1.3
Template: assigning_language_code

XML references to the Template

These can be cut and pasted into the XML as required.

assigning_language_code

Set up a hyperlink to the template definition.
<template_ref name="assigning_language_code" context="FMV" />

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="assigning_language_code" context="FMV" >
  <param name="lang">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="lang_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="attr">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="considered_instance">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_language_code">
  <param_in name="lang" value=""/>
  <param_in name="lang_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="attr" value=""/>
  <param_in name="considered_instance" value=""/>
</template_example>

assigning_language_code
/assigning_language_code(lang='', lang_ecl_id='urn:plcs:rdl:std', attr='', considered_instance='')/

Path

Language

-- Mark the Language entity as
-- referable when this template is used by binding it to the reference
-- parameter lang
%^lang = Language%
Language.language_code = '/IGNORE'
Language.country_code = '/IGNORE'

-- provide the language code of by classifying the Language entiity
/assigning_reference_data(
    items=^lang,
    class_name=@lang,
    ecl_id=@lang_ecl_id)/
Language_indication

-- Mark the Language_indication entity as
-- referable when this template is used by binding it to the reference
-- parameter lang_ind
%^lang_ind = Language_indication%
Language_indication.used_language -> ^lang
Language_indication.considered_instance -> @considered_instance
Language_indication.considered_attribute = @attr
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Language.language_code '/IGNORE'
Language.country_code '/IGNORE'
Language_indication.considered_attribute @attr

XML representation of path

<refpath
   template="assigning_language_code">
   <instantiate
      entity="Language"
      context="FMV">
      
   </instantiate>
   <comment>
      Mark the Language entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter lang
   </comment>
   <bind
      parameter="lang">
      <express_entity
         entity="Language"
         context="FMV">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Language"
            attribute="language_code"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Language"
            attribute="country_code"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      provide the language code of by classifying the Language entiity
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="FMV">
      <param_in
         name="items"
         value="^lang">
         
      </param_in>
      <param_in
         name="class_name"
         value="@lang">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@lang_ecl_id">
         
      </param_in>
   </call_template>
   <instantiate
      entity="Language_indication"
      context="FMV">
      
   </instantiate>
   <comment>
      Mark the Language_indication entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter lang_ind
   </comment>
   <bind
      parameter="lang_ind">
      <express_entity
         entity="Language_indication"
         context="FMV">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Language_indication"
            attribute="used_language"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="lang">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Language_indication"
            attribute="considered_instance"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="considered_instance">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="FMV">
      <target>
         <express_attribute
            entity="Language_indication"
            attribute="considered_attribute"
            context="FMV">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="attr">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved