avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Is everyone happy with Namespace?
Date Fri, 09 Nov 2001 22:23:15 GMT
Peter Donald wrote:
> 
> On Sat, 10 Nov 2001 01:23, Sylvain Wallez wrote:
> > Berin Loritsch a �rit :
> > > I want to clarify if everyone is happy with the Namespace
> > > class.  We need to take care of it NOW before it is too
> > > late!
> >
> > Namespace info and Configuration names are OK for me, but a few
> > questions about the prefix validation in Namespace.equals() :
> 
> what is validation meant to do ? Neither the policy or m_validate_prefix seem
> to be used.

Hmm.

Ok the policy is supposed to be a flag to use the prefix during
comparisons of Namespace objects or not.

I.e.

pre1:element
pre2:element

Where pre1 and pre2 are set to "test-uri/namespace"

With m_validate_prefix set to true, the two namespaces would be
considered different.  So .equals() would return false.

With m_validate_prefix set to false, the two namespaces are
considered the same (the all important URI is the same).  So
.equals() would return true.

> > - is this good to have a static setting for this policy in a
> > multi-thread/multi-app environment ?
> 
> probably not.

How often do you create new Namespace objects?  Also, wouldn't you
want the same policy accross the board?

The Factory methods (.getNamespace(String)) can be extended to
simply have a boolean to set the policy for the object.

However you must keep in mind that multiple policies for comparing
Namespace objects has unpredictable results.  (actually it will
use the policy of the Namespace object on the left side of the
argument).


-- 

"Those who would trade liberty for
 temporary security deserve neither"
                - 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