Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on JAXB customization

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this XML Schema ..

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
jxb:version="1.0">

<xsd:simpleType name="ZipCode"/>
<xsd:simpleType name="State" />

Now I add one customization to both (I) and (II) at different locations.
(I)

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
jxb:version="1.0">

<xsd:simpleType name="ZipCode"/>
<xsd:simpleType name="State" />
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings generateIsSetMethod="true">
bindingStyle="modelGroupBinding"
choiceContentProperty="true" >

<xjc:serializable uid="12343"/>
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>
</xsd:simpleType>

and this other one (II)


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
jxb:version="1.0">

<xsd:simpleType name="ZipCode"/>
<xsd:simpleType name="State" />
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings generateIsSetMethod="true">
bindingStyle="modelGroupBinding"
choiceContentProperty="true" >

<xjc:serializable uid="12343"/>
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>

My question is the jaxb:globalBinding tags in both (I) and (II) ..does it still have the global scope for (I) even though the first one I defined the annotation inside an element. Does having global scope actually require the jxb:globalBinding element or does it have global scope by location.

Thanks
Dhiren
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic