summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/java-stable-20060304/das/rdb/src/test/resources/company.xsd
blob: 44bc2bd3aac8cb50948ca8d393fdfc08fd24e9ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="org.apache.tuscany.das.rdb.test/company.xsd" 
	xmlns:company="org.apache.tuscany.das.rdb.test/company.xsd" 
		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
		
	<xsd:complexType name="DatagraphRoot">		
	 	<xsd:sequence>	 	
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="companies" type="company:CompanyType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="departments" type="company:DepartmentType"/>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="employees" type="company:EmployeeType"/>
    	</xsd:sequence>
	</xsd:complexType>
	
      <xsd:element name="company" type="company:CompanyType"/>
      
      <xsd:complexType name="CompanyType">
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" name="departments" type="company:DepartmentType"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string"/>
        <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" ecore:reference="EmployeeType"/>
      </xsd:complexType>
      
      <xsd:complexType name="DepartmentType">
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" name="employees" type="company:EmployeeType"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string"/>
        <xsd:attribute name="location" type="xsd:string"/>
        <xsd:attribute name="number" type="xsd:int"/>
      </xsd:complexType>
      <xsd:complexType name="EmployeeType">
        <xsd:attribute name="name" type="xsd:string"/>
        <xsd:attribute name="SN" type="xsd:ID"/>
        <xsd:attribute name="manager" type="xsd:boolean"/>
      </xsd:complexType>
    </xsd:schema>