What is the difference between using xsd:unique and xsd:key?
See http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/primer.html#quartelyReport.
In the example described in the link the "keyRefed" elements are the values of the number attributes of the parts of the zip of the regions and the "keyed" elements are the values of the number attribute of the part of the parts.
Unique declares that the values must be unique but can be null also, key - that they must be unique. Both types can be references by "keyRefed" elements.