[jdom-interest] setNamespace question

Jochen Strunk strunk at signal7.de
Fri Mar 30 03:14:04 PST 2001


Please forget that. Sometimes it would be better to think before posting.

jochen

At 12:42 30.03.2001 +0200, you wrote:
>There is one thing about the namespace discussion I don' t understand.
>
>Compare the following two statements:
>
>element = element.getCopy(element.getName(), 
>Namespace.getNamespace("http://foo"));
>
>element.setNamespace("http://foo");
>
>The first example works by first making an exact copy of element in a 
>different namespace and handing over the original element to the garbage 
>collector. The result is a different element represented by a different 
>java object. The second statement would also yield a different element but 
>represented by the same java object.
>
>I haven't been following the discussion from the beginning but I think you 
>don't provide a setNamespace method mainly because you are saying 
>namespace is intrinsic to an element and does not change. That is why we 
>have to use getCopy for that purpose. Am I right with this assumption ?
>
>If that is correct, I don't understand why a different element can not be 
>represented by the same java object. Why is a different element required 
>to live on a different java object ?
>
>jochen
>
>
>
>
>(-) Jochen Strunk
>(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
>(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
>(-) Tel: 06151 665402, Fax: 06151 665373
>(-) strunk at signal7.de, www.signal7.de
>
>_______________________________________________
>To control your jdom-interest membership:
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com




(-) Jochen Strunk
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665402, Fax: 06151 665373
(-) strunk at signal7.de, www.signal7.de




More information about the jdom-interest mailing list