avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Is everyone happy with Namespace?
Date Tue, 13 Nov 2001 10:23:27 GMT
On Tue, 13 Nov 2001 10:08, Jeff Turner wrote:
> On Mon, Nov 12, 2001 at 08:52:47AM -0500, Berin Loritsch wrote:
> > Jeff Turner wrote:
> > > On Fri, Nov 09, 2001 at 05:56:08PM -0600, Michael McKibben wrote:
> > > > I was under the impression after reading the w3 namespace spec that
> > > > the prefix is only used for selecting the namespace URI. The URI +
> > > > localpart is what determines equality, correct?
> > >
> > > I think so. In that case, m_validatePrefix ought to default to false,
> > > not true.
> > >
> > > Btw, I think DefaultConfiguration is missing two methods:
> > >
> > > public void setNamespace(Namespace ns);
> > > public void setAttribute(Namespace ns, String name, String value);
> > >
> > > Without these, one cannot add namespace-prefixed attributes.
> >
> > We decided that namespace prefixed attributes are not a good pattern for
> > configuration files.  The reason is that the namespaced attribute does
> > not belong to the configuration tree in question.
>
> Righto. Though I gather Peter wants to use Configurations to represent Ant2
> build trees, and might need nsprefixed attributes for "aspects":

Pete wants to use nsprefixed attributes in a lot of places ;) However I have 
ended up rewriting SAXHandler to provide this functionality.

It is really nice to split information between container and component. ie In 
quite a few of my apps there is information that is directly relevent to 
components and some that are directives to container to treat component in 
specific ways.

Whether this is a desirable feature or not is yet to be seen. EJB descriptors 
separate out this information into multiple files or multiple sections in 
Config data. Other cases like Ant will integrate it into representation.

If anything I think that namespaces on attributes is probably not a 
configuration concern but I haven't made up my mind fully yet ;)


>
>   <target name="namespace-test">
>
>     <!-- ant and doc are built in namespaces -->
>     <echo ant:fail-on-error="true" message="Some random message">
>       <doc:description>
>         Test case for aspects
>       </doc:description>
>       <ant:some-element some-attribute="blah"/>
>     </echo>
>
>     <!-- load facility for blee: namespace -->
>     <facility namespace="blee">
>       <noop/>
>     </facility>
>
>     <echo blee:some-param="blah" message="Blee namespace test
> successful!"/>
>
>   </target>
>
> (Taken from jakarta-ant/proposal/myrmidon/src/make/sample.ant)
>
> But I don't follow ant-dev closely, and I've likely misunderstood
> something.

Naah that sounds right ;)

-- 
Cheers,

Pete

---------------------------------------------------
"If you don't know where you want to go, we'll make 
sure you get taken." 
Microsoft ad slogan, translated into Japanese.
---------------------------------------------------

--
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