Hi there,

since I am still busy on that problem and didn't get any practical answers yet  I'd like to repost my last mail to this mailing list:


Problem description / scenario :
I've got an XSD file to use with the SourceGenerator. I have elements like ARTICLE, ARTICLE_GROUPS and INGREDIENTS. Each of those elements has a ROW element which type is different.
(XSD file see below)

What happens:
When sourcegen builds the sources - only  the  last  ROW definition  (with dependant getters/setters to ctROW_INGR)  is used to build the ROW.java  file.  I assume that the other source files get generated as well, but are overwritten.

What I'd expect:
The Sourcegen would make an interface of the ROW element whereas the type definitions ctROW_ART, ctROW_ARTGR and ctROW_INGR implement this ROW interface.
Is it possible to force the generation of interfaces somehow for certain elements? Can I achieve this by using a bindung file?
If yes - which version of castor is needed?



Thanks for help!

Cheers,
Jens


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
   <!--===================================element LNTSCALEDATA===============================-->
   <xs:element name="TrsLntStd" type="ctTrsLntStd"/>
   <xs:complexType name="ctTrsLntStd">
       <xs:choice minOccurs="0" maxOccurs="unbounded">
                      <xs:element name="ARTICLE" type="ctARTICLE"/>
           <xs:element name="ARTICLE_GROUPS" type="ctARTICLE_GROUPS"/>
           <xs:element name="INGREDIENTS" type="ctINGREDIENTS"/>
           [...]
       </xs:choice>
   </xs:complexType>
         <!--=================================for element ARTICLES====================================-->
   <xs:complexType name="ctARTICLE">
       <xs:sequence>
           <xs:element name="ROW" type="ctROW_ART" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
   </xs:complexType>
   <xs:complexType name="ctROW_ART">
       <xs:attributeGroup ref="RowArtAttributes"/>
   </xs:complexType>
   <!--===================================attributes of ctROW_ART=================================-->
   <xs:attributeGroup name="RowArtAttributes">
       <xs:attribute name="CTRL" type="control"/>
       <xs:attribute name="DEPNO" type="depno" use="required"/>
       <xs:attribute name="PLUNO" type="int1to999999" use="required"/>
       <xs:attribute name="UAN" type="char13"/>
       <xs:attribute name="TLU" type="char100"/>
       <xs:attribute name="SHORTTLU" type="char20"/>
       <xs:attribute name="PRICE1" type="int0to99999999"/>
       <xs:attribute name="PRICE2" type="int0to99999999"/>
       <xs:attribute name="VAT1" type="int0to9"/>
       <xs:attribute name="VAT2" type="int0to9"/>
       <xs:attribute name="GRPNO" type="int0to9999"/>
       <xs:attribute name="TARENO" type="int0to99"/>
       <xs:attribute name="ARTFLAG" type="int0to99999"/>
       <xs:attribute name="COMPTEXTNO" type="int0to9999"/>
       <xs:attribute name="FOODVALUE" type="int0to99999"/>
       <xs:attribute name="FIXWEIGHT" type="int0to999999999"/>
       <xs:attribute name="DATETIME" type="date"/>
   </xs:attributeGroup>
            <!--================================for element ARTICLE_GROUPS==========================-->
   <xs:complexType name="ctARTICLE_GROUPS">
       <xs:sequence>
           <xs:element name="ROW" type="ctROW_ARTGR" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
   </xs:complexType>
   <xs:complexType name="ctROW_ARTGR">
       <xs:attribute name="CTRL" type="control"/>
       <xs:attribute name="DEPNO" type="depno" use="required"/>
       <xs:attribute name="GRPNO" type="int1to99999" use="required"/>
       <xs:attribute name="VAT1" type="int0to9"/>
       <xs:attribute name="VAT2" type="int0to9"/>
       <xs:attribute name="TEXT" type="char20"/>
   </xs:complexType>
            <!--================================for element INGREDIENTS==============================-->
   <xs:complexType name="ctINGREDIENTS">
       <xs:sequence>
           <xs:element name="ROW" type="ctROW_INGR" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
   </xs:complexType>
   <xs:complexType name="ctROW_INGR">
       <xs:attribute name="CTRL" type="control"/>
       <xs:attribute name="DEPNO" type="depno" use="required"/>
       <xs:attribute name="PLUNO" type="int1to999999" use="required"/>
       <xs:attribute name="RECIPENO" type="int0to9" use="required"/>
       <xs:attribute name="RECIPENAME" type="char20"/>
       <xs:attribute name="INGREDIENT" type="char1000"/>
   </xs:complexType>

   [...]
   </xs:schema>

Reply via email to