XML : components from this namespace are not referenceable from schema document

I know there are lots of questions about this subject and I have looked at a bunch of them. But from everything I read my schema looks correct. But I still get this error when I try to validate the schema.

org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'addr:coordinatesElement'. It was detected that 'addr:coordinatesElement' is in namespace 'urn:ajga.address:1.0', but components from this namespace are not referenceable from schema document 'file:///C:/Users/tmcginnis/Workspaces/MyEclipse%202015%20CI/nanda-schema-0.0.1-SNAPSHOT/src/main/resources/schema/AddressSchema_1_0.xsd'. If this is the incorrect namespace, perhaps the prefix of 'addr:coordinatesElement' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Users/tmcginnis/Workspaces/MyEclipse%202015%20CI/nanda-schema-0.0.1-SNAPSHOT/src/main/resources/schema/AddressSchema_1_0.xsd'.

Here is the schema.

  <?xml version="1.0" encoding="UTF-8"?>  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"       targetNamespace="urn:ajga:address:1.0"      xmlns:tns="urn:ajga.address:1.0"      elementFormDefault="qualified"      attributeFormDefault="unqualified"      version="1.0">      <xsd:element name="address">          <xsd:complexType>              <xsd:all>                  <xsd:element name="addressType" type="xsd:string" minOccurs="0"/>                  <xsd:element name="addressLine1" type="xsd:string"/>                  <xsd:element name="addressLine2" type="xsd:string" minOccurs="0"/>                  <xsd:element name="pobox" type="xsd:string" minOccurs="0"/>                  <xsd:element name="city" type="xsd:string"/>                  <xsd:element name="state" type="xsd:string"/>                  <xsd:element name="zip" type="xsd:string"/>                  <xsd:element name="countyCode" type="xsd:string" minOccurs="0"/>                  <xsd:element name="country" type="xsd:string"/>                  <xsd:element name="fips" type="xsd:string" minOccurs="0"/>                  <xsd:element name="coordinates" type="tns:coordinatesElement" minOccurs="0"/>                  <xsd:element name="description" type="xsd:string" minOccurs="0"/>              </xsd:all>          </xsd:complexType>      </xsd:element>        <xsd:complexType name="coordinatesElement">          <xsd:all>              <xsd:element name="longitude" type="xsd:string"/>              <xsd:element name="lattitude" type="xsd:string"/>          </xsd:all>      </xsd:complexType>    </xsd:schema>    

So what's wrong with this?

No comments:

Post a Comment