Hi All,

I have some doubts on extension mappings.

Say I have below binding.xml taken from JiBX tutorials:

<binding>
  <mapping class="example10.Identity" abstract="true">
    <value name="cust-num" field="customerNumber"/>
  </mapping>
  <mapping name="person" class="example10.Person">
    <structure map-as="example10.Identity"/>
    <value name="first-name" field="firstName"/>
    <value name="last-name" field="lastName"/>
  </mapping>
  <mapping name="company" class="example10.Company"
extends="example10.Identity">
    <value name="name" field="name"/>
    <value name="tax-id" field="taxId"/>
    <structure map-as="example10.Identity"/>
  </mapping>
  <mapping name="customer" class="example10.Customer">
    <structure field="identity"/>
    <value name="street" field="street" usage="optional"/>
    <value name="city" field="city" usage="optional"/>
    <value name="state" field="state" usage="optional"/>
    <value name="zip" field="zip" usage="optional"/>
    <value name="phone" field="phone" usage="optional"/>
  </mapping>
</binding>


Now, both example10.Person and example10.Company extend their parent
class example10.Identity and for person mapping I didnt use any
extends attribute and for company  mapping I used extends attribute.
My doubt is I dont find any difference in the final xml created by
this type of  mappings. So what exactly extends attribute make
difference in the final xml that we try to make ? Please suggest ?



Thanks & Regards,
Kumar.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to