Currently Castor doesn't have a disable-all-namespaces feature. There is
a proposed patch in Bugzilla, but it hasn't been committed to the CVS.

Castor only uses namespaces when you have specified Castor to use them.
So if you have specified namespaces in your XML Schema and then
generated source code, Castor will use them. If you don't want the
namespaces...just regenerate the source code with a modified schema that
removes the targetNamespace.

--Keith



[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I want to remove the ns prefix that Castor dynamically generates in the
> XML(ns1, ns2, etc).
> 
> According to the following posting:
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg12726.html
> 
> a feature is being worked on to allow this. Do you know when this will be
> available?
> 
> At the moment I have been trying to use the setNamespaceMapping() method to
> remove the prefix, eg
> 
> marshaller.setNamespaceMapping("", "http://myschema1"/;);
> 
> This works; however it won't work if I try to use this technique for more
> than one namespace, eg
> 
> marshaller.setNamespaceMapping("", "http://myschema1"/;);
> marshaller.setNamespaceMapping("", "http://myschema2"/;);
> 
> It appears that the second call overrides the first one, so I can't switch
> off all namespace prefixing.
> 
> Is there a way I can remove the ns prefix from all elements or do I have to
> wait for the new feature?
> 
> Thanks,
> Adam.
> 
> For more information on Standard Life, visit our website
> http://www.standardlife.com/
> 
> The Standard Life Assurance Company, Standard Life House, 30 Lothian Road,
> Edinburgh EH1 2DH, is registered in Scotland (No. SZ4) and regulated by the
> Financial Services Authority. Tel: 0131 225 2552 - calls may be recorded or
> monitored. This confidential e-mail is for the addressee only. If received
> in error, do not retain/copy/disclose it without our consent and please
> return it to us. We virus scan and monitor all e-mails but are not
> responsible for any damage caused by a virus or alteration by a third party
> after it is sent.
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to