mcconnell 2003/06/15 10:45:32
Modified: merlin/merlin-platform/tutorials/includes/src/config
block.xml composite.xml config.xml
include-config.xml
Log:
Enhance utility of configuration messages.
Revision Changes Path
1.2 +45 -7
avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/block.xml
Index: block.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/block.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- block.xml 10 Jun 2003 02:12:24 -0000 1.1
+++ block.xml 15 Jun 2003 17:45:32 -0000 1.2
@@ -15,16 +15,54 @@
</classpath>
</engine>
- <component name="test1" class="tutorial.TestComponent" activation="startup">
- <configuration>
- <source>configuration from block directive</source>
- </configuration>
- </component>
+ <component name="test1" class="tutorial.TestComponent" activation="startup"/>
+
+ <!--
+ Deomonstration of an include the establishes a subsidiary block named
"my-block"
+ based on the block defintion "include.xml". The directives in the included
+ block are qualified by the configuration targets embedded in the targets
+ element.
+ -->
+ <include name="my-block">
+ <source path="include.xml"/>
+ <targets>
+
+ <!--
+ A target itentifies a component relative to the containing block.
+ For example, the following target is referencing a component
+ named "test3" contained with the block "my-block". The target
+ contains a different configuration and an overriding logging
+ category default priority for the component.
+ -->
+
+ <target path="/test3">
+ <configuration>
+ <source>embedded target configuration</source>
+ </configuration>
+ <categories priority="DEBUG"/>
+ </target>
+ </targets>
+ </include>
<container name="subcontainer">
+
<component name="test2" class="tutorial.TestComponent" activation="startup"/>
- <include path="include.xml" config="include-config.xml"/>
- <include path="composite.xml"/>
+
+ <!--
+ The following include demonstrates the importing of a target override file
+ from an external source into a container. The imported block will be
establish
+ as a child of the containing block.
+ -->
+
+ <include name="include">
+ <source path="include.xml"/>
+ <targets path="include-config.xml"/>
+ </include>
+
+ <include name="composite">
+ <source path="composite.xml"/>
+ </include>
+
</container>
</implementation>
1.2 +15 -3
avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/composite.xml
Index: composite.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/composite.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- composite.xml 10 Jun 2003 02:12:24 -0000 1.1
+++ composite.xml 15 Jun 2003 17:45:32 -0000 1.2
@@ -6,10 +6,22 @@
</info>
<implementation>
- <include path="include.xml"/>
+
<container name="test">
- <include path="include.xml" config="include-config.xml"/>
+
+ <include name="nested">
+ <source path="include.xml"/>
+ <targets>
+ <target path="/test3">
+ <configuration>
+ <source>embedded target in a nested include</source>
+ </configuration>
+ </target>
+ </targets>
+ </include>
+
</container>
- </implementation>
+
+ </implementation>
</block>
1.2 +4 -8
avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/config.xml
Index: config.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/config.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config.xml 10 Jun 2003 02:12:24 -0000 1.1
+++ config.xml 15 Jun 2003 17:45:32 -0000 1.2
@@ -2,11 +2,13 @@
<targets>
<!-- classic target configuration override declarations -->
+
<target path="/test1">
<configuration>
<source>config.xml</source>
</configuration>
</target>
+
<target path="/subcontainer/test2">
<configuration>
<source>config.xml</source>
@@ -14,16 +16,10 @@
</target>
<!-- this target will override the config referenced in the include -->
- <target path="/subcontainer/composite/inclusion/test3">
- <configuration>
- <source>config.xml</source>
- </configuration>
- </target>
- <!-- this target sets the configuration on another include -->
- <target path="/subcontainer/inclusion/test3">
+ <target path="/subcontainer/include/test3">
<configuration>
- <source>config.xml</source>
+ <source>using config.xml file</source>
</configuration>
</target>
1.2 +1 -1
avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/include-config.xml
Index: include-config.xml
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/merlin-platform/tutorials/includes/src/config/include-config.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- include-config.xml 10 Jun 2003 02:12:24 -0000 1.1
+++ include-config.xml 15 Jun 2003 17:45:32 -0000 1.2
@@ -2,7 +2,7 @@
<targets>
<target path="/test3">
<configuration>
- <source>include-config.xml</source>
+ <source>the include-config.xml file</source>
</configuration>
</target>
</targets>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]