<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Shang-Lin Chen (Caltech) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation>
			Draft of station XML schema.
		</xs:documentation>
	</xs:annotation>
	<!-- Root element -->
	<xs:element name="StaMessage">
		<xs:annotation>
			<xs:documentation>Station message</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Source" type="xs:string">
					<xs:annotation>
						<xs:documentation>Network ID of the institution sending the message.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Sender" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Name of the institution sending this message.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Module" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Name of the software module that generated this message.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Sent" type="xs:dateTime"/>
				<xs:element name="Action">
					<xs:simpleType>
						<xs:restriction base="xs:NMTOKEN">
							<xs:enumeration value="OPEN"/>
							<xs:enumeration value="CLOSE"/>
							<xs:enumeration value="UPDATE"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="ActionDate" type="xs:dateTime"/>
				<xs:element name="Station" type="sta_type" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!--
		 Additional complex types 
	-->
	<xs:complexType name="sta_type">
		<xs:annotation>
			<xs:documentation>Station container. Includes one or more epochs.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="StationID" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Station and network codes used to identify a station. Repeat as necessary if the station has aliases.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="NetCode">
							<xs:annotation>
								<xs:documentation>IRIS network code.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="2"/>
									<xs:pattern value="[\w]+"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="StaCode">
							<xs:annotation>
								<xs:documentation>Alphanumeric station code.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="5"/>
									<xs:pattern value="[\w]+"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="NetNumber" type="xs:integer" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Network number, used by some networks.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="StaNumber" type="xs:integer" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Station number, used by some networks.</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="primary" type="xs:boolean" use="optional" default="true"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="StaLat" type="lat_type"/>
			<xs:element name="StaLon" type="lon_type"/>
			<xs:element name="StaElev" type="distance_type"/>
			<xs:element name="Site">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Town" type="xs:string" minOccurs="0"/>
						<xs:element name="County" minOccurs="0"/>
						<xs:element name="State" minOccurs="0"/>
						<xs:element name="Country" default="USA"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="StaName">
				<xs:annotation>
					<xs:documentation>Common name used to refer to this station.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="40"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="StaDescription" minOccurs="0">
				<xs:annotation>
					<xs:documentation>
						Long description of the station's location, e.g. "20 miles west of Highway 40." 
					</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:maxLength value="80"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Installation" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Type of installation.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="BB_SEISMIC"/>
						<xs:enumeration value="SP_SEISMIC"/>
						<xs:enumeration value="SM_REFERENCE"/>
						<xs:enumeration value="SM_BUILDING"/>
						<xs:enumeration value="BB_PORTABLE"/>
						<xs:enumeration value="SP_PORTABLE"/>
						<xs:enumeration value="SP_ARRAY"/>
						<xs:enumeration value="LP_ARRAY"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Instrument" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Type of instrumentation.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="SPx1"/>
						<xs:enumeration value="SPx3"/>
						<xs:enumeration value="BBx1"/>
						<xs:enumeration value="BBx3"/>
						<xs:enumeration value="SMx1"/>
						<xs:enumeration value="SMx3"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<!-- What does instrument refer to? Number of instruments? -->
			<xs:element name="Vault" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Type of vault, e.g. WWSSN, tunnel, transportable array, etc.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Geology" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Type of rock and/or geologic formation.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="VelocityModel" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Local velocity model or V30 value.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SwapOrder32" type="endian_type" default="BIG_ENDIAN">
				<xs:annotation>
					<xs:documentation>Swap order in which 32-bit quantities are specified in data headers from this station.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SwapOrder16" type="endian_type" default="BIG_ENDIAN">
				<xs:annotation>
					<xs:documentation>Swap order in which 16-bit quantities are specified in data headers from this station.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<!-- Possible values? -->
			<xs:element name="Equipment" type="equip_type" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Equipment currently used by all channels in a station.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Operator" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>An operating agency and associated contact persons. If there multiple operators, each one should be encapsulated within an Operator tag. Since the Contact element is a generic type that represents any contact person, it also has its own optional Agency element. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Agency" type="xs:string" maxOccurs="unbounded"/>
						<xs:element name="Contact" type="person_type" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="StaCreationDate" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>Datetime (UTC) the station was created.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StaEndDate" type="xs:dateTime" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Datetime (UTC) the station was terminated or will be terminated. A blank value should be assumed to mean that the station is still active indefinitely.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StaDataless" type="xs:anyURI" minOccurs="0">
				<xs:annotation>
					<xs:documentation>URI of this stations dataless SEED volume.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StaComment" type="comment_type" minOccurs="0">
				<xs:annotation>
					<xs:documentation>General comment about the station.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="StaEpoch" type="epoch_type" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>
						Station epoch start and end dates and comments. Covers the start and end date in SEED blockette 50 and also SEED blockette 51.
					</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Channel" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>This container describes a channel and at least one of its epochs. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:group ref="chan_info"/>
						<xs:element name="ChnEpoch" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation>Covers SEED blockette 52 and the response blockettes.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:complexContent>
									<xs:extension base="epoch_type">
										<xs:group ref="chan_details"/>
									</xs:extension>
								</xs:complexContent>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:group name="chan_info">
		<xs:annotation>
			<xs:documentation>Elements that identify a channel. Corresponds to SEED blockette 52.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="ChnCode">
				<xs:annotation>
					<xs:documentation>Container for the channel's band code, instrument code, and orientation code. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Bandcode">
							<xs:simpleType>
								<xs:restriction base="xs:NMTOKEN">
									<xs:enumeration value="E"/>
									<xs:enumeration value="S"/>
									<xs:enumeration value="H"/>
									<xs:enumeration value="B"/>
									<xs:enumeration value="M"/>
									<xs:enumeration value="L"/>
									<xs:enumeration value="V"/>
									<xs:enumeration value="U"/>
									<xs:enumeration value="R"/>
									<xs:enumeration value="A"/>
									<xs:enumeration value="O"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="InstrCode">
							<xs:simpleType>
								<xs:restriction base="xs:NMTOKEN">
									<xs:enumeration value="H"/>
									<xs:enumeration value="L"/>
									<xs:enumeration value="G"/>
									<xs:enumeration value="M"/>
									<xs:enumeration value="N"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="OrntCode">
							<xs:simpleType>
								<xs:restriction base="xs:NMTOKEN">
									<xs:enumeration value="Z"/>
									<xs:enumeration value="E"/>
									<xs:enumeration value="N"/>
									<xs:enumeration value="U"/>
									<xs:enumeration value="V"/>
									<xs:enumeration value="W"/>
									<xs:enumeration value="1"/>
									<xs:enumeration value="2"/>
									<xs:enumeration value="3"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="LocCode">
				<xs:annotation>
					<xs:documentation>Two-character location code used to distinguish between identical channel codes at one station.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:maxLength value="2"/>
						<xs:pattern value="[\w\s]+"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ChnCreationDate" type="xs:dateTime">
				<xs:annotation>
					<xs:documentation>Datetime (UTC) this channel was first created.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ChnEndDate" type="xs:dateTime" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Datetime (UTC) this channel was terminated or will be terminated. If blank, the channel should be assumed to be active.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ChnDataless" type="xs:anyURI" minOccurs="0"/>
		</xs:sequence>
	</xs:group>
	<xs:group name="chan_details">
		<xs:annotation>
			<xs:documentation>Details about channels and their location and instrumentation, including response. Corresponds to SEED blockette 52 and the response blockettes.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="ChnLat" type="lat_type">
				<xs:annotation>
					<xs:documentation>Latitude coordinates of this channel's sensor.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ChnLon" type="lon_type">
				<xs:annotation>
					<xs:documentation>Longitude coordinates of this channel's sensor.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="ChnElev" type="distance_type">
				<xs:annotation>
					<xs:documentation>Elevation of the sensor.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Depth" type="distance_type">
				<xs:annotation>
					<xs:documentation>The local depth or overburden of the instrument's location. For downhole instruments, the depth of the instrument under the surface ground level. For underground vaults, the distance from the instrument to the local ground level above.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Azimuth" type="az_type" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Azimuth of the sensor in degrees from north, clockwise.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Dip" type="dip_type" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Dip of the instrument in degrees, down from horizontal.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Offset" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Sensor's north, east, and vertical offsets in meters. Corresponds to V0 real header parameters 50-52.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="North" type="distance_type"/>
						<xs:element name="East" type="distance_type"/>
						<xs:element name="Vertical" type="distance_type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Output" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The type of data this channel collects. Corresponds to channel flags in SEED blockette 52. The SEED volume producer could use the first letter of an Output value as the SEED channel flag.</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="TRIGGERED"/>
						<xs:enumeration value="CONTINUOUS"/>
						<xs:enumeration value="HEALTH"/>
						<xs:enumeration value="GEOPHYSICAL"/>
						<xs:enumeration value="WEATHER"/>
						<xs:enumeration value="FLAG"/>
						<xs:enumeration value="SYNTHESIZED"/>
						<xs:enumeration value="INPUT"/>
						<xs:enumeration value="EXPERIMENTAL"/>
						<xs:enumeration value="MAINTENANCE"/>
						<xs:enumeration value="BEAM"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="SampleRate" type="samplerate_type" minOccurs="0"/>
			<xs:element name="StorageFormat" type="xs:string" default="UNKNOWN" minOccurs="0"/>
			<xs:element name="Clockdrift" minOccurs="0">
				<xs:annotation>
					<xs:documentation>A tolerance value, measured in seconds per sample, used as a threshold for time error detection in data from the channel. </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:simpleContent>
						<xs:restriction base="float_type">
							<xs:minInclusive value="0"/>
							<xs:attribute name="unit" type="xs:string" use="optional" fixed="sec/sample"/>
						</xs:restriction>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="SignalUnit" type="sensor_unit" minOccurs="0"/>
			<xs:element name="CalibrationUnit" type="cal_unit" minOccurs="0"/>
			<xs:element name="BlocklengthExponent" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Record length of data from this channel, expressed as an exponent of 2. For example, if the blocklength is 256, use the value 8. Corresponds to V0 integer header parameter 35?</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:integer">
						<xs:minInclusive value="8"/>
						<xs:maxInclusive value="12"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="DataLogger" type="dlogger_type" minOccurs="0"/>
			<xs:element name="Sensor" type="sensor_type" minOccurs="0"/>
			<xs:element name="Response" type="response_type" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="ChnGain" type="gain_sens_type" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Channel gain. Corresponds to SEED blockette 58 for stage 0.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="epoch_type">
		<xs:annotation>
			<xs:documentation>This complex type describes time windows. It is used as a base type for station and channel epochs.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="EpochBegin" type="xs:dateTime"/>
			<xs:element name="EpochEnd" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="EpochComment" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- Equipment types. -->
	<xs:complexType name="equip_type">
		<xs:sequence>
			<xs:element name="EquipType" type="xs:string"/>
			<xs:element name="EquipDesc" type="xs:string" minOccurs="0"/>
			<xs:element name="Manufacturer" type="xs:string" minOccurs="0"/>
			<xs:element name="Vendor" type="xs:string" minOccurs="0"/>
			<xs:element name="Model" type="xs:string" minOccurs="0"/>
			<xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
			<xs:element name="Ondate" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="Offdate" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="CalibrationDate" type="xs:dateTime" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="dlogger_type">
		<xs:annotation>
			<xs:documentation>
				Datalogger complex type. It extends the equipment type. Covers recorder/datalogger parameters in V0.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="equip_type">
				<xs:sequence>
					<xs:element name="TotalChannels" type="counter_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Total number of channels recorded by datalogger. Corresponds to V0 integer header parameter 34.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="LeastSignificantBit" minOccurs="0">
						<xs:complexType>
							<xs:annotation>
								<xs:documentation>In micro-volts. Corresponds to V0 real header parameter 22.</xs:documentation>
							</xs:annotation>
							<xs:simpleContent>
								<xs:restriction base="float_type">
									<xs:attribute name="unit" use="optional" fixed="micro-volts"/>
									<xs:attributeGroup ref="uncertainty"/>
								</xs:restriction>
							</xs:simpleContent>
						</xs:complexType>
					</xs:element>
					<xs:element name="FullScaleInput" minOccurs="0">
						<xs:complexType>
							<xs:annotation>
								<xs:documentation>In Volts. Corresponds to V0 real header paramter 23.</xs:documentation>
							</xs:annotation>
							<xs:simpleContent>
								<xs:restriction base="float_type">
									<xs:minInclusive value="0"/>
									<xs:attribute name="unit" use="optional" fixed="Volts"/>
									<xs:attributeGroup ref="uncertainty"/>
								</xs:restriction>
							</xs:simpleContent>
						</xs:complexType>
					</xs:element>
					<xs:element name="PreTriggerTime" type="sec_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Pre-trigger memory recording time (secs). Corresponds to V0 real header parameter 24.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="PostDetriggerTime" type="sec_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Post-detrigger recording time (secs). Corresponds to V0 real header parameter 25.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="sensor_type">
		<xs:annotation>
			<xs:documentation>
				Complex type for all kinds of sensors. Extension of equip_type with special fields.
			</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="equip_type">
				<xs:sequence>
					<xs:element name="NaturalFrequency" type="freq_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Corresponds to V0 real parameter 40.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="DampingConstant" type="xs:double" minOccurs="0">
						<xs:annotation>
							<xs:documentation>
								Corresponds to SEED real parameter 41. 
							</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="FullScaleOutput" type="volt_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Corresponds to V0 real header parameter 43.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="FullScaleCapability" type="float_type" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Full scale sensing capability. Corresponds to V0 real parameter 44. </xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="response_type">
		<xs:annotation>
			<xs:documentation>
				Channel response. Covers SEED blockettes 53 to 56. 
			</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice>
				<xs:annotation>
					<xs:documentation>Choose one of these responses. There should be one response per stage.</xs:documentation>
				</xs:annotation>
				<!-- Poles and zeroes -->
				<xs:element name="PNZ" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Complex poles and zeros. Corresponds to SEED blockette 53.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Comment" type="comment_type" minOccurs="0"/>
							<xs:element name="InputUnits" type="pnz_output_unit" minOccurs="0"/>
							<xs:element name="OutputUnits" type="pnz_output_unit" default="COUNTS" minOccurs="0"/>
							<xs:element name="NormalizationFactor" type="xs:double" default="1.0"/>
							<xs:element name="Pole" type="pnz_type" minOccurs="0" maxOccurs="unbounded"/>
							<xs:element name="Zero" type="pnz_type" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- End PNZ -->
				<xs:element name="Coefficients" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Corresponds to SEED blockette 54.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ResponseType" type="stage_type"/>
							<xs:element name="InputUnits"/>
							<xs:element name="OutputUnits"/>
							<xs:element name="Numerator" type="float_type" minOccurs="0" maxOccurs="unbounded"/>
							<xs:element name="Denominator" type="float_type" minOccurs="0" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ResponseList" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Corresponds to SEED blockette 55.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ResponseListElement" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Frequency" type="freq_type"/>
										<xs:element name="Amplitude" type="float_type"/>
										<xs:element name="Phase" type="angle_type"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<!-- Generic response: highpass, lowpass, polynomials, etc. -->
				<xs:element name="Generic" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Generic response. Corresponds to SEED blockette 56. Corresponds to V0 parameters 60-62 (Filter/processing parameters)?</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="GenComment" type="xs:string" minOccurs="0"/>
							<xs:element name="InputUnits" type="sensitivity_unit"/>
							<xs:element name="OutputUnits" type="sensitivity_unit"/>
							<xs:element name="Sensitivity" type="float_type"/>
							<xs:element name="FreeFreq" type="freq_type"/>
							<!-- Highpass and lowpass response -->
							<xs:element name="Highpass"/>
							<xs:element name="Lowpass"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="FIR" minOccurs="0" maxOccurs="unbounded">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ResponseName" type="xs:string"/>
							<xs:element name="Symmetry">
								<xs:simpleType>
									<xs:restriction base="xs:NMTOKEN">
										<xs:enumeration value="NONE"/>
										<xs:enumeration value="EVEN"/>
										<xs:enumeration value="ODD"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="InputUnits" type="xs:string"/>
							<xs:element name="OutputUnits" type="xs:string"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:choice>
			<xs:element name="Decimation" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Corresponds to SEED blockette 57.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="InputSampleRate" type="freq_type"/>
						<xs:element name="Factor" type="xs:integer"/>
						<xs:element name="Offset" type="xs:integer"/>
						<xs:element name="Delay" type="float_type"/>
						<xs:element name="Correction" type="float_type"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="StageSensitivity" type="gain_sens_type">
				<xs:annotation>
					<xs:documentation>The gain at the stage of the encapsulating response element. Corresponds to SEED blockette 58.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Spectra" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Response spectrum values. Corresponds to the spectrum section in the V0 headers.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="NumberPeriods" type="counter_type"/>
						<xs:element name="NumberDampingValues" type="counter_type"/>
						<xs:element name="Sa" minOccurs="0" maxOccurs="4">
							<xs:annotation>
								<xs:documentation>Sa spectrum value at a certain period for 5% damping. Corresponds to V0 real header parameters 70-76.</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:complexContent>
									<xs:extension base="float_type">
										<xs:attribute name="period" type="xs:double"/>
									</xs:extension>
								</xs:complexContent>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="stage" type="counter_type" use="required">
			<xs:annotation>
				<xs:documentation>Stage sequence number. This is used in all the response SEED blockettes and in V0 parameter 60.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="stage_description" type="stage_type" use="optional">
			<xs:annotation>
				<xs:documentation>Describing the type of stage. Used in SEED response blockettes.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="pass_type">
		<xs:annotation>
			<xs:documentation>Pass response, containing corner frequency and roll off.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="CornerFreq" type="freq_type"/>
			<xs:element name="Roll">
				<xs:complexType>
					<xs:simpleContent>
						<xs:restriction base="float_type">
							<xs:attribute name="unit" type="xs:string" use="optional" default="dB/Octave"/>
							<xs:attributeGroup ref="uncertainty"/>
						</xs:restriction>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="Damping" type="xs:double"/>
			<xs:element name="Polenumber" type="counter_type"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="gain_sens_type">
		<xs:annotation>
			<xs:documentation>Gain and sensitivity values. Corresponds to SEED blockette 58.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="SensitivityValue" type="xs:double"/>
			<xs:element name="Frequency" type="float_type"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="log_type">
		<xs:annotation>
			<xs:documentation>Container for log entries.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Entry" type="comment_type" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="comment_type">
		<xs:annotation>
			<xs:documentation>Container for a comment or log entry.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Value" type="xs:string"/>
			<xs:element name="Author" type="person_type" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Date" type="xs:dateTime" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:integer"/>
	</xs:complexType>
	<!-- The following elements represent numbers. -->
	<xs:attributeGroup name="uncertainty">
		<xs:annotation>
			<xs:documentation>Expressing uncertainties or errors with a positive and a negative component. Both values should be given as positive integers, but minus_error is understood to actually be negative.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="plus_error" type="xs:integer" use="optional"/>
		<xs:attribute name="minus_error" type="xs:integer" use="optional"/>
	</xs:attributeGroup>
	<xs:complexType name="float_nounit_type">
		<xs:simpleContent>
			<xs:extension base="xs:double">
				<xs:attributeGroup ref="uncertainty"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="float_type">
		<xs:annotation>
			<xs:documentation>Representation of floating-point numbers used as measurements.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:double">
				<xs:attribute name="unit" use="optional"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<!-- Derived from float_type. -->
	<xs:complexType name="sec_type">
		<xs:annotation>
			<xs:documentation>A time value in seconds.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:attribute name="unit" type="xs:string" fixed="seconds"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="volt_type">
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:attribute name="unit" fixed="Volts"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="angle_type">
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:minInclusive value="-360"/>
				<xs:maxInclusive value="360"/>
				<xs:attribute name="unit" type="xs:string" use="optional" fixed="degrees"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="lat_dummy_type">
		<xs:annotation>
			<xs:documentation>"Dummy" latitude type. Because of the limitations of schema, defining this type and then extending it to create the real latitude type is the only way to restrict values while adding datum as an attribute.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:minInclusive value="-90"/>
				<xs:maxExclusive value="90"/>
				<xs:attribute name="unit" type="xs:string" use="optional" fixed="degrees"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="lat_type">
		<xs:annotation>
			<xs:documentation>Type for latitude coordinates.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="lat_dummy_type">
				<xs:attribute name="datum" type="xs:NMTOKEN" use="optional" default="WGS84"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="lon_dummy_type">
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:minInclusive value="-180"/>
				<xs:maxInclusive value="180"/>
				<xs:attribute name="unit" use="optional" fixed="degrees"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="lon_type">
		<xs:annotation>
			<xs:documentation>Type for longitude coordinates.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="lon_dummy_type">
				<xs:attribute name="datum" type="xs:NMTOKEN" use="optional" default="WGS84"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="az_type">
		<xs:annotation>
			<xs:documentation>Instrument azimuth, measured from north.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:minInclusive value="0"/>
				<xs:maxExclusive value="360"/>
				<xs:attribute name="unit" type="xs:string" use="optional" fixed="degrees"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="dip_type">
		<xs:annotation>
			<xs:documentation>Instrument dip in degrees down from horizontal. Together azimuth and dip describe the direction of the sensitive axis of the instrument.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:minInclusive value="-90"/>
				<xs:maxInclusive value="90"/>
				<xs:attribute name="unit" use="optional" fixed="degrees"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="distance_type">
		<xs:annotation>
			<xs:documentation>Extension of float_type for distances, elevations, and depths.</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:attribute name="unit" type="xs:string" use="optional" default="meters"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="freq_type">
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:attribute name="unit" use="optional" fixed="Hz"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="gain_type">
		<xs:simpleContent>
			<xs:extension base="xs:double">
				<xs:attribute name="nominal" type="nominal_type" default="NOMINAL"/>
				<xs:attribute name="unit" type="xs:string" default="dB/ocatve"/>
				<xs:attributeGroup ref="uncertainty"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="samplerate_type">
		<xs:simpleContent>
			<xs:restriction base="float_type">
				<xs:attribute name="unit" use="optional" fixed="samples/second"/>
			</xs:restriction>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="pnz_type">
		<xs:annotation>
			<xs:documentation>Complex numbers used as poles or zeros in channel response.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Real" type="float_nounit_type"/>
			<xs:element name="Imaginary" type="float_nounit_type"/>
		</xs:sequence>
		<xs:attribute name="number" type="xs:integer"/>
	</xs:complexType>
	<!-- Positive integers used as counters for stage numbers, component numbers, etc. -->
	<xs:simpleType name="counter_type">
		<xs:restriction base="xs:integer">
			<xs:minInclusive value="0"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="person_type">
		<xs:annotation>
			<xs:documentation>Representation of a person's contact information. A person can belong to multiple agencies and have multiple email addresses and phone numbers.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Name" type="xs:string"/>
			<xs:element name="Agency" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Email" type="email_type" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Phone" type="phone_type" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- Simple types -->
	<xs:simpleType name="sens_comp_type">
		<xs:restriction base="xs:string">
			<xs:enumeration value="E"/>
			<xs:enumeration value="N"/>
			<xs:enumeration value="Z"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="nominal_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="NOMINAL"/>
			<xs:enumeration value="CALCULATED"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="gain_unit">
		<xs:restriction base="xs:string">
			<xs:enumeration value="V/M/S"/>
			<xs:enumeration value="V/M/S**2"/>
			<xs:enumeration value="COUNTS/CM/SEC"/>
			<xs:enumeration value="COUNTS/CM/SEC**2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="sensitivity_unit">
		<xs:restriction base="xs:string">
			<xs:enumeration value="COUNTS/NM"/>
			<xs:enumeration value="M/M"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="pnz_output_unit">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="COUNTS"/>
			<xs:enumeration value="V"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="sensor_unit">
		<xs:restriction base="xs:string">
			<xs:enumeration value="V"/>
			<xs:enumeration value="G"/>
			<xs:enumeration value="M/S"/>
			<xs:enumeration value="M/S**2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="cal_unit">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Amperes"/>
			<xs:enumeration value="Counts"/>
			<xs:enumeration value="Volts"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="email_type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[\w\.\-_]+@[\w\.\-_]+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="phone_type">
		<xs:sequence>
			<xs:element name="CountryCode" type="xs:integer" default="1" minOccurs="0"/>
			<xs:element name="AreaCode" type="xs:integer"/>
			<xs:element name="PhoneNumber" type="xs:integer"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="endian_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="BIG_ENDIAN"/>
			<xs:enumeration value="LITTLE_ENDIAN"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="stage_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="LAPLACE">
				<xs:annotation>
					<xs:documentation>Laplace transform analog response, in rad/sec.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="HERTZ">
				<xs:annotation>
					<xs:documentation>Analog response in Hz.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="COMPOSITE">
				<xs:annotation>
					<xs:documentation> Composite (currently undefined)</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DIGITAL">
				<xs:annotation>
					<xs:documentation>Digital (Z-transform)</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
