Re: Alternative approach for key/keyref

From
Kohsuke KAWAGUCHI <>
Date
2001-07-13T17:58:24+00:00
ID
Thread
Re: Alternative approach for key/keyref
> I don't get it.  Why do you think this is so important?


as James wrote earlier, there are three places where path expressions
can be used.

a) It can be used to identify the root of a subtree within which some
   set of keys is unique

b) It can be used to identify the target element/attribute (the common
   ancestor of the various fields): the object that conceptually is
   identified by the key

c) It can be used to identify the individual fields that together
   identify a particular target.


For example, W3C XML Schema uses a path-based identity constraint. It
uses a subset of XPath for (b) and (c).

Path-expression which is used for (c) requires another constraint. That
is, the specified path expression may not match more than one node.
Say every <section> element is uniquely identified by the value of its
<name> element. If a schema allows <name> element to appear more than
once in one section, then there is something wrong, isn't there.



For this reason, I think this is a problem for any path-expression based
approach.  We don't have this problem in our current RELAX NG but it is
because we don't use path-expression at this moment.


regards,
--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems