Unique element identifiers across attributes

Hi,

  I have a document where all elements may have an ID 'm' attribute
and some elements (a, b, c) may have a NMTOKEN 'n' attribute. I want
to express that values for 'm' and 'n' must be globally unique
identifiers for elements, that is the fragment

  <a n = 'x' m = 'x' />

is valid, while the fragments

  <a n = 'x'><b n = 'x' /></a>
  <a n = 'x'><b m = 'x' /></a>
  <a m = 'x'><b n = 'x' /></a>
  <a m = 'x'><b m = 'x' /></a>

  <a n = 'x' /><b n = 'x' />
  <a n = 'x' /><b m = 'x' />
  <a m = 'x' /><b n = 'x' />
  <a m = 'x' /><b m = 'x' />
  ...

are all invalid, since the identifier 'x' is ambiguous. Is
it impossible to express this constraint in XML Schema?

regards.

Received on Saturday, 31 January 2004 01:28:05 UTC