<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="pijace">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="pijaca">  
        <xs:complexType>
          <xs:sequence>
            <xs:element name="naziv" type="xs:string"/>
			<xs:element name = "tezga" minOccurs = "1" maxOccurs = "20"> 
				<xs:complexType>
					<xs:sequence>
						<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
						<xs:element name="brojprodavaca">
							<xs:simpleType>
								<xs:restriction base="xs:integer">
									<xs:minInclusive value="1"/>
									<xs:maxInclusive value="5"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name = "prodavac" minOccurs = "1" maxOccurs = "5"> 
							<xs:complexType>
								<xs:sequence>
									<xs:element name="ime" type="xs:string"/>
									<xs:element name="prezime" type="xs:string"/>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						<xs:element name="vremeod" type="xs:time"/>
						<xs:element name="vremedo" type="xs:time"/>
						<xs:element name = "proizvodi"> 
							<xs:complexType>
								<xs:sequence>
									<xs:element name = "voce"> 
										<xs:complexType>
											<xs:sequence>
												<xs:element name = "vocka" minOccurs = "1" maxOccurs = "10"> 
													<xs:complexType>
														<xs:sequence>
															<xs:element name="ime" type="xs:string"/>
														</xs:sequence>
													</xs:complexType>
												</xs:element>
											</xs:sequence>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
						
					</xs:sequence>
				</xs:complexType>
			</xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>