[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML class descriptor



I think it would be more natural to have parameters given as a list of 
elements rather than an attribute whose value needs parsing.

The question of attributes vs. elements for data representation is always 
subject to some discussion, but my experience is that most of the time 
elements are superior, even if less compact.  You could use empty 
elements, as in:

 <xparameter type="java.lang.String"/>

to maintain some degree of compactness.

I'm not sure why use the x-names; <methods><method>...</method></methods>
seems fine to me.

 Steve

Falko Braeutigam wrote:
> 
> Hi folks,
> 
> we are currently working on making a XML class descriptor for ozone. It will
> allow us to specify all additional class information (remote interface, method
> lock levels, maybe other) in a XML file instead of the interface file. It's
> similar to an EJB deployment descriptor.
> 
> So far we have a generator that creates XML file out of Java classes and castor
> generated classes that allows easy access to such a XML class descriptor.
> Currently the XML file looks like the following:
> 
> <?xml version="1.0"?>
> <javaobject name="Button">
>     <package>java.awt</package>
>     <superclass>java.awt.Component</superclass>
>     <constructors>
>         <xconstructor/>
>         <xconstructor parameter="java.lang.String"/>
>     </constructors>
>     <methods>
>         <xmethod parameter="java.lang.Object" name="equals">
>             <locklevel value="READ"/>
>         </xmethod>
>         <xmethod name="toString">
>             <locklevel value="READ"/>
>         </xmethod>
>         <xmethod parameter="java.awt.Event|java.lang.Object" name="action">
>             <locklevel value="READ"/>
>         </xmethod>
>     </methods>
> </javaobject>
> 
> What do you think about?
> 
> 
> Falko
> -- 
> ______________________________________________________________________
> Falko Braeutigam                         mailto:falko@softwarebuero.de
> softwarebuero m&b (SMB)                    http://www.softwarebuero.de
>