Inheritance


When a single configuration file contains multiple profiles it may be noticed that the same query or format parameters are often repeated for each profile. As a convenience, these common parameters may be migrated out of the individual profiles and into the containing group or dbsubstconfig.

The example below:

<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="http://www.temblast.com/xsl/dbfile.xsl"?> <dbsubstconfig> <group name="Indexes"> <profile name="Alphabetic"> <query> <dsn>Customers</dsn> ... </query> <format> <language>german</language> ... </format> <level name="0"> ... </level> ... </profile> <profile name="Numeric"> <query> <dsn>Customers</dsn> ... </query> <format> <language>german</language> ... </format> <level name="0"> ... </level> ... </profile> </group> </dbsubstconfig>

This may be improved to:

<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="http://www.temblast.com/xsl/dbfile.xsl"?> <dbsubstconfig> <group name="Indexes"> <query> <dsn>Customers</dsn> </query> <format> <language>german</language> </format> <profile name="Alphabetic"> <query> ... </query> <format> ... </format> <level name="0"> ... </level> ... </profile> <profile name="Numeric"> <query> ... </query> <format> ... </format> <level name="0"> ... </level> ... </profile> </group> </dbsubstconfig>