Click here to Skip to main content
15,901,205 members

Comments by .Net Perfect Dev (Top 1 by date)

.Net Perfect Dev 13-Jun-22 12:47pm View    
ok this is an exemple :
xml file:

<catalog>
<book id="bk101" price="12.30">
<book id="bk102" price="exist">


and this is the xsd file which i tried:

<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:simpletype name="tprice">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]| 'exist'">