Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Question on JAXB customization

 
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
 
Evil is afoot. But this tiny ad is just an ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic