xmlns:tsd and xmlns:xsi

I have a problem.
When i retrieve an element stored in tamnino i get (for example the element instance) i get
<instance xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance"<BR>xmlns:ino="http://namespaces.softwareag.com/tamino/response2
ino:id=“1” myattribute=“3”>

My intention is, now, remove the attributes i don`t need except my attribute, so in my jdom model i do>

instance.removeAttribute(“id” , INO_NAMESPACE);
instance.removeAttribute(“xmlns:tsd”);
instance.removeAttribute(“xmlns:xsi”);

where Namespace INO_NAMESPACE = Namespace.getNamespace(“ino”,“http://namespaces.softwareag.com/tamino/response2”);

but the result is the following

<instance xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"<BR>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance” myattribute=“3”>


it is clear that it does not remove xmlns:xsi and xmlns:tsd, why? How can remove them?

Many thankS

@nto

ino:id is an attribute (id) in the namespace (ino) but the other two:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and
xmlns:ino="http://namespaces.softwareag.com/tamino/response2" 
</pre>are not just attributes - they are namespace declarations. <BR><BR>I stand to be corrected on this, but I believe that in the version of JDOM distributed with TaminoAPI4J there is nothing you can do about them. In later versions of JDOM (Betas 7 and 8) there is a method:<BR><pre class="ip-ubbcode-code-pre">
element.removeNamespaceDeclaration(Namespace)

which will do the job for you (when the API supports it).

HTH

[This message was edited by Bill Leeney on 06 Dec 2002 at 15:55.]