geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Hogstrom <m...@hogstrom.org>
Subject Re: The evil of mixed content rears its ugly head in the config.xml local-attributes-1.1 schema
Date Thu, 01 Jun 2006 02:52:31 GMT
I think waiting makes sense except I think the ugly message will confuse users.  Is there a
fix to 
at least eliminate this message in the interim ?

David Jencks wrote:
> Now that we have a schema for config.xml it's become more painfully 
> obvious that we are putting mixed content into the attribute elements of 
> config.xml.  You can override an xml-attribute in a gbean such as the 
> <defaultEnvironment> elements in the builders by putting the override 
> xml right into an attribute element in config.xml.  This works great and 
> we use it in the tck setup.
> 
> The schema validation we now seem to be doing is emitting warnings like:
> 
> Booting Geronimo Kernel (in Java 1.4.2_09)...
> Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
> set, which is probably not what is desired.  Parser will use a default
> ErrorHandler to print the first 10 errors.  Please call
> the 'setErrorHandler' method to fix this.
> Error: URI=null Line=105: cvc-complex-type.2.2: Element 'attribute' must 
> have no element [children], and the value must be valid.
> Error: URI=null Line=125: cvc-complex-type.2.2: Element 'attribute' must 
> have no element [children], and the value must be valid.
> Error: URI=null Line=149: cvc-complex-type.2.2: Element 'attribute' must 
> have no element [children], and the value must be valid.
> Error: URI=null Line=179: cvc-complex-type.2.2: Element 'attribute' must 
> have no element [children], and the value must be valid.
> Error: URI=null Line=207: cvc-complex-type.2.2: Element 'attribute' must 
> have no element [children], and the value must be valid.
> 
> so... what to do??
> 
> 1. ignore these messages, after all it works
> 2. Try to modify the attributes-1.1 schema to allow mixed content.  
> Today anyway this is beyond my schema-fu.  In any case mixed content is 
> pretty evil, we should try to avoid it if possible.
> 3. Introduce an xml-attribute element in config.xml.  This is going to 
> require bigger changes in the object model holding the values: we'll 
> need either a new element or a flag to tell it to write out 
> <xml-attribute...> rather than <attribute...>
> 
> (3) is probably the most plausible way to go, but I'm not enthusiastic 
> about cramming this into 1.1.  I think (1) for 1.1 followed by more 
> thought and perhaps (3) for 1.2 is the way to go.
> 
> Thoughts?
> 
> thanks
> david jencks
> 
> 
> 
> 

Mime
View raw message