<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2015 rel. 4 sp1 (x64) (http://www.altova.com) by KUO CHEN WANG (Ministry of Transportation and Communications) -->
<xs:schema xmlns="http://ptx.transportdata.tw/standard/schema/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ptx.transportdata.tw/standard/schema/" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.0" id="ptx_bus">
	<!--=======[Dependencies]=======-->
	<xs:include schemaLocation="../1stLayer.xsd"/>
	<!--=======[2nd Layer BikeData Type]=======-->
	<xs:import/>
	<xs:complexType name="BikeStationType">
		<xs:annotation>
			<xs:documentation>自行車站點資料型別</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="StationUID" type="xs:string">
				<xs:annotation>
					<xs:documentation>PTX站點獨一代碼</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationID" type="xs:string">
				<xs:annotation>
					<xs:documentation>地區既用中之站點代號</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Authority" type="AuthorityType" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>業管單位資料</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationName" type="NameType">
				<xs:annotation>
					<xs:documentation>站點名稱</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationPosition" type="PointType">
				<xs:annotation>
					<xs:documentation>站點位置</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationAddress" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>站點地址</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StationDescription" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>站點詳細說明描述</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="BikesCapacity" type="xs:int">
				<xs:annotation>
					<xs:documentation>可容納之自行車總數</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--=======[Dynamic Bike Data Type ]=======-->
	<xs:complexType name="BikeAvailabilityType">
		<xs:annotation>
			<xs:documentation>自行車服務狀態資料型別</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="BikeStation" type="BikeStationType">
				<xs:annotation>
					<xs:documentation>車站資料</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ServiceStatus" type="xs:boolean">
				<xs:annotation>
					<xs:documentation>服務狀態(0:停止營運；1:正常營運)</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="AvailableRentBikes" type="xs:integer">
				<xs:annotation>
					<xs:documentation>可租借車數</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="AvailableReturnBikes" type="xs:integer">
				<xs:annotation>
					<xs:documentation>可歸還車數</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="UpdateTime" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>訊息更新時間</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--=======[Bike Data List Type]=======-->
	<xs:complexType name="BikeStationListType">
		<xs:annotation>
			<xs:documentation>自行車站點資料清單型別</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="UpdateTime" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>資料更新時間</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="BikeStations">
				<xs:annotation>
					<xs:documentation>自行車站點資料</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="BikeStation" type="BikeStationType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="BikeAvailabilityListType">
		<xs:annotation>
			<xs:documentation>自行車服務狀態資料清單型別</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="UpdateTime" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>資料更新時間</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="BikeStations">
				<xs:annotation>
					<xs:documentation>自行車服務狀態</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="BikeStation" type="BikeAvailabilityType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--=======[ Element Group]=======-->
	<!--=======[Bike Data List Type]=======-->
	<xs:element name="BikeAllDataList">
		<xs:annotation>
			<xs:documentation>自行車運具資料集清單</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="BikeStationList" type="BikeStationListType">
					<xs:annotation>
						<xs:documentation>自行車站點資料清單</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="BikeAvailabilityList" type="BikeAvailabilityListType">
					<xs:annotation>
						<xs:documentation>自行車服務狀態資料清單</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="FeedInfo" type="FeedInfoType">
					<xs:annotation>
						<xs:documentation>資料版本說明</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
