Restricting XML Schema Identity Constraints: Two Possibilities

Henry S. Thompson
18 January 2001

1.   Background

CR feedback has identified Identity Constraints as an aspect of XML Schema which has caused some concern. Two particular classes of observations have been made:

2.   Options for simplification short of removal

Three main possibilities can be identified:

  1. Restrict the inventory of XPath axes, predicates and functions which can be employed to reduce implementation burden;
  2. Further restrict the inventory to render streaming processing much simpler.
  3. In addition remove multi-part keys to render streaming processing of identity constraints essentially the same as processing ID/IDREF.

3.   Concrete proposals

The first two options above are described in concrete proposals:

  1. Simplification:
  2. Further simplification:

4.   Examples

Examples of paths allowed under different options

foo @bar foo/baz foo/baz/@bar foo[@baz] /foo foo[baz] //foo .//foo ancestor::state//foo preceding-sibling::foo .//foo[@bar/2=self::*/@baz+13]
foo @bar foo/baz foo/baz/@bar foo[@baz] /foo foo[baz] //foo .//foo ancestor::state//foo
Further simplification
foo @bar foo/baz foo/baz/@bar foo[@baz] /foo