axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eran Chinthaka" <chintha...@gmail.com>
Subject Re: [Axis2] Proposal for adding a method in OMElement API.
Date Wed, 25 May 2005 08:27:57 GMT
Hi Venkat and all,

>Okay - the usecase we have is the following method in SAAJ API on
>javax.xml.soap.SOAPElement:

>boolean removeNamespaceDeclaration(java.lang.String prefix)

>We can't implement this without the undelying OM design catering to such 
>needs.

>So here goes my +1 for implmenting this method on OMElement.

>Regarding the uniqueness of prefix, i dont think it is an issue,
>because every element has its own hashmap object for namespaces, and
>for one prefix, there can be only one namespace in the scope, so
>removal such namespace will not affect other elements or other
>namespaces, i guess.

Every element has a namespace map. But if a child is using a namespace 
declared in the parent, that child is pointing to the parent for that. So if 
we remove the namespace from the parent, we have some trouble.

I agree that u need a method like this for SAAJ impl. But how can we 
compromise ?

>When in doubt, lets vote :-)

Is it a joke ? ;) ;).

Regards,
- Chinthaka

>- Venkat



On 5/25/05, Ajith Ranabahu <ajith.ranabahu@gmail.com> wrote:
> Hi all,
> Well since our OMElementImpl keeps its own list of namespaces adding /
> declaring a namespace would affect that Element only. if the reference is
> removed from the parent I don't see a problem with the children since they
> keep their own reference to the particular namespace. We ask for a 
> mandatory
> namespace at creation, rememebr ?
> The only thing that will not be elegant is the serialization.(I don't see 
> a
> problem though. The serializer handles it right and generates a 
> sematically
> valid XML. That generated XML is not elegant)
> So even though a non-used namspace does no harm (except serializing it on
> the declared element making the XML ugly)  we can techinically remove it
> without a problem.
>
> On 5/25/05, Eran Chinthaka <chinthakae@gmail.com> wrote:
> > Hi Jaya and all,
> >
> > I still find difficult to give you a method to remove namespaces.
> >
> > Namespaces, once defined in an element, that will be used by all of its
> > children. So if we try to remove a namespace, that will be a total mess.
> > Isn't it ?
> >
> > So I'm in doubt to give *any* of the methods to remove namespaces .....
> >
> > Regards,
> > Chinthaka
> >
> >
>
>
>
> -- 
> Ajith Ranabahu 


Mime
View raw message