Hi Varghese, You can just add style="element" on the <value name="data"/> element. The value-style="..." setting on a container just changes the default for all the child <value> elements; you can always override this on the individual <value>.
- Dennis Dennis M. Sosnoski SOA 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 Varghese C V wrote: > Given the class > > class Clazz{ > int id; > List<String> dataSet; > } > > The mapping below throws error during compile time > > <mapping name="clazz" class="Clazz" value-style="attribute"> > <value name="id" field="id"/> > <collection name="dataSet" field="dataSet" > item-type="java.lang.String" > factory="org.jibx.runtime.Utility.arrayListFactory"> > <value name="data"/> > </collection> > </mapping> > > Error: Attributes not allowed as child components of collection; on > value element at (line 5, col 21, in Clazz.jibx.xml) > > This error goes away when the value-style attribute is removed in the > mapping element. This error is probably due the combination of using a > collection of a Jibx's built-in conversion type (String in this case) > and setting a default value style in the mapping element. The obvious ( > & inconvenient ) fix is to move the style attribute to the value > elements that require it. > > regards > Varghese C V > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > jibx-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
