Template:— referencing_document (ref_doc)
Capability:representing_documents
Date: 2011/04/21 12:06:35
Revision: 1.2
Template: referencing_document

XML references to the Template

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

referencing_document

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="referencing_document" capability="representing_documents">
  <param name="doc_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_id_class_name">
    <param_value>Document_identification_code</param_value>
    <description></description>
  </param>
  <param name="doc_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="doc_ver_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="doc_ver_id_class_name">
    <param_value>Version_identification_code</param_value>
    <description></description>
  </param>
  <param name="doc_ver_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="org_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="org_id_class_name">
    <param_value>Organization_name</param_value>
    <description></description>
  </param>
  <param name="org_id_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="referencing_document">
  <param_in name="doc_id" value=""/>
  <param_in name="doc_id_class_name" value="Document_identification_code"/>
  <param_in name="doc_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="doc_ver_id" value=""/>
  <param_in name="doc_ver_id_class_name" value="Version_identification_code"/>
  <param_in name="doc_ver_id_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="org_id" value=""/>
  <param_in name="org_id_class_name" value="Organization_name"/>
  <param_in name="org_id_ecl_id" value="urn:plcs:rdl:std"/>
</template_example>

referencing_document
/referencing_document(doc_id='', doc_id_class_name='Document_identification_code', doc_id_ecl_id='urn:plcs:rdl:std', doc_ver_id='', doc_ver_id_class_name='Version_identification_code', doc_ver_id_ecl_id='urn:plcs:rdl:std', org_id='', org_id_class_name='Organization_name', org_id_ecl_id='urn:plcs:rdl:std')/

Path

Document

-- Mark the Document entity as
-- referable when this template is used by binding it to the reference
-- parameter doc
%^doc = Document%
Document.id = '/IGNORE'
Document.name = '/IGNORE'
Document.description = '/IGNORE'

-- assign the identification to the Document
/assigning_identification(
    items=^doc,
    id=@doc_id,
    id_class_name=@doc_id_class_name,
    id_ecl_id=@doc_id_ecl_id,
    org_id=@org_id,
    org_id_class_name=@org_id_class_name,
    org_id_ecl_id=@org_id_ecl_id)/

-- Mark the Document_version entity as
-- referable when this template is used by binding it to the reference
-- parameter doc_vn
Document_version
%^doc_vn = Document_version%
Document_version.id = '/IGNORE'
Document_version.description = '/IGNORE'
Document_version.of_product -> ^doc

-- assign the identification to the Document_version
/assigning_identification(
    items=^doc_vn,
    id=@doc_ver_id,
    id_class_name=@doc_ver_id_class_name,
    id_ecl_id=@doc_ver_id_ecl_id,
    org_id=@org_id,
    org_id_class_name=@org_id_class_name,
    org_id_ecl_id=@org_id_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Document.id '/IGNORE' Product.id
Document.name '/IGNORE' Product.name
Document.description '/IGNORE' Product.description
Document_version.id '/IGNORE' Product_version.id
Document_version.description '/IGNORE' Product_version.description

XML representation of path

<refpath
   template="referencing_document">
   <instantiate
      entity="Document"
      context="">
      
   </instantiate>
   <comment>
      Mark the Document entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter doc
   </comment>
   <bind
      parameter="doc">
      <express_entity
         entity="Document"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      assign the identification to the Document
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^doc">
         
      </param_in>
      <param_in
         name="id"
         value="@doc_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@doc_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@doc_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Mark the Document_version entity as
   </comment>
   <comment>
      referable when this template is used by binding it to the reference
   </comment>
   <comment>
      parameter doc_vn
   </comment>
   <instantiate
      entity="Document_version"
      context="">
      
   </instantiate>
   <bind
      parameter="doc_vn">
      <express_entity
         entity="Document_version"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_version"
            attribute="of_product"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="doc">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      assign the identification to the Document_version
   </comment>
   <call_template
      name="assigning_identification"
      business_context="">
      <param_in
         name="items"
         value="^doc_vn">
         
      </param_in>
      <param_in
         name="id"
         value="@doc_ver_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@doc_ver_id_class_name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@doc_ver_id_ecl_id">
         
      </param_in>
      <param_in
         name="org_id"
         value="@org_id">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="@org_id_class_name">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="@org_id_ecl_id">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved