#### Named model configurations

There are a couple of reasons for adding `model` attribute to the configuration identity. One of them is to define the scope for values of attribute `name`. In this sense, a `model` could be thought of as a namespace. E.g.

.fp1: feature-pack.xml
[source,xml]
----
<feature-pack xmlns="urn:jboss:galleon:feature-pack:2.0"
              location="fp1@maven(org.jboss.universe:community-universe):1#1.0.0.Final">
  <config name="main" model="modelA"/>
  <config name="main" model="modelB"/>
</feature-pack>
----

.fp1: configs/modelA/main/config.xml
[source,xml]
----
<config xmlns="urn:jboss:galleon:config:1.0" name="main" model="modelA">
  <feature spec="feature1">
    <param name="id" value="1"/>
    <param name="a" value="fp1-modelA"/>
     <param name="b" value="fp1-modelA"/>
  </feature>
</config>
----

.fp1: configs/modelB/main/config.xml
[source,xml]
----
<config xmlns="urn:jboss:galleon:config:1.0" name="main" model="modelB">
  <feature spec="feature1">
    <param name="id" value="1"/>
    <param name="a" value="fp1-modelB"/>
    <param name="b" value="fp1-modelB"/>
  </feature>
</config>
----

.fp2: feature-pack.xml
[source,xml]
----
<feature-pack xmlns="urn:jboss:galleon:feature-pack:2.0"
              location="fp2@maven(org.jboss.universe:community-universe):1#1.0.0.Final">
  <dependencies>
    <dependency location="fp1@maven(org.jboss.universe:community-universe):1#1.0.0.Final"/>
  </dependencies>
  <config name="main" model="modelA"/>
  <config name="main" model="modelB"/>
</feature-pack>
----

.fp2: configs/modelA/main/config.xml
[source,xml]
----
<config xmlns="urn:jboss:galleon:config:1.0" name="main" model="modelA">
  <feature spec="feature1">
    <param name="id" value="1"/>
    <param name="b" value="fp2-modelA"/>
  </feature>
</config>
----

.fp2: configs/modelB/main/config.xml
[source,xml]
----
<config xmlns="urn:jboss:galleon:config:1.0" name="main" model="modelB">
  <feature spec="feature1">
    <param name="id" value="1"/>
    <param name="b" value="fp2-modelB"/>
  </feature>
</config>
----

Installing these two feature-packs (`fp2` following `fp1`) will result in the following two configurations:

.modelA:main
[%header,options="autowidth"]
|===
|Feature spec origin |Feature spec |id |a |b
|fp1@maven(org.jboss.universe:community-universe):1#1.0.0.Final |feature1 |1 |fp1-modelA |fp2-modelA
|===

.modelB:main
[%header,options="autowidth"]
|===
|Feature spec origin |Feature spec |id |a |b
|fp1@maven(org.jboss.universe:community-universe):1#1.0.0.Final |feature1 |1 |fp1-modelB |fp2-modelB
|===

