Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanted to use a common xsd inside my xsd.

It is like

XML
<xs:schema xmlns:child="http://kiran.com/childEntityXX">
    <xs:import namespace="http://kiran.com/common"    schemalocation="common.xsd">

      <xs:complexType name="childEntityXX">
        <xs:element name="XXX" type="child:EmpName">
      </xs:complexType>

      <xs:complexType name="EmpName">
        <xs:element name="myname" type="xs:string">
      </xs:complexType>


Common.xsd also contains the complex type EmpName.

but, when my jaxb is creating the java objects, it is refering the EmpName from Common Type instead of the childEntityXX
Posted
Updated 3-Dec-09 17:25pm
v3

1 solution

You need to use an xs:redefine element. See this tutorial[^] for details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900