Thanks Ozgur,

I've noticed the translations when using xsd:string. This makes sense since
string data is parsed.
Do you know if the schema recommendation still allows for the use of
unparsed CDATA-like sections? Or do applications have to ensure data can
always be treated as xsl:string (i.e. translate special characters)? The w3
docs don't mention this...
I need to encapsulate an html page which can contain the same translated
characters (e.g. <) as valid text.

Any comments anybody?

Thanks,
 Michel

-----Oorspronkelijk bericht-----
Van: Ozgur Balsoy [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 27 juli 2001 21:29
Aan: [EMAIL PROTECTED]
Onderwerp: Re: [castor-dev] Please Help! Need CDATA


I had a similar problem with CDATA sections. It looks like there is no
support for CDATA in Castor (or I could not find any help).
Besides, xsd:CDATA is removed from the final XML Schema recommendation.

As a solution, you can make your element a 'xsd:string' and set white space
facet to 'preserve'. Two drawbacks:
- you cannot use indentation feature for marshalling.
- '<' '>' and other special characters are translated into &lt; &gt; etc.

Hope this helps.

Ozgur Balsoy

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Michel Smits
> Sent: Friday, July 27, 2001 8:56 AM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] Please Help! Need CDATA
>
>
> Hello there,
>
> I've already posted this question (slightly different) but I must make a
> decision whether or not to continue with Castor... (the
> alternatives do not
> look that great but..)
>
> When using Castor-J (0.9.3 and Xerces 1.4.2) xml binding, do the generated
> classes support CDATA text???
>
> The reason for this is I have an element containing unformatted HTML.
> So far, I keep losing the <![CDATA[..]]> tag (possibly causing
> errors during
> marshalling).
> To test this, unmarshal and then marshal an xml document
> (containing CDATA).
>
> Thanks,
>  Michel Smits
>  [EMAIL PROTECTED]
>
> -----------------------------------------------------------
> 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