Did you checked it in 0.9.3.19 Castor version ?

this is my code :

      FileWriter fw = new FileWriter( this.documentFile );
      Marshaller marshaller = new Marshaller( fw );
      marshaller.setMapping( this.mapping );
      marshaller.setSchemaLocation( "http://www.metamodel.com/storage " +
this.schemaFile.getCanonicalPath() );
      marshaller.setNamespaceMapping( "",
"http://www.metamodel.com/storage"; );
      marshaller.marshal( set );
      fw.close();

marshal( ) is not static.

Romilson




----- Original Message -----
From: "Arnaud Blandin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 12:27 PM
Subject: Re: [castor-dev] NS prefix .. how to resolve this ??


> Hi,
>
> Keith meant obviously setNamespaceMapping() and all is fine for me I've
> just checked it.
> Please make sure you are not using the static methods of the Marshaller
> that could one the reasons why you can't have the expected output.
>
> Hope that helps,
>
> Arnaud
>
> > -----Original Message-----
> > From: Romilson C. Carvalho [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 20, 2002 1:09 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [castor-dev] NS prefix .. how to resolve this ??
> >
> > hi Keith,
> >
> > in Marshaller,
> >
> > the 'declareNamespace' method is private . I cannot access this.
> > Only the 'setNamespaceMapping' is public. But i has tried put
> >
> > m.setNamespaceMapping(null, "my-namespace-uri-here" );
> > m.setNamespaceMapping("", "my-namespace-uri-here" );
> >
> > And my final xml document will have
> > xmlns="my-namespace-uri-here"
> >
> > But yet Castor continues putting ns prefixes.
> >
> > is this a bug (maybe)?
> >
> > Thanks.
> >
> > Romilson
> >
> >
> > ----- Original Message -----
> > From: "Keith Visco" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 19, 2002 7:07 PM
> > Subject: Re: [castor-dev] NS prefix .. how to resolve this ??
> >
> >
> > >
> > > In the Marshaller, declare the default namespace to whatever your
> > > namespace is:
> > >
> > > Marshaller m = new Marshaller(writer);
> > > m.declareNamespace("", "your-namespace-uri-here");
> > >
> > > --Keith
> > >
> > >
> > > > "Romilson C. Carvalho" wrote:
> > > >
> > > > All tags in my final document xml ( marshalled ) have the ns
> prefix
> > > > as:
> > > >
> > > > <ns:storage-set>
> > > >    <ns:storage xmlns ns1 = "http://castor.exolab.org/";>
> > > >         <ns1:table-name>babababa</ns:table-name>
> > > >     </ns:storage>
> > > > </ns:storage-set>
> > > >
> > > >
> > > >
> > > > how to remove this prefix from my marshalled document ??
> > > >
> > > > I'm using Castor 0.9.3.19
> > > >
> > > > Thanks,
> > > >
> > > > Romilson
> > >
> > > -----------------------------------------------------------
> > > 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
>
> -----------------------------------------------------------
> 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