David

David

  • NA
  • 2
  • 0

XML: Identity Contraint not declared

Jul 31 2008 7:41 PM
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"   xmlns="RoutingInfoType">
  <xs:include schemaLocation="RoutingInfoType.xsd"/>
  <xs:element name="mapping">
    <xs:complexType>
      <xs:attribute name="scenarioId" type="xs:unsignedShort" use="required">
      </xs:attribute>
      <xs:attribute name="activeFarmIndex" type="xs:unsignedByte"/>
      <xs:attribute name="farmId">
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
    <xs:key name="activeFarmIndex_XOR_farmId">
      <xs:selector xpath="."/>
      <xs:field xpath="@activeFarmIndex|@farmId"/>
    </xs:key>
  </xs:element>
  <xs:element name="routingTable">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="header" type="baselineRoutingInfoType" xmlns="baselineRoutingInfoType"/>
        <xs:element name="clients">
          <xs:complexType>
            <xs:sequence>
              <xs:element ref="client" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
          <xs:unique name="uniqueClients">
            <xs:selector xpath="client"/>
            <xs:field xpath="@id"/>
          </xs:unique>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="created" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:dateTime"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="owner" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value=".+\\.+"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="incrementalBuild" type="xs:boolean" use="optional"/>
    </xs:complexType>
    <xs:key name="key_countryId">
      <xs:selector xpath="header/countries/country"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:keyref name="keyref_client_countryId" refer="key_countryId">
      <xs:selector xpath="clients/client"/>
      <xs:field xpath="@countryId"/>
    </xs:keyref>
    <xs:key name="key_businessUnitId">
      <xs:selector xpath="header/businessUnits/businessUnit"/>
      <xs:field xpath="@id"/>
    </xs:key>
  </xs:element>
</xs:schema>

Basically it tells me : The "key_countryID" identity contraint is not declared


Any ligth in what can i do to solve this?

Answers (1)