[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Identity-constraint
- From: Faroukh Fekravar <fekravar@austin.apc.slb.com>
- To: XML-DEV Discussion List <xml-dev@lists.xml.org>
- Date: Tue, 13 Feb 2001 15:26:19 -0600
Folks,
I'm validating my xml instance (generated manually) based on the schema
below by using XSV
and get the 'cvc-identity-constraint.2.3.2' error.
(No key or unique constraint named Item1Key declared, refed by keyref
Item2_KeyRef)
I'm not usre whether I'm missing something here or XSV has some
limitation/bugs.
I would appreciate your help.
Thanks,
Faroukh
XML Instance:
<Project
<Item1 Item1_2="123">
<Item1_1>999</Item1_1>
</Item1>
<Item2 Item2_2="123">
<Item2_1>999</Item2_1>
</Item2>
</Project>
Schema:
<xsd:element name="Project">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Item1" minOccurs="0"/>
<xsd:element ref="Item2" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Item1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Item1_1" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="Item1_2" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:key name="Item1Key">
<xsd:selector xpath="Item1"/>
<xsd:field xpath="@Item1_2"/>
</xsd:key>
</xsd:element>
<xsd:element name="Item2" type="Item2Key">
<xsd:keyref name="Item2_KeyRef" refer="Item1Key">
<xsd:selector xpath ="Item2"/>
<xsd:field xpath ="@Item2_2"/>
</xsd:keyref>
</xsd:element>
<xsd:complexType name="Item2Key">
<xsd:sequence>
<xsd:element name="Item2_1" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="Item2_2" type="xsd:string" use="required"/>
</xsd:complexType>
--
________________________________________________________________________
Faroukh Fekravar Schlumberger Austin Product Center
Principal Reservoir Engineer 8311 North 620
Software Product Integration, Austin, TX 78726
Data Modeling Voice: (512) 331-3348
E-mail: fekravar@austin.apc.slb.com Fax: (512) 331-3075
________________________________________________________________________