Template:— related_documents (reld_docs)
Context:— UK_Defence
Date: 2009/04/17 11:32:30
Revision: 1.3
Template: related_documents

XML references to the Template

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

related_documents

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="related_documents" context="UK_Defence" >
  <param name="category">
    <param_value>Related_document</param_value>
    <description></description>
  </param>
  <param name="description">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_document">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="relating_document">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="related_documents">
  <param_in name="category" value="Related_document"/>
  <param_in name="description" value=""/>
  <param_in name="id" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="related_document" value=""/>
  <param_in name="relating_document" value=""/>
</template_example>

related_documents
/related_documents(category='Related_document', description='', id='', source_organization='', related_document='', relating_document='')/

Path

%^doc_def_reln = Document_definition_relationship%

-- Set the Document_definition_relationship attributes
Document_definition_relationship.relation_type = '/IGNORE'
Document_definition_relationship.description = '/IGNORE'

-- provide the category of the product view definition by classification
/assigning_reference_data(
    items=^doc_def_reln,
    class_name=@category,
    ecl_id='urn:plcs:rdl:uk_defence')/

-- description
/assigning_descriptor(
    descr=@description,
    class_name='Document_definition_relationship_description',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^doc_def_reln)/

-- ID
/identifier(
    ID=@id,
    source_organization=@source_organization,
    type='Document_definition_relationship_identification_code',
    items=^doc_def_reln)/

-- Relate the document_definition to the View_definition_context
Document_definition_relationship.relating_document_definition -> @relating_document
Document_definition_relationship.related_document_definition -> @related_document
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Document_definition_relationship.relation_type '/IGNORE'
Document_definition_relationship.description '/IGNORE'

XML representation of path

<refpath
   template="related_documents">
   <bind
      parameter="doc_def_reln">
      <express_entity
         entity="Document_definition_relationship"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Set the Document_definition_relationship attributes
   </comment>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Document_definition_relationship"
            attribute="relation_type"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Document_definition_relationship"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      provide the category of the product view definition by classification
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^doc_def_reln">
         
      </param_in>
      <param_in
         name="class_name"
         value="@category">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      description
   </comment>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@description">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Document_definition_relationship_description'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^doc_def_reln">
         
      </param_in>
   </call_template>
   <comment>
      ID
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@id">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Document_definition_relationship_identification_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^doc_def_reln">
         
      </param_in>
   </call_template>
   <comment>
      Relate the document_definition to the View_definition_context
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_definition_relationship"
            attribute="relating_document_definition"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="relating_document">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_definition_relationship"
            attribute="related_document_definition"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_document">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved