|
Hi!
I have a problem with namespaces :
I have an abstract class and mapping for it.
Instance of this type is a field of another class ex:
<mapping xmlns="ns1_string"
xmlns:xsi="ns2_string" xmlns:co="ns3_string"
xsi:schemaLocation="location_string">
<class A auto-complete="false">
<map-to xml="a"
ns-uri="ns1_string"/>
<field name="xxx" type="AbstractClass"
handler="handler">
...
</class>
<class name="AbstractClass"
auto-complete="false">
<map-to xml="xxx"
ns-uri="ns1_string"/>
...
</class>
handler creates for me an instance of
AbstractClass, let say it is InstanceClass. I had to write mapping for it coz
Castor didn't know about it ..
<class name="InstanceClass"
extends="AbstractClass" auto-complete="false">
<map-to
ns-uri="ns1_string"/>
</class>
Everything is ok, unmarshalling and marshalling but
Castor generates unwanted namespaces for instances of my abstract class (all
other is OK).
Marshaller :
marshaller.setMarshalExtendedType( false);marshaller.setNamespaceMapping( null, "ns1_string");marshaller.setNamespaceMapping( "co", "ns2_string");marshaller.setNamespaceMapping( "xsi", "ns3_string");marshaller.setSchemaLocation( "location_string");<a xsi:schemaLocation="location_string" xmlns="ns1_string" xmlns:co="ns2_string" xmlns:xsi="ns3_string"> <xxx xmlns:ns1="ns1_string"> ... </a> Why Castor added xmlns:ns1 with ns1_string namespace to my tag xxx or how can I make it removed ?? Thanks! Adrian |
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
