geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: CDATA and GBean attributes
Date Tue, 22 Feb 2005 19:01:43 GMT

On Feb 22, 2005, at 10:38 AM, Dain Sundstrom wrote:

> On Feb 22, 2005, at 10:27 AM, David Jencks wrote:
>> I'm not sure this is such a good idea.
>> It's going to require changing the gbean schema to allow an any 
>> element and mixed content in a gbean attribute element.   In 
>> principle I object strongly to mixed content.
> What's the big deal.

mixed content is a disaster.
-100 on any use of mixed content unless the results cannot be achieved 
any other way.
>  This is a leaf node (from our view) so if they want to have plain 
> text or XML that seems fine to me; it is not like html were we would 
> need to pick our bits out of it.  If they actually want mixed content 
> (xhtml), that would be fine with me also.  It seems reasonable to me 
> to say, this is your slot for your data, put what ever you want in it.

perhaps in an ideal world, but this is xml, not an ideal world.  IMO 
the xml processing for the gbean deployment should not be looking at 
what is in an attribute value: the PropertyEditor should be doing that. 
  AFAIK the only way to prevent xml processors of any sort from looking 
at the "xml" contents is to wrap them in CDATA.
>> I think the extra complications indicate that the CDATA solution is 
>> much much simpler.  Is there a problem with it?  What are you trying 
>> to pass in?  What are you doing with the results? Do you  want an 
>> XmlObject, a string, a DOM element, a STAX stream...?
> I believe my original code supported creating a DOM.  IIRC, I just get 
> the content as a string and pass it to the java beans converters.

Unless you use CDATA, the xml processing for the gbean will construct 
an xml model for the contents.  I think this is just plain a really bad 
idea.  I want to get a string and pass it to the appropriate 
PropertyEditor.  If it wants a STAX stream, XmlObject, DOM, whatever, 
it's welcome to build that itself.

david jencks
> -dain

View raw message