There is a fragment of XML
uid-1 uid-2 uid-3&
You cannot express your constraint in XSD 1.0, but in XSD 1.1, you can use xs:assert to limit the itemUID elements with key attributes to 0, 2, 3 elements as follows:
xs:assert
itemUID
key
Here it is in context in a complete XSD: