Keith,

Thanks for the clarification about the internal details. I agree with
Michael though, in that regardless of my confusion about the actual details
of the marshalling, it still stands that for some strings, there is no way
to get the same characters out of Castor that were put into it. It would
seem reasonable that Castor should support some way of doing this.

Michael,

Because I will not be able to control the HTML that users enter (and
eventually ends up in XML), I will probably have to scan all input html for
>, <, and & and replace them with their corresponding numeric
entities &#xxx;. Unless castor translates numeric entities as well, it
should work. Maybe this will work for you too.

Matt


-----Original Message-----
From: Michel Smits [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 1:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Please Help! Need CDATA


Hi Keith,

I understand your comments. Still, the issue remains.
If I start with the following string:
  '<B>This is a greater than sign &gt;</B>'
I'd like to be able to put this in xml and later retrieve it EXACTLY as I
stored it.

As you explain:
> In Castor that field is unmarshalled into memory precisely as:
  '<B>This is a greater than sign ></B>'

Then I don't see a difference between the "original" distinction between '>'
and '&gt;'.

> Did you know that CDATA means "Character Data". It is not a
> simple escape mechanism in XML as many people think it is. It simply
> says anything inside the CDATA should be treated as characters and *NOT*
> markup (elements).
Again, I would expect that this means the original '>' and '&gt;' are NOT
identical.

> It's not a problem. If Castor didn't marshal your string as this:
> &lt;B&gt;This is a greater than sign &gt;&lt;/B&gt
> It would have to marshal it as:
> <![CDATA[<B>This is a greater than sign ></B>]]>
This exactly the behavior I would expect, it is what DOM's CDATASection
accomplishes.

Sorry if I keep nagging about this issue, but I really hope there's going to
be support for CDATA in Castor, 'cause Castor's binding works very well for
me.

Thanks for your comments,
 Michel

----------------------------------------------------------- 
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