I recently asked about the schema in my company. There are very few people who know the schema.
Schema is used to define XML. It is like defining the table structure in the database. xml without schma is a piece of sand.
Schema can be seen in many products, such as dataset in. net, infopath in office, and WSDL in WebService...
Schema Features:
Define simple and complex data structures
Use namespace to differentiate and reference each other
Language independence
You can add descriptions and other additional information...
Let's take a look at the simple functions of Schema:
Simple type, based on string, with a length of 2 ~ 5 digits
< Xs: simpletype Name = "Chinesename" >
< Xs: Restriction Base = "XS: string" >
< Xs: maxlength Value = "5" />
< Xs: minlength Value = "2" />
</ Xs: Restriction >
</ Xs: simpletype >
Simple type. The regular expression is used to limit the format based on string:
< Xs: simpletype Name = "Arenumber" >
< Xs: Restriction Base = "XS: string" >
< Xs: Pattern Value = "0 [1-9] [0-9] {1, 2 }" />
</ Xs: Restriction >
</ Xs: simpletype >
Simple type, based on string, enumeration:
< Xs: simpletype Name = "Gender" >
< Xs: Restriction Base = "XS: string" >
< Xs: Enumeration Value = "Male" />
< Xs: Enumeration Value = "Female" />
</ Xs: Restriction >
</ Xs: simpletype >