XML XSD Schema - Enforce Unique Attribute Values in Schema
问题 Lets say I have a schema that defines the following XML: <Values> <Add Key="Key1">Value 1</Add> <Add Key="Key2">Value 2</Add> <Add Key="Key3">Value 3</Add> <Add Key="Key4">Value 4</Add> </Values> I would like, at a schema level, to be able to enforce that the values for the Key attribute are unique, i.e. the example above is valid, but the following example would be invalid: <Values> <Add Key="Key1">Value 1</Add> <Add Key="Key2">Value 2</Add> <Add Key="Key2">Value 3</Add> <Add Key="Key3"