Apama 10.15.3 | Connecting Apama Applications to External Components | Working with IAF Plug-ins | Using the IAF | The IAF configuration file | Including other files
 
Including other files
The adapter configuration file supports the XML XInclude extension so you can reference other files from the configuration file. This makes it possible, for example, to keep the transport properties in one file and the mapping properties in another. For more information on XML Inclusions, see https://www.w3.org/TR/xinclude/. The standard adapters packaged with the Apama installation use this scheme. For example, the Apama ODBC adapter specifies its transport properties in the adapters\config\ODBC.xml.dist file and its mapping properties in the adapters\config\ODBC-static.xml. For more information on the standard Apama adapters, see The File IAF Adapter (JMultiFileTransport).
In order to match the DTD, the xmlns:xi attribute must be placed either on the <adapter-config> element (as the name xmlns:xi) or on the <xi:include> element. Apama strongly recommends that you use only relative filenames instead of URLs to remote servers.
For example:
<adapter-config xmlns:xi="http://www.w3.org/2001/XInclude">
  <transports>
    <transport name="testmarket1" library="protocol-transport">
      <property name="host" value="localhost"/>
      <property name="port" value="12000"/>
    </transport>
  </transports>
  <xi:include href="market-static.xml"
              xpointer="xpointer(/static/codecs)"/>
  <xi:include href="market-static.xml"
              xpointer="xpointer(/static/mapping)"/>