HI,

not by the means of XML. But how about working with a base class at the
OO Level, and indicate that to the Castor mapping file ?

Regards
Werner

fmarchioni wrote:
> Hello !
> I have a list of XML commands that I have coded with castor. Since the
> fields of the commands are always the same I'd like to put them in a
> template or file and include them in every command, is it possible to do it
> ?
> Here's what it looks like:
>       <class name="it.pride.iptv.netcentrex.BaseCommandCreate">
>               <map-to xml="ccsmp-create" />
> 
>               <field name="sessionId" type="java.lang.String">
>                       <bind-xml name="session" node="attribute" />
>               </field>
> 
>               <field name="enterprises" 
> type="it.pride.iptv.netcentrex.Enterprise"
>                       collection="arraylist">
>                       <bind-xml name="enterprise" />
>               </field>
>                        .....
>              </class>   
>       <class name="it.pride.iptv.netcentrex.BaseCommandDelete">
>               <map-to xml="ccsmp-delete" />
> 
>               <field name="sessionId" type="java.lang.String">
>                       <bind-xml name="session" node="attribute" />
>               </field>
> 
>               <field name="enterprises" 
> type="it.pride.iptv.netcentrex.Enterprise"
>                       collection="arraylist">
>                       <bind-xml name="enterprise" />
>               </field>
>                        .....
>              </class>   
>       <class name="it.pride.iptv.netcentrex.BaseCommandUpdate">
>               <map-to xml="ccsmp-update" />
> 
>               <field name="sessionId" type="java.lang.String">
>                       <bind-xml name="session" node="attribute" />
>               </field>
> 
>               <field name="enterprises" 
> type="it.pride.iptv.netcentrex.Enterprise"
>                       collection="arraylist">
>                       <bind-xml name="enterprise" />
>               </field>
>                        .....
>              </class>   
> 
> Can I avoid to repeat n times the fields list, for every new command ?
> thanks a lot
> francesco

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to