Description

The XSD below describes the complexTypes, elements, attributes and the nesting of the elements for the Organization XML documents.


XML Schema Definition

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" version="1.0">
    <xs:element name="organization-document" type="create-document"/>
    <xs:complexType name="create-document">
        <xs:sequence>
            <xs:element name="organization" type="organization"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="organization">
        <xs:sequence> 
            <xs:element name="name" type="xs:string"/>
            <xs:element name="departments" type="departments"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="departments">
        <xs:sequence> 
            <xs:element name="department" type="department"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="department">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="users" type="users"/>
        </xs:sequence>
        <xs:attribute name="phoneNumber" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="users">
        <xs:sequence>
            <xs:element name="user" type="user"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="user">
        <xs:sequence>
            <xs:element name="firstName" type="xs:string"/>
            <xs:element name="lastName" type="xs:string"/>
            <xs:element name="middleInitial" type="xs:string"/>
            <xs:element name="username" type="xs:string"/>
            <xs:element name="password" type="xs:string"/>
            <xs:element name="ssn" type="xs:string"/>
            <xs:element name="cardNumber" type="xs:string"/>
            <xs:element name="phoneNumber" type="xs:string"/>
            <xs:element name="addresses" type="addresses"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="addresses">
        <xs:sequence>
            <xs:element name="address" type="address"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="address">
        <xs:sequence>
            <xs:element name="address" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="city" type="xs:string"/>
        <xs:attribute name="state" type="xs:string"/>
        <xs:attribute name="zip" type="xs:string"/>
    </xs:complexType>
</xs:schema>


Graphical Presentation