Template:— assigning_calendar_date (asg_cdate) Date: 2009/04/06 15:56:38
Revision: 1.16
Template: assigning_calendar_date

XML references to the Template

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

assigning_calendar_date

Set up a hyperlink to the template definition.
<template_ref name="assigning_calendar_date" capability="assigning_date_time"/>

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_calendar_date" capability="assigning_date_time">
  <param name="date_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="date_ecl_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_calendar_date">
  <param_in name="date_class_name" value=""/>
  <param_in name="date_ecl_id" value=""/>
  <param_in name="year" value=""/>
  <param_in name="month" value=""/>
  <param_in name="day" value=""/>
  <param_in name="items" value=""/>
</template_example>

assigning_calendar_date
/assigning_calendar_date(date_class_name='', date_ecl_id='', year='', month='', day='', items='')/

Path

Date_or_date_time_assignment
%^date_assgn = Date_or_date_time_assignment%

-- the template assigning_reference_data is being called with parameters set.
-- The reference data is being assigned to the subject of the template,
-- in this case Date_or_date_time_assignment.
/assigning_reference_data(
    items=^date_assgn,
    class_name=@date_class_name,
    ecl_id=@date_ecl_id)/
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> @items
Date_or_date_time_assignment.assigned_date -> Calendar_date
Calendar_date.year_component = @year
Calendar_date.month_component = @month
Calendar_date.day_component = @day
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Date_or_date_time_assignment.role '/IGNORE'
Calendar_date.year_component @year
Calendar_date.month_component @month
Calendar_date.day_component @day

XML representation of path

<refpath
   template="assigning_calendar_date">
   <instantiate
      entity="Date_or_date_time_assignment"
      context="">
      
   </instantiate>
   <bind
      parameter="date_assgn">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      the template assigning_reference_data is being called with parameters set.
   </comment>
   <comment>
      The reference data is being assigned to the subject of the template,
   </comment>
   <comment>
      in this case Date_or_date_time_assignment.
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^date_assgn">
         
      </param_in>
      <param_in
         name="class_name"
         value="@date_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@date_ecl_id">
         
      </param_in>
   </call_template>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Calendar_date"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Calendar_date"
            attribute="year_component"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="year">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Calendar_date"
            attribute="month_component"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="month">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Calendar_date"
            attribute="day_component"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="day">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved