axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <>
Subject Re: [Axis2] Namespace serialization problem
Date Thu, 16 Dec 2004 03:48:23 GMT
Srinath Perera wrote:

>>final static O,Namespace NS = fac.createOMNamespace("http://localhost/my","my");
>>  // ...
>>  OmElement method =  builder.createOMElement(NS, "echoOMElement",) ;
>>  OMElement value =  method.addElement(NS, "myValue") ;
>>  value.replaceChildrenWithText("Isaac Assimov, the foundation Sega");
>We handle the namespaces by keeping declared name spaces at each
>Element (to me this is a another *better* representation of the
>namespace Stack). If we use the approach suggested by above code when
>              method.addElement(NS, "myValue") ;
>is called the the code should search through the namespace lists in
>the hierarchy (parents) to decide does the namespace should be added
>to this elemnt namespace list.
i think it does not need to be added by default.

user calls declareNamespace on element to add namespace declarations.

if builder/serializer is nice ti will declare namespaces when they are 
first used or if it is strict it will throw exception to indicate that 
namespace is missing declaration. why to make "auto-magic" solution of 
namespace auto-declaration?

>One way out is to  put createNS(..) to the element
>1)  name space is always associated with a element it declared, it
>make sense to put create Namespace() to the  element
it should be possible to share namespaces class instance between 
multiple classes.

>2) that free us from the cleanup the Names later (searching through
>the hierarchy)
what do you mean by clean up - why would i want to do it?

>3) we can one entry point to make NS
i think about OmNamespace like String: it is value object easy to create 
but it is nice if builder/factory controls creation of namespaces so 
interning (like String.intern()) can be done automatically (and very 
efficient - similarly how strings can be shared).



The best way to predict the future is to invent it - Alan Kay

View raw message