How to Split Configuration Files Using XML Include
Valid for version 10.4.0+.
It is possible to use separate files for defining components of .runtimeConfig
and .serverConfig
files.
Procedure
Create a separate file with the component definition.
Refer to this new file in your runtime/server configuration file:
Declare that you will use a reference to this additional file within the runtime/server configuration file. Add the following right after the XML declaration:
runtimeConfig or serverConfig<!DOCTYPE doctype [ <!ENTITY entity_name_1 SYSTEM "path_to_file_1"> <!ENTITY entity_name_2 SYSTEM "path_to_file_2"> ]>
doctype
: useruntimeconfig
when editing.runtimeConfig
andserver
when editing.serverConfig
entity_name
: set a name for the referencepath_to_file
: an absolute path to the file with the component definition.
Replace the component definition in the configuration file with the reference to it, using the
entity_name
defined in the previous step:&entity1_name;
- Start the server.
Example
This example shows how to prepare a data source definition in a separate file instead of .runtimeConfig
.
Original runtime configuration file:
Procedure:
Create a separate file with the data source definition:
dataSources.xml<dataSources> <dataSource driverclass="org.apache.derby.jdbc.ClientDriver" name="wfl" user="wfl" password="crypted:DES:uj3hAwlJSWwwD1Jp62KwJRz8lUK36qMUto5HhuV6Izg=" url="jdbc:derby://localhost:1529/wfl;create=true"/> </datasSources>
Refer to the
dataSources.xml
in your runtime configuration file:Declare that you will use a reference to
dataSources.xml
within the runtime configuration file. The reference is namedataSource
..runtimeConfig<!DOCTYPE runtimeconfig [ <!ENTITY dataSource SYSTEM "C:\Ataccama\DQC\11.3.0\workspace\Workflow Tutorials\etc\dataSources.xml"> ]>
Replace the data source definition with the reference to it:
.runtimeConfig&dataSource
- Start the server.
New runtime configuration file:
Related Articles