unique field constraints are being required

Having trouble installing Oxygen? Got a bug to report? Post it all here.
thatch
Posts: 4
Joined: Fri Oct 31, 2003 12:48 am

unique field constraints are being required

Post by thatch »

Hi George,
Looks like your keeping busy :wink: I have a problem/question with declaring a field unique:

<xsd:unique name="fooConstraint" xmlns:o="my.foo.namespace">
<xsd:selector xpath="o:someNode/o:someOtherNode"/>
<xsd:field xpath="@foo"/>
<xsd:field xpath=".//childNode/@bar"/>
</xsd:unique>

returns the error:
Not enough values specified for the <unique> identity constraint specified for element "grid".

for the xml

<o:grid xmlns:o="my.foo.namespace" ...>
</o:grid>

Either of the constraint fields alone allow the uniqueness constraint to be satisfied if no nodes match the xpath with the specified fields as required, but having two or more constraint fields returns this error if all the fields don't exist, which should be the behavior of <key> not <unique>.

Thanks for your input and have a nice weekend.

Thatcher
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Thatcher,

Thank you for your post. The problem appears only when multifield constrains are used and for some node there are some values for the fields but not for all the fields. As we are using the latest version of Xerces I started a discussion on the xerces-dev list about this issue.

I will post any updates to this forum entry.

Best Regards,
George
Post Reply