Template:— assigning_document (asg_doc) Date: 2008/01/28 09:42:56
Revision: 1.19
Template: assigning_document

XML references to the Template

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

assigning_document

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_document" capability="representing_documents">
  <param name="assigned_document">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_ass_role">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_ar_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="is_assigned_to">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_document">
  <param_in name="assigned_document" value=""/>
  <param_in name="doc_ass_role" value=""/>
  <param_in name="doc_ar_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="is_assigned_to" value=""/>
</template_example>

assigning_document
/assigning_document(assigned_document='', doc_ass_role='', doc_ar_ecl_id='urn:plcs:rdl:std', is_assigned_to='')/

Path

-- Create the document assignment entity.
Document_assignment
Document_assignment.role = '/IGNORE'
Document_assignment.is_assigned_to -> @is_assigned_to

-- Mark the Document_assignment entity as referable when this template is used.
-- In other words, bind the Document_assignment instance to the reference
-- parameter doc_asg
%^doc_asg = Document_assignment%

-- Assign the role through ref data
/assigning_reference_data(
    items=^doc_asg,
    class_name=@doc_ass_role,
    ecl_id=@doc_ar_ecl_id)/

-- Assign the document to be used
Document_assignment.assigned_document -> @assigned_document
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Document_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_document">
   <comment>
      Create the document assignment entity.
   </comment>
   <instantiate
      entity="Document_assignment"
      context="">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="is_assigned_to"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="is_assigned_to">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Mark the Document_assignment entity as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the Document_assignment instance to the reference
   </comment>
   <comment>
      parameter doc_asg
   </comment>
   <bind
      parameter="doc_asg">
      <express_entity
         entity="Document_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign the role through ref data
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^doc_asg">
         
      </param_in>
      <param_in
         name="class_name"
         value="@doc_ass_role">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@doc_ar_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Assign the document to be used
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="assigned_document"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="assigned_document">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved