Templates - an introduction

latest update: 2019-11--09    


In ISO 15926-7 and -8 the concept of template has been defined. This paper gives an introduction in that concept.

We start with a "shallow" explanation and then a bit more in-depth. For a thorough explanation reading of ISO 15926-7 and of ISO 15926-8 is highly recommended. In this topic we may not violate the copyright owned by ISO. But we may discuss template matters nevertheless.

Some basic wisdom

Information is a set of relationships between two or more objects that are known by, or made known to, the recipient .

For example, when you hear that John Doe and Mary Bloggs are married, that is non-information unless you know these people.

So, in computer terms, we must "declare" the objects before we can represent any information about them. See here.

Shallow explanation

Assume that you want to represent the information that Pipe A is connected to Pump B. In the ISO 15926-2 data model we find a Relationship called ConnectionOfIndividual with two attributes called side1 and side2 :


Now we want to represent the fact that this connection is a Flanged Connection, so we classify the Relationship with a ClassOfRelationship:


This is still a simple little model, with five things, that we can use for all connections. There are two flavors: direct connection, as above, and indirect connections by means of some intermediary material, such as between a nozzle on a pipe or vesel and a pressure transmitter, interconnected by means of tubing) or a connection between Amsterdam Airport and LaGuardia Airport in New York by means of a set of airplanes.

These models can be extended in all directions, so we need to "package" them in what ISO 15926-7 calls "Templates", in order to enable re-use.

We put it in a small table in which we list the three objects that are the variables and give each of them a role in the represented information:


Role No

Role Name

Role Object Type










When we use that template for our example we get:


Role No

Role Name

Role Object Type



Pipe A



Pump B




Before we can use Pipe A, Pump B, and "Flanged Connection" we must declare them (once, and simplified here, see Declaring An Object), thereby using the entity types defined in ISO 15926-2:


   rdf:type lci:InanimatePhysicalObject, rdl:RDS6809993 ;

   rdfs:label "Pipe A" ;

   meta:hasLifecycleActivity rdl:RDS2229995 ;

   meta:valEffectiveDate "2016-09-21T16:51:00Z"^^xsd:dateTime .


   rdf:type lci:InanimatePhysicalObject, rdl:RDS327239 ;

   rdfs:label "Pump B" ;

   meta:hasLifecycleActivity rdl:RDS2229995 ;

   meta:valEffectiveDate "2016-09-21T16:51:00Z"^^xsd:dateTime .


   rdf:type dm:ClassOfDirectConnection ;

   rdfs:subClassOf dm:DirectConnection ;

   rdfs:label "FLANGED CONNECTION" ;

   meta:valEffectiveDate "2016-08-16T00:00:00Z"^^xsd:dateTime .


  1. Prefixes  :  ,  dm: ,  rdf: ,  rdfs:  ,  tpl:  ,  and  meta: (and others) are local codes for the place where the item is (to be) stored or defined; these are "unfolded" in the "N-triple" format below;
  2. InanimatePhysicalObject is a specialization of PhysicalObject, so it is used legally in this template;
  3. meta:hasLifecycleActivity defines during which phase of the life cycle, here: PLANT DESIGN,  this information was generated;
  4. That "FLANGED CONNECTION" has already been declared in the RDL (Reference Data Libary);
  5. For insiders: in the template the fourth role is left out for educational reasons, and so has the WholeLifeIndividual been left out of the declarations.

The template instance then is correctly completed as follows:

ClassifiedDirectConnectionOfTwoIndividuals :87654

Role No

Role Name

Role Object Type
















This can easily be converted to a format, called N-triple, that is used for storage, a "triple store" :

<http:/xyz-corp.com/12345>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15926.org/lci/InanimatePhysicalObject> .

<http:/xyz-corp.com/12345>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15926.org/rdl/RDS6809993> .

<http:/xyz-corp.com/12345>   <http://www.w3.org/2000/01/rdf-schema#label>       "Pipe A"^^<http://www.w3.org/2001/XMLSchema#string> .

<http:/xyz-corp.com/12345>   <http://data.15926.org/meta/hasLifecycleActivity     <http://data.15926.org/rdl/RDS2229995> .

<http:/xyz-corp.com/12345>   <http://data.15926.org/meta/valEffectiveDate>         "2016-09-21T16:51:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .


<http:/xyz-corp.com/67890>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15926.org/lci/InanimatePhysicalObject> .

<http:/xyz-corp.com/67890>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15926.org/rdl/RDS327239> .

<http:/xyz-corp.com/67890>   <http://www.w3.org/2000/01/rdf-schema#label>       "Pump B"^^<http://www.w3.org/2001/XMLSchema#string> .

<http:/xyz-corp.com/67890>   <http://data.15926.org/meta/hasLifecycleActivity     <http://data.15926.org/rdl/RDS2229995> .

<http:/xyz-corp.com/67890>   <http://data.15926.org/meta/valEffectiveDate>         "2016-09-21T16:51:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .


<http:/xyz-corp.com/87654>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.15926.org/tpl/ClassifiedDirectConnectionOfTwoIndividuals> .

<http:/xyz-corp.com/87654>   <http://data.15926.org/tpl/hasSide1>                      <http:/xyz-corp.com/12345> .

<http:/xyz-corp.com/87654>   <http://data.15926.org/tpl/hasSide2>                      <http:/xyz-corp.com/67890> .

<http:/xyz-corp.com/87654>   <http://data.15926.org/tpl/hasConnectionType>      <http://data.15926.org/rdl/RDS2229203> .

<http:/xyz-corp.com/87654>   <http://data.15926.org/meta/hasLifecycleActivity     <http://data.15926.org/rdl/RDS2229995> .

<http:/xyz-corp.com/87654>   <http://data.15926.org/meta/valEffectiveDate>        "2016-09-21T16:51:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

All objects have a URI (http:// address), not all of them are "dereferenceable" (i.e. in case a URI is being sent an information representation is returned).

When a declared object or template is no longer valid, e.g.  when Pipe A and Pump B are no longer connected (in this example on the P&ID), the template is made invalid by adding one triple:

<http:/xyz-corp.com/87654>   <http://data.15926.org/meta/valDeprecationDate>   "2017-06-21T14:37:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

All plant and plant component lifecycle information follows the same pattern of declared objects and templates.

Using the standard query language SPARQL all information valid now or at a given date-time can be fetched via the rdfs:label or via other information. For example, if you don't know the label of the pipe, you can ask for the objects that are connected with Pump B. For components use subtags, such as "Pump B IMP" as tag for the impeller of Pump B..

Each object has an ID that is part of its URI, most objects have a label, sometimes more. Your SSN (Social Security Number) is your ID, your name is your label.

Using templates allows for finding the represented information valid at a given dateTime T by fetching the required template versions of which the valEffectiveDate is the latest before dateTime T

More in-depth explanation

Template types

A template represents a complex n-ary relationship between independent objects. There are four types of template:


Basically these are representing all ISO 15926-2 entity data types that have one or more attributes. These are listed in ISO 15926-7 Annex D. A typical example of a proto-template is the one for CompositionOfIndividual:


First Role

Second Role






This means that the first role of the template is "hasPart" and instances of the first role must be instances of the entity type PossibleIndividual. The second role is "hasWhole" and instances of this role must also be instances of the entity type PossibleIndividual.

In the template language this is represented by:

     CompositionOfIndividualTemplate(y, z) <-> exists u(CompositionOfIndividualTriple(u, y, z))

      CompositionOfIndividualTriple(x, y, z) <-> CompositionOfIndividual(x) & hasPart(x, y) & hasWhole(x, z)

For the full ontology click here.


A Template has only ISO 15926-2 and or ISO 15926-3 entity data types in the expansion of its template axiom. See here for a typical template expressed in OWL.

Orthogonally to the above two types of template are Lifted and Lowered Templates:

Lifted Templates

Lifted templates represent information in a manner that fully complies with ISO 15926-2. Lifted templates serve as a reference for the exact semantics of the lowered templates.

Lifted templates can be instantiated by applying the First Order Logic axiom, specified in the applicable Template Specification, to the instantiated lowered template. An instance of a lifted template can be used for:

  • providing the full semantics for OWL reasoning
  • mapping to another format, for example as defined in ISO 10303-21 (so-called "Part 21 files");
  • validating entity data types of data connected to the template (be it not with OWL tools!);
  • storing and/or exchanging in full lifted format (very verbose).

Lowered Templates

Lowered templates represent information in the form of an n-ary relationship, a collector of n unary relations with independent external things. These things also form the "leafs" of the companion lifted template graph.

NOTE - By convention we mean Lowered Template when we say Template.


If we consider the template ClassOfParticipationDefinition we can show the Lifted and the Lowered Template:

Combined graph

Graph of Lifted Template

Graph of Lowered Template

Example of a Template Signature

For the above (lowered) template ClassOfParticipationDefinition the signature is:


Role Name

Role Object Type











hasDefined dm:ClassOfParticipation







Template signature of ClassOfParticipationDefinition

Template Language

As we have seen above a template is defined as follows:

"A template is a set comprising of a first-order logic predicates for which a definition is stated as an axiom, a template signature and a template axiom expansion.".

The (reduced) set of symbols used in the template language are:







existential quantification


Example of an Axiom

The definition of an axiom is:  "An axiom is a self-consistent statement about the primitive terms that form the basis for discourse. A first-order theory consists of a set of axioms in a particular first-order signature. The set of axioms is often finite."

Below is the axiom for above template ClassOfParticipationDefinition:

    ClassOfParticipationDefinition(x1, x2, x3, x4, x5, x6) <->
    ClassOfActivity(x1) &    
    ClassOfIndividual(x2) &
    Role(x3) &
    Cardinality(x5) &
    Cardinality(x6) &
    exists u1 exists u2 exists u3(
          ClassOfTemporalWholePartTemplate(u1, x1) &
          ClassOfActivity(u1) &
          ClassOfParticipationTriple(u2, x4, u1) &
             hasEnd1Cardinality(u2, x6) &
             hasEnd2Cardinality(u2, x5) &
          ClassOfTemporalWholePartTemplate(u3, x2) &
          ClassOfIndividual(u3) &
          SpecializationByDomainTemplate(x4, u4) &
          SpecializationByRoleTemplate(x4, x3)) .

Representation and Storage in triple format

The representation of the above mentioned template ClassOfParticipationDefinition in triple format is shown below:



<http://data.posccaesar.org/tpl/ClassOfParticipationDefinition> .



<http://www.w3.org/2002/07/owl#Thing> .



<http://data.posccaesar.org/rdl/RDS9706787> .



<http://data.posccaesar.org/rdl/RDS430694> .



<http://data.posccaesar.org/rdl/RDS24374382> .



<http://data.posccaesar.org/rdl/RDS40405459> .



<http://data.posccaesar.org/rdl/RDS6754984> .



<http://data.posccaesar.org/rdl/RDS7093093> .



"2014-06-22T00:00:00+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

Example of storage of an instance of ClassOfParticipationDefinition in triple format

In this format all information is stored in an ISO 15926-9 (work in progress) compliant "triple store" called "Fašade".

In-depth explanation

The in-depth explanation can only be found in the official ISO standards:

  • ISO 15926-7 - Implementation methods for the integration of distributed systems: Template methodology
  • ISO 15926-8 - Implementation methods for the integration of distributed systems: Web Ontology Language (OWL) implementation