Template:— representing_count (rep_count) Date: 2008/01/17 10:56:33
Revision: 1.24
Template: representing_count

XML references to the Template

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

representing_count

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_count" capability="representing_value_with_unit">
  <param name="value">
    <param_value>1</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="representing_count">
  <param_in name="value" value="1"/>
</template_example>

representing_count
/representing_count(value='1')/

Path

-- Instantiate Value_with_unit entity
Value_with_unit

-- Set the Value_with_unit attributes
Value_with_unit.value_component -> @value

-- Instantiate Unit and point at it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.si_unit = 'false'
Unit.name = '/IGNORE'

-- Bind the Value_with_unit to the parameter ^count.
-- The parameter is a reference parameter so the Value_with_unit
-- entity can be referred to when this template is used.
%^count = Value_with_unit%

-- Bind the Unit to the parameter ^unit.
-- The parameter is a reference parameter so the Unitt
-- entity can be referred to when this template is used.
%^unit = Unit%

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name='Count',
    ecl_id='urn:plcs:rdl:std')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.si_unit 'false'
Unit.name '/IGNORE'

XML representation of path

<refpath
   template="representing_count">
   <comment>
      Instantiate Value_with_unit entity
   </comment>
   <instantiate
      entity="Value_with_unit"
      context="">
      
   </instantiate>
   <comment>
      Set the Value_with_unit attributes
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Value_with_unit"
            attribute="value_component"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="value">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Unit and point at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Value_with_unit"
            attribute="unit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Unit"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the Unit attributes
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Unit"
            attribute="si_unit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" 'false' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Unit"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Value_with_unit to the parameter ^count.
   </comment>
   <comment>
      The parameter is a reference parameter so the Value_with_unit
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="count">
      <express_entity
         entity="Value_with_unit"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Bind the Unit to the parameter ^unit.
   </comment>
   <comment>
      The parameter is a reference parameter so the Unitt
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="unit">
      <express_entity
         entity="Unit"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign reference data for name of Unit
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="Unit">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Count'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved