Thanks again... validates now as it should. The important part is
<xs:selector xpath=".//*" />
Solution looks like this:
<xs:schema attributeformdefault="qualified" elementformdefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="rootType">
<xs:unique name="uniqueID">
<xs:selector xpath=".//*" />
<xs:field xpath="@id" />
</xs:unique>
</xs:element>
<xs:complextype name="rootType">
<xs:sequence>
<xs:element name="folder" type="folderType" maxoccurs="unbounded" />
</xs:sequence>
<xs:attribute name="noNamespaceSchemaLocation" type="xs:string" use="required" />
</xs:complextype>
<xs:complextype name="folderType">
<xs:sequence>
<xs:element name="folder" type="folderType" minoccurs="0" maxoccurs="unbounded" />
</xs:sequence>
<xs:attribute name="id" type="xs:int" />
<xs:attribute name="de-DE" type="xs:string" />
<xs:attribute name="en-US" type="xs:string" />
<xs:attribute name="readonly" type="xs:boolean" />
</xs:complextype>
</xs:schema>