Difference between revisions of "ConfigurationFileFormat"

(Final format)
Line 1: Line 1:
 
[[Category:Configuration]]
 
[[Category:Configuration]]
 
{{cleanup}}
 
{{cleanup}}
== Examples ==
 
The situation is this, that we have A configuration file for base, vision and an application that uses both base and vision.
 
 
 
=== XML (will be used)===
 
==== base ====
 
<code>[xml,n]
 
<system name="base" uuid="15ac36b5-2c65-41e9-8309-c504dd430a0b" library_target="base">
 
<target name="base">
 
<version major="2" minor="0" release="0" build="1"/>
 
<cluster name="base" location="files/base"/>
 
</target/
 
</system>
 
</code>
 
 
==== vision ====
 
<code>[xml,n]
 
<system name="vision" uuid="9a8d3871-ef44-484c-9029-c52d17df40f0" library_target="vision">
 
<version major="3" minor="2" release="1" build="2"/>
 
 
<target name="vision">
 
<library name="base" location="$ISE_EIFFEL/libraries/base/base.ace"/>
 
 
<cluster name="vision" location="files/vision">
 
<cluster name="mysub" location="$/sub" recursive="true">
 
</cluster>
 
 
<cluster name="mswin" location="files/vision/win">
 
<if platform="windows"/>
 
</cluster>
 
 
<cluster name="unix" location="files/vision/gtk">
 
<ifnot platform="windows"/>
 
</cluster>
 
 
<external_include location="files/vision/include/test.h">
 
<if platform="windows" build="workbench"/>
 
</external_include>
 
<external_include location="files/vision/include/gtk.h">
 
<if platform="unix"/>
 
<if platform="mac"/>
 
<if platform="vxworks"/>
 
</external_include>
 
 
<target name="debug" extends="vision">
 
<cluster name="debug" location="files/vision/debug" recursive="true">
 
<uses>base</uses>
 
<uses>vision</uses>
 
</cluster>
 
</target>
 
</system>
 
</code>
 
 
==== application ====
 
<code>[xml,n]
 
<system name="application" uuid="9a8aab21-ef44-484c-9029-c52d17df40f0">
 
<version major="1" minor="1" release="1" build="1"/>
 
 
<target name="application">
 
<root cluster="application" class="root_class" feature="make"/>
 
 
<library name="base" location="$ISE_EIFFEL/libraries/base/base.ace"/>
 
 
<library name="vision" location="$ISE_EIFFEL/libraries/vision/vision.ace"/>
 
 
<cluster name="application" location="files/app/" recursive="true"/>
 
</target>
 
</system>
 
</code>
 
 
=== ACE ===
 
==== base ====
 
<pre>
 
system
 
"base"
 
 
version
 
"2.0.0.1"
 
 
uuid
 
"15ac36b5-2c65-41e9-8309-c504dd430a0b"
 
 
library_target
 
base
 
 
target base
 
cluster base: "files/base"
 
</pre>
 
==== vision ====
 
<pre>
 
system
 
"vision"
 
 
version
 
"3.2.1.2"
 
 
uuid
 
"9a8d3871-ef44-484c-9029-c52d17df40f0"
 
 
library_target
 
vision
 
 
target vision
 
 
library
 
base: "$ISE_EIFFEL/libraries/base/base.ace"
 
 
cluster
 
vision: "files/vision"
 
 
all mysub(vision): "$/sub"
 
 
mswin: "files/vision/win"
 
require(windows)
 
 
unix: "files/vision/gtk"
 
require(not_windows)
 
 
external
 
 
include_path
 
"files/vision/include/test.h"
 
require(windows,workbench)
 
"files/vision/include/gtk.h"
 
require(unix)
 
require(mac)
 
require(vxworks)
 
 
target debug(vision)
 
 
cluster
 
all debug: "location files/vision/debug"
 
uses base, vision
 
</pre>
 
==== application ====
 
<pre>
 
system
 
"application"
 
 
version
 
"1.1.1.1"
 
 
uuid
 
"9a8aab21-ef44-484c-9029-c52d17df40f0"
 
 
target
 
application
 
 
root
 
ROOT_CLASS(application):make
 
 
library
 
base: "$ISE_EIFFEL/libraries/base/base.ace"
 
 
vision: "$ISE_EIFFEL/libraries/vision/vision.ace"
 
 
cluster
 
 
application: "location files/app/"
 
recursive
 
</pre>
 
 
 
=== Pseudo ===
 
==== base ====
 
<pre>
 
system base
 
version 2.0.0.1
 
uuid 15ac36b5-2c65-41e9-8309-c504dd430a0b
 
library_target base
 
 
target base
 
cluster base
 
location files/base
 
</pre>
 
==== vision ====
 
<pre>
 
system vision
 
version 3.2.1.2
 
uuid 9a8d3871-ef44-484c-9029-c52d17df40f0
 
library_target vision
 
 
target vision
 
library base
 
location "$ISE_EIFFEL/libraries/base/base.ace"
 
 
cluster vision
 
location "files/vision"
 
 
cluster mysub extends vision
 
location "$/sub"
 
recursive
 
 
cluster mswin [windows]
 
location "files/vision/win"
 
 
cluster unix [not_windows]
 
location "files/vision/gtk"
 
 
external_include
 
"files/vision/include/test.h" ([windows, workbench])
 
"files/vision/include/gtk.h" ([unix],[mac], [vxworks])
 
 
target debug extends vision
 
cluster debug
 
location "files/vision/debug"
 
recursive
 
uses base, vision
 
</pre>
 
==== application ====
 
<pre>
 
system application
 
version 1.1.1.1
 
uuid 9a8aab21-ef44-484c-9029-c52d17df40f0
 
 
target application
 
root application:ROOT_CLASS:make
 
 
library base
 
location "$ISE_EIFFEL/libraries/base/base.ace"
 
 
library vision
 
location "$ISE_EIFFEL/libraries/vision/vision.ace"
 
 
cluster application
 
location "files/app/"
 
recursive
 
</pre>
 
 
== Final format ==
 
This is the output produced if the configuration is saved.
 
 
=== Examples ===
 
 
==== Complex example ====
 
<code>[xml,n]
 
<?xml version="1.0" encoding="ISO-8859-1"?>
 
<system
 
        xmlns="http://www.eiffel.com/xml/configuration-1-0-0"
 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
        xsi:schemaLocation="http://www.eiffel.com/xml/configuration-1-0-0 http://www.ise/~patrickr/Public/configuration-1-0-0.xsd"
 
        name="mysystem" uuid="f3683164-f273-4ef4-8b33-bea4702a1421" library_target="mytarget">
 
        <description>This is a simple test system.</description>
 
        <target name="mytarget" eifgen="some/relative/path/">
 
                <description>This is a first target</description>
 
                <root cluster="mycluster" class="root_class" feature="make"/>
 
                <version major="4" minor="3" release="3" build="1" company="Eiffel Software Inc." product="TestProduct" trademark="Trademarks (tm)" copyright="Copyrights (c)"/>
 
                <file_rule>
 
                        <description>This are some simple file rules that exclude and include some patterns.</description>
 
                        <exclude>\.svn</exclude>
 
                        <exclude>cvs</exclude>
 
                        <include>test</include>
 
                        <include>[abc]test</include>
 
                </file_rule>
 
                <option profile="true">
 
                        <debug name="internal" enabled="false"/>
 
                        <debug name="timescan" enabled="true"/>
 
                        <warning name="obsolete" enabled="true"/>
 
                </option>
 
                <external_include location="/files/test.h">
 
                        <description>some external</description>
 
                        <if platform="windows" build="workbench"/>
 
                        <if platform="windows" build="all"/>
 
                        <ifnot platform="unix" build="all"/>
 
                </external_include>
 
                <pre_compile_action command="/usr/bin/build_parser.sh">
 
                        <description>Build the parser.</description>
 
                </pre_compile_action>
 
                <post_compile_action command="test">
 
                        <description>Test something</description>
 
                        <ifnot platform="all" build="finalize"/>
 
                </post_compile_action>
 
                <variable name="myvariable" value="some/value"/>
 
                <variable name="myother" value="another value"/>
 
                <library name="base" location="libs/base/base.xml" readonly="true" prefix="lib_">
 
                        <description>This is the normal base library.</description>
 
                        <option>
 
                                <assertions precondition="false" postcondition="false" check="false" invariant="false" loop="true"/>
 
                        </option>
 
                        <renaming old_name="oldname" new_name="newname"/>
 
                        <class_option class="myclass" trace="true" profile="true" namespace="somenamespace">
 
                                <description>Some class options for myclass</description>
 
                        </class_option>
 
                </library>
 
                <library name="vision" location="libs/vision/vision.xml"/>
 
                <assembly name="someassembly" location="some/path" assembly_name="a_name" assembly_version="a_version" assembly_culture="a_cult" assembly_key="a_key"/>
 
                <cluster name="a_cluster" location="some/path" recursive="true">
 
                        <file_rule>
 
                                <description>This are some simple file rules that exclude and include some patterns.</description>
 
                                <exclude>\.svn</exclude>
 
                                <exclude>cvs</exclude>
 
                                <include>test</include>
 
                                <include>[abc]test</include>
 
                        </file_rule>
 
                        <uses group="vision"/>
 
                        <visible class="all_class"/>
 
                        <visible class="feature_class" feature="a_feature"/>
 
                        <visible class="feature_class" feature="another_feat"/>
 
                        <cluster name="subcluster" location="$/path"/>
 
                </cluster>
 
                <override name="an_override" location="some/path">
 
                        <override group="a_cluster"/>
 
                </override>
 
        </target>
 
        <target name="debug" extends="mytarget">
 
                <description>A debug target.</description>
 
        </target>
 
</system>
 
</code>
 
 
==== Simple example ====
 
<code>[xml,n]
 
<?xml version="1.0" encoding="ISO-8859-1"?>
 
<system
 
        xmlns="http://www.eiffel.com/xml/configuration-1-0-0"
 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
        xsi:schemaLocation="http://www.eiffel.com/xml/configuration-1-0-0 http://www.ise/~patrickr/Public/configuration-1-0-0.xsd"
 
        name="mysystem" uuid="6eb88eca-6d9b-4ff8-aaa2-e8d9aa65e064">
 
        <target name="mytarget" eifgen="some/relative/path/">
 
                <root cluster="mycluster" class="root_class" feature="make"/>
 
                <version major="4" minor="3" release="3" build="1"/>
 
                <option profile="true">
 
                        <debug name="internal" enabled="false"/>
 
                        <debug name="timescan" enabled="true"/>
 
                        <warning name="obsolete" enabled="true"/>
 
                </option>
 
                <external_include location="/files/test.h">
 
                        <description>some external</description>
 
                        <if platform="windows" build="workbench"/>
 
                        <if platform="windows" build="all"/>
 
                        <ifnot platform="unix" build="all"/>
 
                </external_include>
 
                <library name="base" location="libs/base/base.xml" readonly="true"/>
 
                <cluster name="a_cluster" location="some/path" recursive="true">
 
                        <uses group="base"/>
 
                </cluster>
 
        </target>
 
</system>
 
</code>
 
 
==== Default example ====
 
An example that is similar to the default ace file.
 
<code>[xml,n]
 
<?xml version="1.0" encoding="ISO-8859-1"?>
 
<system
 
        xmlns="http://www.eiffel.com/xml/configuration-1-0-0"
 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
        xsi:schemaLocation="http://www.eiffel.com/xml/configuration-1-0-0 http://www.ise/~patrickr/Public/configuration-1-0-0.xsd"
 
        name="mysystem" uuid="b0fda5d2-09a9-46ac-84b4-3ed98055b82e">
 
        <target name="mytarget" eifgen="some/relative/path/">
 
                <root cluster="mycluster" class="root_class" feature="make"/>
 
                <version major="1" minor="0" release="0" build="0"/>
 
                <option profile="true">
 
                        <debug name="internal" enabled="false"/>
 
                        <debug name="timescan" enabled="true"/>
 
                </option>
 
                <library name="base" location="libs/base/base.xml" readonly="true"/>
 
                <cluster name="a_cluster" location="some/path" recursive="true">
 
                        <uses group="base"/>
 
                </cluster>
 
        </target>
 
</system>
 
</code>
 
 
 
=== xml Schema ===
 
=== xml Schema ===
  
 
The xml schema against which a configuration file has to validate can be found here:  
 
The xml schema against which a configuration file has to validate can be found here:  
 
http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd
 
http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd

Revision as of 09:25, 30 October 2006

This information is not up to date and needs some cleanup.


xml Schema

The xml schema against which a configuration file has to validate can be found here: http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd