Is it possible in XSD to define an enumeration restriction based also on content of the XML document?
e.g. I want this XML to be valid: