Hi,
I like it.

Don't we also need a dtd for jboss.jcml (or is there one I haven't found?)?
 My experience with adding a dtd indicates whitespace handling may be
affected-- maybe we should add the dtd and validation first?


At the risk of changing the subject ;-)
There seem to be two xml-configuration parsing systems in use. The older
stuff like for ejb-jar uses code that partially validates the xml while
setting properties, whereas the rar deployer uses a reflection based scheme
that pretty completely separates the xml structure from the property
setting.  I like the reflection-based structure-independent way better,
although I think it should only be used with a  dtd and xml parser
validation-- although this should be done anyway imho.  Does anyone else
have an opinion?

david jencks

On 2001.08.08 22:31:13 -0400 Jason Dillon wrote:
> I mentioned a while ago something about trimming all whitespace from
> metadata values, but that was rejected because some data might need that
> whitespace.  I also added support to auto trim attribute values from
> jboss.jcml.
> 
> Now I would like to suggest changing things such that all leading
> and trailing whitespace is truncated for all attribtes (jcml and
> metadata)
> unless the data is enclosed in a CDATA element.
> 
> Initially I was not sure if this was possible, but I just check and we
> can
> detect if a node is a CDATA via the Node.getNodeType() ==
> Node.CDATA_SECTION_NODE.
> 
> Lets assume that there is no autoTrim in ConfigurationService and we have
> a
> mbean that looks like this:
> 
>   <mbean code="org.jboss.web.WebService"
>          name="DefaultDomain:service=Webserver">
>     <attribute name="Port">
>       8083
>     </attribute>
>   </mbean>
> 
> The value of Port should resolve to "8083".
> 
>   <mbean code="org.jboss.web.WebService"
>          name="DefaultDomain:service=Webserver">
>     <attribute name="Port">
>       <!CDATA[8083]]>
>     </attribute>
>   </mbean>
> 
> The value of Port should still resolve to "8083", since we can cast aside
> the first node, since it is empty and its sibling is a cdata.
> 
> To make this work, some modifications will be required to look for empty
> nodes with siblings that are CDATA.  We could also support comments
> inside,
> such that this would also work:
> 
>   <mbean code="org.jboss.web.WebService"
>          name="DefaultDomain:service=Webserver">
>     <attribute name="Port">
>       <!-- use this port -->
>       8083
>     </attribute>
>   </mbean>
> 
> Any ways, I think that this would be very, very helpful to allow more
> freedom with respect to usage of XML syntax, and provide a mechanism to
> indicate that whitespace should not be trimmed.
> 
> Any comments?
> 
> --jason
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to