W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2001

Re: key and keyref

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 21 Nov 2001 17:18:28 +0000
Message-ID: <302218009.20011121171828@jenitennison.com>
To: "Chan, Philip" <Philip.Chan@rbccm.com>
CC: "'xmlschema-dev'" <xmlschema-dev@w3.org>
Hi Philip,

> Now, is it possible to create a key and keyref constaints so that
> /payroll/employees/name/dept/name and
> /payroll/employees/name/dept/location are only pointing to:
> /payroll/"any node()" and /payroll/"the node()"@location?

No. The problem is that you can't have a single keyref point to two
key/unique identity constraints at the same time. To merge them into
one identity constraint, you'd have to get the name of an element,
which isn't possible with the restricted XPath syntax available in the
xs:field elements. Sorry.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 21 November 2001 12:18:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:35 GMT