I have a schema file which I would like to split in two parts. One with common fields and another with particular fields in JAXB (2.1) for reusability. How to do it?
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="content">
<xs:complexType>
<xs:sequence>
<xs:element ref="idPaciente"/>
<xs:element ref="fechaCita"/>
</xs:sequence>
<xs:attribute name="user" type="xs:string" use="required" />
<xs:attribute name="authorityId" type="xs:string" use="required" />
<xs:attribute name="userName" type="xs:string" use="required" />
<xs:attribute name="profileId" type="xs:string" use="required" />
<xs:attribute name="sessionId" type="xs:string" use="required" />
<xs:attribute name="country" type="xs:string" use="required" />
<xs:attribute name="method" type="xs:string" use="required" />
<xs:attribute name="language" type="xs:string" use="required" />
</xs:complexType> </xs:element>
<xs:element name="idPaciente" type="xs:string"/> <xs:element name="fechaCita" type="xs:string"/>
</xs:schema>
Both elements into the sequence are the uncommon fields while the others would be the common part. How could be done?
Thanks in advance.