You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Steve Davis <sd...@broadsoft.com> on 2008/03/19 20:11:19 UTC

Algorithm for saving CDATA blocks in XML Beans 2.2 ?

I see that XML Beans 2.3 provides some control over when the saver
generates CDATA. The XML Options setSaveCDataLengthThreshold and
setSaveCDataEntityCountThreshold allow any of the following
configurations:

Every text is CDATA
Only text that has an entity is CDATA
Only text longer than x chars is CDATA
Only text that has y entitazable chars is CDATA
Only text longer than x chars and has y entitazable chars is CDATA

My question is what is the behavior of the saver in XML Beans 2.2? When
does it decide to use CDATA blocks?

Thanks, 
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?

Posted by Cezar Andrei <ce...@bea.com>.
Indeed the options weren't available but the algorithm and default
values are the same.

Cezar

> -----Original Message-----
> From: Steve Davis [mailto:sdavis@broadsoft.com]
> Sent: Wednesday, March 19, 2008 3:49 PM
> To: user@xmlbeans.apache.org
> Subject: RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?
> 
> Cezar,
> 
> If I am not mistaken, the older XML Beans version 2.2 does not does
not
> support these options.
> Please clarify.
> 
> Thanks,
> Steve
> 
> -----Original Message-----
> From: Cezar Andrei [mailto:cezar@bea.com]
> Sent: Wednesday, March 19, 2008 4:38 PM
> To: user@xmlbeans.apache.org
> Subject: RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?
> 
> Steve,
> 
> The javadoc for setSaveCDataLengthThreshold and
> setSaveCDataEntityCountThreshold seems to be quite clear:
> 
>      * CDATA will be used if the folowing condition is true:
>      * textLength > cdataLengthThreshold && entityCount >
> cdataEntityCountThreshold
>      * The default value of cdataLengthThreshold is 32.
>      * The default value of cdataEntityCountThreshold is 5.
> 
> Cezar
> 
> > -----Original Message-----
> > From: Steve Davis [mailto:sdavis@broadsoft.com]
> > Sent: Wednesday, March 19, 2008 2:11 PM
> > To: user@xmlbeans.apache.org
> > Subject: Algorithm for saving CDATA blocks in XML Beans 2.2 ?
> >
> > I see that XML Beans 2.3 provides some control over when the saver
> > generates CDATA. The XML Options setSaveCDataLengthThreshold and
> > setSaveCDataEntityCountThreshold allow any of the following
> > configurations:
> >
> > Every text is CDATA
> > Only text that has an entity is CDATA
> > Only text longer than x chars is CDATA Only text that has y
> > entitazable chars is CDATA Only text longer than x chars and has y
> > entitazable chars is CDATA
> >
> > My question is what is the behavior of the saver in XML Beans 2.2?
> When
> > does it decide to use CDATA blocks?
> >
> > Thanks,
> > Steve
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> Notice:  This email message, together with any attachments, may
contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> entities,  that may be confidential,  proprietary,  copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?

Posted by Steve Davis <sd...@broadsoft.com>.
Cezar,

If I am not mistaken, the older XML Beans version 2.2 does not does not
support these options.
Please clarify.

Thanks,
Steve

-----Original Message-----
From: Cezar Andrei [mailto:cezar@bea.com] 
Sent: Wednesday, March 19, 2008 4:38 PM
To: user@xmlbeans.apache.org
Subject: RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?

Steve,

The javadoc for setSaveCDataLengthThreshold and
setSaveCDataEntityCountThreshold seems to be quite clear:

     * CDATA will be used if the folowing condition is true:
     * textLength > cdataLengthThreshold && entityCount >
cdataEntityCountThreshold
     * The default value of cdataLengthThreshold is 32.
     * The default value of cdataEntityCountThreshold is 5.

Cezar

> -----Original Message-----
> From: Steve Davis [mailto:sdavis@broadsoft.com]
> Sent: Wednesday, March 19, 2008 2:11 PM
> To: user@xmlbeans.apache.org
> Subject: Algorithm for saving CDATA blocks in XML Beans 2.2 ?
> 
> I see that XML Beans 2.3 provides some control over when the saver 
> generates CDATA. The XML Options setSaveCDataLengthThreshold and 
> setSaveCDataEntityCountThreshold allow any of the following
> configurations:
> 
> Every text is CDATA
> Only text that has an entity is CDATA
> Only text longer than x chars is CDATA Only text that has y 
> entitazable chars is CDATA Only text longer than x chars and has y 
> entitazable chars is CDATA
> 
> My question is what is the behavior of the saver in XML Beans 2.2?
When
> does it decide to use CDATA blocks?
> 
> Thanks,
> Steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: Algorithm for saving CDATA blocks in XML Beans 2.2 ?

Posted by Cezar Andrei <ce...@bea.com>.
Steve,

The javadoc for setSaveCDataLengthThreshold and
setSaveCDataEntityCountThreshold seems to be quite clear:

     * CDATA will be used if the folowing condition is true:
     * textLength > cdataLengthThreshold && entityCount >
cdataEntityCountThreshold
     * The default value of cdataLengthThreshold is 32.
     * The default value of cdataEntityCountThreshold is 5.

Cezar

> -----Original Message-----
> From: Steve Davis [mailto:sdavis@broadsoft.com]
> Sent: Wednesday, March 19, 2008 2:11 PM
> To: user@xmlbeans.apache.org
> Subject: Algorithm for saving CDATA blocks in XML Beans 2.2 ?
> 
> I see that XML Beans 2.3 provides some control over when the saver
> generates CDATA. The XML Options setSaveCDataLengthThreshold and
> setSaveCDataEntityCountThreshold allow any of the following
> configurations:
> 
> Every text is CDATA
> Only text that has an entity is CDATA
> Only text longer than x chars is CDATA
> Only text that has y entitazable chars is CDATA
> Only text longer than x chars and has y entitazable chars is CDATA
> 
> My question is what is the behavior of the saver in XML Beans 2.2?
When
> does it decide to use CDATA blocks?
> 
> Thanks,
> Steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org