Page

Create Schema For Employee Store In XML

<?xml version="1.0" encoding="iso-8859-1"?>
<xs:schema xmlns:xs="  ">
<xs:complexType name="Emp_Details">
<xs:sequence>

            <xs:element name="ename" type="xs:string">
            <xs:restriction base="xs:string">
            </xs:restriction>
            </xs:element>
                                    <xs:complexType name="childrenset">
                                    <xs:sequence>
                                    <xs:element name="setofchildren" type="xs:string">
                                    <xs:restriction base="xs:string">
                                    <xs:pattern value="{Male|Female}+">
                                    </xs:pattern>
                                    </xs:restriction>
                                    </xs:element>
                                                <xs:complexType name="setofchildren">
                                                <xs:sequence>
                                                <xs:element name="children_name" type="xs:string">
                                                <xs:restriction base="xs:string">
                                                <xs:pattern value="{a-zA-Z}+">
                                                </xs:pattern>
                                                </xs:restriction>
                                                </xs:element>
                                                                                                                                                            <xs:complexType name="birthday">
                                                                                                                                                <xs:sequence>
                                                                                                                                                <xs:element name="day" type="xs:integer">
                                                                                                                                                <xs:restriction base="xs:integer">
           <xs:pattern value="{1-31}+">
                                                                                                                                                </xs:pattern>
                                                                                                                                                </xs:restriction>
                                                                                                                                                </xs:element>
                                                                                                                                                <xs:element name="month" type="xs:integer">
                                                                                                                                                <xs:restriction base="xs:integer">
            <xs:pattern value="{1-12}+">
                                                                                                                                                </xs:pattern>
                                                                                                                                                </xs:restriction>
                                                                                                                                                </xs:element>
                                                                                                                                                <xs:element name="year" type="xs:integer">
                                                                                                                                                <xs:restriction base="xs:integer">
            <xs:pattern value="{0-90-90-90-9}+">
                                                                                                                                                </xs:pattern>
                                                                                                                                                </xs:restriction>
                                                                                                                                                </xs:element>
                                                                                                                                                </xs:sequence>
                                                            </xs:complexType>
                                                            </xs:sequence>
                                                            </xs:complexType>
                                                </xs:sequence>
                                                            </xs:complexType>
           
            <xs:complexType name="skill_test">
                                                            <xs:sequence>
                                                            <xs:element name="type" type="xs:string">
                                    <xs:restriction base="xs:string">
                                    <xs:pattern value="(IT|MECH|OTHER)+">
                                    </xs:pattern>
                                    </xs:restriction>
                                    </xs:element>
                                                <xs:complexType name="exam_set">
                                    <xs:sequence>
                                    <xs:element name="year" type="xs:integer">
                                    <xs:restriction base="xs:integer">
                                    <xs:pattern value="(2000-2014)+">
                                    </xs:pattern>
                                    </xs:restriction>
                                    </xs:element>
                                    <xs:element name="city" type="xs:string">
                                    <xs:restriction base="xs:string">
                                    <xs:pattern value="{delhi|chandigarh|dehradun|shimla|jammu}+">
                                    </xs:pattern>
                                    </xs:restriction>
                                    </xs:element>
                                    <xs:element name="name" type="xs:string">
                                    <xs:restriction base="xs:string">
                                    <xs:pattern value="(a-zA-Z)+">
                                    </xs:pattern>
                                    </xs:restriction>
                                    </xs:element>
                            </xs:sequence>
                                    </xs:complexType>
                                    </xs:sequence>
                                    </xs:complexType>                
                                    </xs:sequence>
                                    </xs:complexType>    

                                    </xs:schema>

No comments:

Post a Comment