[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Anderson, John" <John@B...>
  • To: xml-dev@l...
  • Date: Mon, 23 Jul 2001 16:56:05 +0200

Title: Question on id constraints

(could have been: Primary and Foreign Keys)

Hi,

I'm trying to work out som PK/FK mappings to key/keyref structures.

The spec says that the selector must involve the child axis. This imples that in the following example:

<files>
  <file>
    <directoryid>
    <fileid>
    <filetype>
  </file>
  <file> . . . etc
       
</files>

I would not be able to specify a unique or key for <file> consisting of the combination of <directoryid> & <fileid>, since the selector must point to either one or the other of these, unless the key is specified in the parent <files>.

Anyone know if this is correct? It seems a bit limiting since I can't then reuse that constraint in other contexts where <file> is used without redefining it.

John


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member