W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

Unique element identifiers across attributes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 31 Jan 2004 07:27:49 +0100
To: xmlschema-dev@w3.org
Message-ID: <402c46ea.490712317@smtp.bjoern.hoehrmann.de>


  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?

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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT