Re: key constraints mechanism too weak?

Gary Robertson wrote:

> I want the name attribute of an element and the name attribute
> of one of its (multiple instance) child elements to form a unique
> key. I would have though this a fairly simple requirement but
> it is rejected because one of the two fields evaluates to more
> than one node.
> 
> Am I missing something? Does anybody know the right way for
> me to meet my requirement?


No, I don't think you're not missing anything (and the example in the 
schema primer is bogus).

The closer you can go to what you need is to define 2 keys: a first one 
"Object" under "Repository" and the second one on "State" in the scope 
of "Object".

This will do the job of checking that your values a uniques keys in 
their respective contexts, but you won't be able to reference the 
concatenation of the 2 keys.

Hope this helps.

Eric


-- 
Rendez-vous à Paris pour une visite guidee de la nebuleuse XML.
                                           http://dyomedea.com/formation/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Friday, 5 October 2001 10:14:49 UTC