uniqueness question

I am trying to specify that the contents of my "UniqueID" element is unqiue for every occurance of the element.

My problem is that the instance doc validates against the schema no matter what the contents of "UniqueID" are. When I enter identitcal values for each element, such as <UniqueID>a</UniqueID> and <UniqueID>a</UniqueID>, the instance doc is validated.  Obviously, I dont want this to happen.

Here is a portion of my schema:

<element name="Facts" type="fac:FactsType"/>
 
 <complexType name="FactsType">
  <sequence>
   <element name="Fact" type="fac:FactType" maxOccurs="unbounded">
    <unique name="factID">
     <selector xpath="Fact"/>
     <field xpath="UniqueID"/>
    </unique>
   </element>
  </sequence>
 </complexType>
 
 <complexType name="FactType">
  <sequence>
   <element name="FactName" type="string"/>
   <!-- specifies the name of the fact -->
   <element name="UniqueID" type="string"/>
   <!-- a unique ID to distiguish facts with the same name -->
   <element name="Chaining" type="fac:ChainEnum"/>
   <!-- backwards chaining=back, forwards chaining=forward -->
   <element name="Slots" type="fac:SlotsType"/>
  </sequence>
 </complexType>


I would greatly appreciate any help.  Thank you!!!

Joe

Received on Sunday, 21 April 2002 01:16:33 UTC