Restrict complexType with attributes in XSD?
I'm working with an XSD such as: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="algo"> <xs:complexType> <xs:sequence> <xs:element name="nota" type="t_algo" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="t_algo"> <xs:restriction base="xs:string"> <xs:pattern value="[1][0]|[0-9]" /> </xs:restriction> <xs:attribute name="modul" type="t_modul"/> </xs:complexType> <xs:simpleType name="t_modul"> <xs:restriction base="xs:string"> <xs:pattern