If you want namespaces to be used in your XML document (as produced by the 
Marshaller), including namespace declarations (at e.g. the top level element), 
then you must not turn off (i.e. suppress) namespaces.

I have not yet looked at the XML schema as provided by you, but when generating 
Java classes from the XML schema, Castor will create 

a) domain classes
b) descriptor classes that hold information about the mapping between the Java 
classes (domain objects) and the XML artefacts as defined in the XML schema.

In other words, as long as the descriptor classes are available on the 
classpath, you should get e.g. namespaces in your XML document instances as 
defined in your XML schema.

Werner

> -----Ursprüngliche Nachricht-----
> Von: Uday Kari [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 23. März 2007 02:52
> An: [email protected]
> Betreff: [castor-user] Supress Namespaces
> 
> Praveen:  Thanks for the prompt response!  Indeed...it works.
> 
> To clarify, you mean call Marshaller.setSuppressNamespaces(TRUE), not
> false, while marshalling. The only catch is that I wanted namespaces to
> show up in the top-most level element "gauges" but not in any of its
> child elements.  By suppressing namespace, it takes it out for even the
> top most elements...o well, it is a case of cosmetics anyway.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to