Great. Now, having helped you, how about helping us. Feel like writing
up an HOW-TO document for this problem/resolution ?
Werner
Pady Srinivasan wrote:
Hi Werner,
That worked perfect. Thx --pady
------------------------------------------------------------------------
> Date: Thu, 27 Mar 2008 10:34:06 +0100
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: [castor-user] [xml]whitespace issue...
>
> Hi Pady,
>
> to add an attribute similar to xml:space="preserve" to e.g. an element
> during marshalling, please have a look at the following <xml-bind>
> definition:
>
> <field name="name" type="string">
> <bind-xml name="name">
> <property>
> <name>xml:space</name>
> <value>preserve</value>
> </property>
> </bind-xml>
> </field>
>
> As you can see, you have to use <property>s to define the 'xml:space'
> attribute.
>
> I hope this helps.
>
> Werner
>
>
>
> Pady Srinivasan wrote:
> >
> > Hi Werner,
> >
> > I went through the mapping doc and am not sure how I would go about
> > doing this. Any links or help appreciated.
> >
> > Thx
> >
> > -- pady
> >
> >
> >
> >
------------------------------------------------------------------------
> > > Date: Wed, 26 Mar 2008 13:20:36 +0100
> > > From: [EMAIL PROTECTED]
> > > To: [email protected]
> > > Subject: Re: [castor-user] [xml]whitespace issue...
> > >
> > > Pady,
> > >
> > > using introspection mode (which is what you are relying on) will not
> > > take you anywhere. In my view, you've got two options here.
> > >
> > > a) start using a mapping file.
> > > b) Start from an XML schema (that models the space preservation), and
> > > generate sources from this.
> > >
> > > Regards
> > > Werner
> > >
> > > Pady Srinivasan wrote:
> > > >
> > > > Using castor 1.0. I have a string as follows:
> > > >
> > > > insert into table values ( 'test' , 'test1' )
> > > >
> > > > When I marshall such a string it gets saved without the spaces
between
> > > > the single quotes as
> > > >
> > > > <str>insert into table values ( 'test','test1')</str>
> > > >
> > > > I have issues displaying this on a web page when the string gets
> > really
> > > > long because there are no white space. I read/saw the Marshaller
> > > > code and see that the <xml:space preserve="true"/> should be set.
> > How I
> > > > do I go about setting this ? There is no way to get a reference
> > > > to the XmlDescriptorImpl that Marshaller uses which is where the
> > > > XML_SPACE_ATTR property can be set. I am not using any mapping
file.
> > > > Direct Marshaller.marshal on a serializable object.
> > > >
> > > > Any help appreciated.
> > > >
> > > > Thx
> > > >
> > > > -- pady
> > > >
> > > >
> >
------------------------------------------------------------------------
> > > > How well do you know your celebrity gossip? Talk celebrity
smackdowns
> > > > here. <http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list, please visit:
> > >
> > > http://xircles.codehaus.org/manage_email
> > >
> > >
> >
> >
------------------------------------------------------------------------
> > How well do you know your celebrity gossip? Talk celebrity smackdowns
> > here. <http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
------------------------------------------------------------------------
Watch “Cause Effect,” a show about real people making a real difference.
Learn more. <http://im.live.com/Messenger/IM/MTV/?source=text_watchcause>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email