Hi Hoolam,

This issue is due to missing support for xs:all in CodeGen. I've now 
hopefully added this in the 1.2.2 code. You can download the jars from 
the Maven(1) repository, at http://jibx.sourceforge.net/maven/jibx/jars/ 
if you want to try this for yourself (look for the 1.2.2-SNAPSHOT jars).

  - 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



Hoolam Woon wrote:
> Re point (2) in the previous email, I've a concrete example.
>
> My schema definition is as follow. When I ran codegen, the mapping 
> with name="style" in the binding produced by codegen did not have 
> ordered="false". How do I instruct codegen to add order="false" to the 
> mapping? Thanks in advance.
>
> My schema is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> elementFormDefault="qualified">
>         <xs:element name="style">
>                 <xs:complexType>
>                         <xs:all>
>                                 <xs:element ref="color" minOccurs="0" 
> maxOccurs="1" />
>                                 <xs:element ref="font" minOccurs="0" 
> maxOccurs="1" />
>                         </xs:all>
>                         <xs:attribute name="name" use="required" 
> type="xs:string" />
>                 </xs:complexType>
>         </xs:element>
>         <xs:element name="font">
>                 <xs:complexType>
>                         <xs:attribute name="face" use="optional" 
> type="xs:string" />
>                 </xs:complexType>
>         </xs:element>
>         <xs:element name="color">
>                 <xs:complexType>
>                         <xs:attribute name="value" type="xs:string" 
> use="required" />
>                 </xs:complexType>
>         </xs:element>
> </xs:schema>
>
> The binding produced by codegen is:
>
> <binding name="binding" package="hoolam">
>   <mapping class="hoolam.Style" name="style">
>     <structure type="hoolam.Color" get-method="getColor" 
> set-method="setColor" usage="optional"/>
>     <structure type="hoolam.Font" get-method="getFont" 
> set-method="setFont" usage="optional"/>
>     <value style="attribute" name="name" get-method="getName" 
> set-method="setName"/>
>   </mapping>
>   <mapping class="hoolam.Font" name="font">
>     <value style="attribute" name="face" get-method="getFace" 
> set-method="setFace" usage="optional"/>
>   </mapping>
>   <mapping class="hoolam.Color" name="color">
>     <value style="attribute" name="value" get-method="getValue" 
> set-method="setValue"/>
>   </mapping>
> </binding>
>
> On Wed, Sep 2, 2009 at 5:18 PM, Hoolam Woon <hoolam.w...@binu.com 
> <mailto:hoolam.w...@binu.com>> wrote:
>
>     Hello everyone,
>
>     I've 2 question about codegen customization:
>
>     (1) How does one instruct codegen to give get/set/test methods in
>     the binding.xml produced specific names?
>
>     (2) How does one instruct codegen to add an attribute
>     ordered="false" to a mapping in the binding.xml produced?
>
>     Can anyone help?
>
>     Thanks in advance.
>
>     Hoolam
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

------------------------------------------------------------------------------
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