We have a given XSD such as this:
<xsd:element name="SomeRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RegistrationDetail"
type="RegistrationDetailType"
minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="RegistrationDetailType">
<xsd:sequence>
<xsd:element name="Registration"
type="RegistrationType"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RegistrationType">
<xsd:sequence>
<xsd:element name="AnotherElem" type="AnotherType" />
<xsd:element name="YetAnotherElem"
type="YetAnotherType" />
</xsd:sequence>
</xsd:complexType>
We need this XSD to only have 1 global element, "SomeRequest"... And
every element nested in it must be a referenced type as is in the above
example. We are currently (and manually) taking the given XSD and
creating global elements so that we get a JiBX marshaller for say
"Registration" element. This is what we do manually:
<xsd:element name="SomeRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RegistrationDetail"
type="RegistrationDetailType"
minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="RegistrationDetailType">
<xsd:sequence>
<xsd:element ref="Registration" maxOccurs="unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<!-- WORKAROUND: expose as a global element to obtain a marshaller and
unmarshaller -->
<xsd:element name="Registration">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element name="AnotherElem"
type="AnotherType" />
<xsd:element name="YetAnotherElem"
type="YetAnotherType" />
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
We need this XSD to only have 1 global
Again we wish to keep the previous (the first example) XSD intact and
not remake these Types into global elements in order to get a JiBX
marshaller/unmarshaller.... Is there anything with Jibx customizations
or anything else that we can to obtain a marshaller for a non global
element?
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users