avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [PATCH] Re: Cascading Configuration
Date Thu, 14 Feb 2002 13:50:52 GMT
Peter Donald wrote:
> Hi,
> 
> Im still not sure I am comfortable with doing the mergin this way rather than 
> through utlity methods. The main reason is there are different strategies to 
> use when merging consider the following
> 
> Source: <a/>
> Default: <a><b/></a>
> 
> The result will most likely be equal to the "Default" tree. But what happens 
> in the following cases
> 
> Source: <a><b/></a>
> Default: <a><b/></a>
> 
> Do we double the B or replace it?
> 
> Source: <a><b x="1"/></a>
> Default: <a><b/></a>
> 
> Do we double the B or replace it? 
> 
> Source: <a><b x="1"/></a>
> Default: <a><b y="2"/></a>
> 
> Do we double the B or replace it or merge it?
> 
> Source: <a><b x="1"/></a>
> Default: <a><b x="2" y="2"/></a>
> 
> Do we double the B or replace it or merge it?

In all of those situations, I believe the desire was for the Source to override
the default.  So in each of your examples (numbered 1-5) the results are listed:

1.  <a><b/></a>
2.  <a><b/></a>
3.  <a><b x="1"/></a>
4.  <a><b x="1" y="2"/></a>
5.  <a><b x="1" y="2"/></a>

So the Default provides base values, and the Source will override those values
when provided.




-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message