1 / 4

Homelist Schema Example

Homelist Schema Example. <?xml version="1.0" ?> <xs:schema xmlns:xs= "http://www.w3.org/2001/XMLSchema"> <xs:element name="homelist"> <xs:complexType> <xs:sequence> <xs:element name="home" maxOccurs = " unbounded " > details of the home element -pto

paytah
Download Presentation

Homelist Schema Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Homelist Schema Example <?xml version="1.0" ?> <xs:schema xmlns:xs= "http://www.w3.org/2001/XMLSchema"> <xs:element name="homelist"> <xs:complexType> <xs:sequence> <xs:element name="home" maxOccurs = " unbounded " > details of the home element -pto </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

  2. Homelist Example Continued Details of the home element <xs:element name="home" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name ="hname" type="xs:string"/> <xs:element name = "location" type="xs:string" /> <xs:element name = "contactdetails" minOccurs= "1" maxOccurs="3"> details of the contact details element -pto </xs:element> </xs:sequence> <xs:attribute name= "id" type="xs:string" use="required"/> </xs:complexType> </xs:element>

  3. Homelist Example Continued Details of the contact details element <xs:element name = "contactdetails" minOccurs="1" maxOccurs="3"> <xs:complexType> <xs:sequence> <xs:element name ="cname" type="xs:string"/> <xs:element name = "phone" type="xs:string" /> <xs:element name = "email" type="xs:string minOccurs= "0" maxOccurs="1"/> <xs:element name = "url" type="xs:string minOccurs= "0" maxOccurs="1"/> </xs:sequence> </xs:complexType> </xs:element>

  4. Answer 2 <xs:simpleType name = “teltype"> <xs:restriction base="xs:integer"> <xs:minInclusive value=“1000"/> <xs:maxInclusive value=“9999"/> </xs:restriction> </xs:simpleType> And in the person complex type <xs:element name = "tel" type= "teltype" minOccurs= "1" maxOccurs= "4"/>

More Related