How do I ensure unique element values in an XML schema?
the schema seems ok and should detect the duplicate. may be a bug in Oxygen?
you can try this site to validate your xml : http://www.xmlvalidation.com
and you'll see it finds errors in your xmldocument:
Duplicate unique value [Book1] declared for identity constraint of element "books"