Semantic Web Technologies: XML, RDF, OWL
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- A telephone number contains three parts--> <!-- This is the schema --> <xsd:complexType name="telephoneNumber"> <xsd:sequence> <xsd:element name="area"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{3}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="exchange"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{3}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="number"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{4}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <!--An instance of this phonenumber would look like--> <telephone xsi:type="abc:telephoneNumber"> <area>123</area> <exchange>123</exchange> <number>1234</number> </telephone>
11 of 41