Adam Marsh · Aug 5, 2020

Converting XLT (XML) into DTL (XML)

Greeting IRIS Community,

I need some help converting XLT (XML) into DTL (XML) pragmatically using COS or any other available options in IRIS for health.
It is for HL7-TO-nonHL7 translation. 

See the following xlt content as an example that i have in XML Format.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../server/stylesheet/xltconfig.xsl"?>
<xltconfig name="accenture-1.xlt" site="thac">
<description>HL7 2.2/2.2 ADT_A16</description>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<in>=&apos; 0(0).MSH(0).#10(0).[0] =&apos;</in>
<err handling="0" description="Skip"/>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<in>=&apos; 0(0).MSH(0).#9(0).[0] =_ 0(0).EVN(0).#1(0).[0] =&apos;</in>
<err handling="0" description="Skip"/>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<in>0(0).MSH(0).#4(0).[0] 0(0).PV1(0).#2(0).[0]</in>
<err handling="0" description="Skip"/>

Expected Results in DTL 

Expected conversion should be like this in DTL (XML) format.

DTL <?xml version="1.0" encoding="UTF-8"?> <Export ts="2020-01-09 01:01:00" zv="IRIS for Windows (x86-64) 2020.1 (Build 217_1U)" version="26" generator="IRIS">
<Class name="Mypackage.Myclass"> <Super>Ens.DataTransformDTL</Super> <TimeChanged>62323,43489.390656</TimeChanged> <TimeCreated>62323,42706.863977</TimeCreated> <DependsOn>EnsLib.HL7.Message,MyRecordMap.test</DependsOn>
<Parameter name="IGNOREMISSINGSOURCE"> <Default>1</Default> </Parameter>
<Parameter name="REPORTERRORS"> <Default>1</Default> </Parameter>
<Default>0</Default> </Parameter>
<XData name="DTL"> <XMLNamespace></XMLNamespace>
<Data> <![CDATA[
<transform sourceClass='EnsLib.HL7.Message' targetClass='MyRecordMap.test' sourceDocType='2.2:ADT_A16' create='new' language='objectscript' >
<assign value='source.{MSH:MessageControlID}' property='target.PROPERTY1' action='set' />
<assign value='source.{MSH:RecevingFaciltyID}' property='target.PROPERTY2' action='set' />
<assign value='source.{MSH:SendingFacilityID}' property='target.PROPERTY3' action='set' />
The above content is just an example.
All the <action> tag from VRL XML should be converted to <assign> tag in DTL XML.

any help in this matter would be really appreciated.

Thanks in Advance!!

3 0 4 219
Log in or sign up to continue


Since both formats are XML-based, you could write an XSLT to do the conversion. To further automate the process you could create COS that calls the XSLT, creates a new DTL file and inserts the rules into the XData block, and compile the new DTL.

Hi Marc,

your suggestion is very much appreciated.

Do you have any working example that you can share with me
share a code snippet for converting XLT XML to XSLT.
Share COS code snippet at very high level just an example.


Hi @Marc Mundt ,

Do you have any example to convert XML into XSLT and then use it in COS?