This is by design, since some schemas use combinations of added words in 
different orders. It'd be possible to write the code so that it would 
only remove at most one instance of each suffix, but that seems more 
trouble than it's worth.

You should be able to easily change this behavior with a trivial 
subclass of DefaultNameConverter - just override trimXName(String) and 
do it your way.

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



jcaristi wrote:
> In attempting to use the strip-suffixes codegen option to remove the word
> "Type" from the end of my complex types.  However, some of my complex types
> have the word "Type" in the name as well as a "Type" suffix.  In this case,
> JiBX seems to recursively remove the suffix.  In the following example, I
> would expect to end up with "VehicleType" and "Vehicle".  Instead, I end up
> with "Vehicle" (two instances of "Type" removed) and "Vehicle1" (one
> instances of "Type" removed and class renamed to avoid conflict).  This is
> definitely not what I want.
>
> Is this by design?  Is there a way around this or do I have to code my own
> name converter?     
>
> <xsd:complexType name="VehicleTypeType">
>               <xsd:simpleContent>
>                       <xsd:extension base="xsd:string">
>                               <xsd:attribute name="Id" type="xsd:int" 
> use="required" />
>                       </xsd:extension>
>               </xsd:simpleContent>
>       </xsd:complexType>
>
> <xsd:complexType name="VehicleType">
>               <xsd:simpleContent>
>                       <xsd:extension base="xsd:string">
>                               <xsd:attribute name="Id" type="int" 
> use="required" />
>                       </xsd:extension>
>               </xsd:simpleContent>
>       </xsd:complexType>
>
>       
>   

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to