validation error

HI,


I have the attached two codes (xsd + xml).... once I validate the xml file I get the following  error:

 Message: An exception occurred! Type:RuntimeException, Message:Warning: The primary document entity could not be opened  Id=/home/dml/medicare.xsd


--- can any one help me to crack this error?
Please have a look at the codes:

------xsd------

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="medicare-card"> 
        <xs:complexType> 
            <xs:sequence> 
                <xs:element ref="expiry-date" />
                <xs:element ref="family"/>
            </xs:sequence> 
            <xs:attribute name="type" use="required"> 
                <xs:simpleType> 
                    <xs:restriction base="xs:string"> 
                        <xs:enumeration value="Reciprocal"/> 
                        <xs:enumeration value="Interim"/> 
                    </xs:restriction> 
                </xs:simpleType> 
            </xs:attribute> 
            <xs:attribute name="id" use="required"> 
                <xs:simpleType> 
                    <xs:restriction base="xs:string"> 
                        <xs:pattern value="[A-Z][0-9]{8}"></xs:pattern> 
                    </xs:restriction> 
                </xs:simpleType> 
            </xs:attribute> 
        </xs:complexType> 
        <xs:unique name="unique-id"> 
            <xs:selector xpath="medicare-card"></xs:selector> 
            <xs:field xpath="@id"></xs:field> 
        </xs:unique> 
    </xs:element>
    <xs:element name="expiry-date" type="xs:date"/>
    <xs:element name="family">
        <xs:complexType>
            <xs:sequence minOccurs="1" maxOccurs="9">
                <xs:element ref="person"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    
	<xs:element name="person">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="name" /> 
                <xs:element ref="date-of-birth" /> 
                <xs:element ref="contact" /> 
                <xs:element ref="medical-info" /> 
            </xs:sequence>
            <xs:attribute name="gender" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="Male"/>
                        <xs:enumeration value="Female"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
	
	
	
	<xs:element name="name">
	<xs:complexType>
			<xs:sequence>
				<xs:element name="lname" minOccurs="1" maxOccurs="1" />
				<xs:element name="mname" minOccurs="0" maxOccurs="1" />
				<xs:element name="fname" minOccurs="1" maxOccurs="1" /> 
            </xs:sequence>
	</xs:complexType>
	 </xs:element>

	 
    <xs:element name="date-of-birth" type="xs:date"/>
    <xs:element name="contact">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="address"/>
                <xs:element name="telephone"/>
                <xs:element name="email"/>
            </xs:sequence>
            <xs:attribute name="preferred">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="address"/>
                        <xs:enumeration value="telephone"/>
                        <xs:enumeration value="email"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
	<xs:element name="address">
	<xs:complexType>
	<xs:sequence>
	    <xs:element ref="street"/>
        <xs:element ref="city"/>
        <xs:element ref="state"/>
		<xs:element ref="zipcode"/>
	</xs:sequence>
	</xs:complexType>
	</xs:element>

	<xs:element name="street" type="xs:string"/>
	<xs:element name="city" type="xs:string"/>
	<xs:element name="state" type="xs:string"/>	
		<xs:element name="zipcode">
		  <xs:simpleType>
			<xs:restriction base="xs:integer">
			  <xs:pattern value="[0-9]{4}"/>
			</xs:restriction>
		  </xs:simpleType>
		</xs:element>	
	<xs:element name="medical-info">
	<xs:complexType>
		<xs:sequence>
		<xs:element name="blood"/>
		<xs:element ref="allergy"/>
		<xs:element ref="chronic-illness"/>	
		</xs:sequence>
		<xs:attribute name="type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="Opositive"/>
                        <xs:enumeration value="Onegative"/>
						<xs:enumeration value="Apositive"/>
						<xs:enumeration value="Anegative"/>
						<xs:enumeration value="Bpositive"/>
						<xs:enumeration value="Bnegative"/>
						<xs:enumeration value="ABpositive"/>
						<xs:enumeration value="ABnegative"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
	</xs:complexType>
	</xs:element>
	
	<xs:element name="allergy" type="xs:string"/>
	<xs:element name="chronic-illness" type="xs:string"/>

	
	
</xs:schema>  
   

---xml------
<?xml version="1.0" encoding="utf-8" ?> 
<medicare xs:noNamespaceSchemaLocation="medicare.xsd" 
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">

<medicare-card id="A12345678" type="Reciprocal">
		 
		<expiry-date>2020-12-12</expiry-date>
		<family>
			<person gender="Female">
				<name >
					<lname>Dabl</lname>
					<mname>S</mname>
					<fname>Norah</fname>
				</name>
		
			
				<date-of-birth>1987-07-21</date-of-birth>
				<contact >
					<address >
						<street>Melbourne st.</street>
						<city>Melbourne</city>
						<state>vic</state>
						<zipcode>3000</zipcode>
					</address>
					<telephone>0413074666</telephone>
					<email>norah@email.com</email>
				</contact>
				<medical-info type="Opositive">
					<blood></blood>
					<allergy>no</allergy>
					<chronic-illness>no</chronic-illness>
				</medical-info>
			</person>
		</family>
				
	</medicare-card>

</medicare>

Open in new window

AussieSilverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobinSoftware EngineerCommented:
The <medicare> is not defined in your .xsd!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RobinSoftware EngineerCommented:
Do you have the file medicare.xsd in the same path as the xml file?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.