ok this is an exemple :
xml file:
="1.0"
<Catalog>
<Book id="bk101" price="12.30" />
<Book id="bk102" price="exist" />
</Catalog>
and this is the xsd file which i tried:
="1.0"="utf-8"
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Catalog">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Book">
<xs:complexType>
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="price" type="tprice" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="tprice">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]| 'exist'"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>