Skip to content

Instantly share code, notes, and snippets.

@megies
Created November 23, 2013 16:01
Show Gist options
  • Save megies/7616294 to your computer and use it in GitHub Desktop.
Save megies/7616294 to your computer and use it in GitHub Desktop.
modifications to fdsn-station-1.0.xsd for generating a useful full random stationXML file
--- fdsn-station-1.0.xsd 2013-11-23 16:55:41.423403285 +0100
+++ /home/megies/git/obspy/obspy/station/docs/fdsn-station-1.0.xsd 2013-11-23 16:42:05.043582600 +0100
@@ -60,19 +60,19 @@
message.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Sender" type="xs:string" minOccurs="1">
+ <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="1">
+ <xs:element name="Module" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Name of the software module that generated this document.
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="ModuleURI" type="xs:anyURI" minOccurs="1">
+ <xs:element name="ModuleURI" type="xs:anyURI" minOccurs="0">
<xs:annotation>
<xs:documentation> This is the address of the query that generated the document,
or, if applicable, the address of the software that generated this document.
@@ -101,14 +101,14 @@
<xs:complexContent>
<xs:extension base="fsx:BaseNodeType">
<xs:sequence>
- <xs:element name="TotalNumberStations" type="fsx:CounterType" minOccurs="1">
+ <xs:element name="TotalNumberStations" type="fsx:CounterType" minOccurs="0">
<xs:annotation>
<xs:documentation> The total number of stations contained in this
network, including inactive or terminated stations.
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="SelectedNumberStations" type="fsx:CounterType" minOccurs="1">
+ <xs:element name="SelectedNumberStations" type="fsx:CounterType" minOccurs="0">
<xs:annotation>
<xs:documentation> The total number of stations in this network that
were selected by the query that produced this document, even if the
@@ -117,7 +117,7 @@
the Network level.) </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Station" type="fsx:StationType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Station" type="fsx:StationType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -141,25 +141,25 @@
etc.).</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Vault" type="xs:string" minOccurs="1">
+ <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="1">
+ <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="Equipment" type="fsx:EquipmentType" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="Equipment" type="fsx:EquipmentType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Equipment used by all channels at a
station.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Operator" minOccurs="1" maxOccurs="unbounded">
+ <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
@@ -170,8 +170,8 @@
<xs:complexType>
<xs:sequence>
<xs:element name="Agency" type="xs:string" maxOccurs="unbounded"/>
- <xs:element name="Contact" type="fsx:PersonType" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="WebSite" type="xs:anyURI" minOccurs="1"/>
+ <xs:element name="Contact" type="fsx:PersonType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="WebSite" type="xs:anyURI" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -181,33 +181,33 @@
installed.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="TerminationDate" type="xs:dateTime" minOccurs="1">
+ <xs:element name="TerminationDate" type="xs:dateTime" minOccurs="0">
<xs:annotation>
<xs:documentation>Date and time (UTC) when the station was terminated or
will be terminated. A blank value should be assumed to mean that the
station is still active.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="TotalNumberChannels" type="fsx:CounterType" minOccurs="1">
+ <xs:element name="TotalNumberChannels" type="fsx:CounterType" minOccurs="0">
<xs:annotation>
<xs:documentation>Total number of channels recorded at this
station.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="SelectedNumberChannels" type="fsx:CounterType" minOccurs="1">
+ <xs:element name="SelectedNumberChannels" type="fsx:CounterType" minOccurs="0">
<xs:annotation>
<xs:documentation>Number of channels recorded at this station and
selected by the query that produced this
document.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="ExternalReference" type="fsx:ExternalReferenceType" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="ExternalReference" type="fsx:ExternalReferenceType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URI of any type of external report, such as IRIS data
reports or dataless SEED volumes.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Channel" type="fsx:ChannelType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Channel" type="fsx:ChannelType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -221,7 +221,7 @@
<xs:complexContent>
<xs:extension base="fsx:BaseNodeType">
<xs:sequence>
- <xs:element name="ExternalReference" type="fsx:ExternalReferenceType" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="ExternalReference" type="fsx:ExternalReferenceType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>URI of any type of external report, such as data
quality reports.</xs:documentation>
@@ -253,19 +253,19 @@
above.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Azimuth" type="fsx:AzimuthType" minOccurs="1">
+ <xs:element name="Azimuth" type="fsx:AzimuthType" 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="fsx:DipType" minOccurs="1">
+ <xs:element name="Dip" type="fsx:DipType" minOccurs="0">
<xs:annotation>
<xs:documentation>Dip of the instrument in degrees, down from
horizontal</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Type" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="Type" 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
@@ -288,14 +288,14 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:group ref="fsx:SampleRateGroup" minOccurs="1"/>
- <xs:element name="StorageFormat" type="xs:string" minOccurs="1">
+ <xs:group ref="fsx:SampleRateGroup" minOccurs="0"/>
+ <xs:element name="StorageFormat" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The storage format of the recorded data (e.g.
SEED).</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="ClockDrift" minOccurs="1">
+ <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
@@ -310,12 +310,12 @@
</xs:simpleContent>
</xs:complexType>
</xs:element>
- <xs:element name="CalibrationUnits" type="fsx:UnitsType" minOccurs="1"/>
- <xs:element name="Sensor" type="fsx:EquipmentType" minOccurs="1"/>
- <xs:element name="PreAmplifier" type="fsx:EquipmentType" minOccurs="1"/>
- <xs:element name="DataLogger" type="fsx:EquipmentType" minOccurs="1"/>
- <xs:element name="Equipment" type="fsx:EquipmentType" minOccurs="1"/>
- <xs:element name="Response" type="fsx:ResponseType" minOccurs="1"/>
+ <xs:element name="CalibrationUnits" type="fsx:UnitsType" minOccurs="0"/>
+ <xs:element name="Sensor" type="fsx:EquipmentType" minOccurs="0"/>
+ <xs:element name="PreAmplifier" type="fsx:EquipmentType" minOccurs="0"/>
+ <xs:element name="DataLogger" type="fsx:EquipmentType" minOccurs="0"/>
+ <xs:element name="Equipment" type="fsx:EquipmentType" minOccurs="0"/>
+ <xs:element name="Response" type="fsx:ResponseType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="locationCode" type="xs:string" use="required"/>
</xs:extension>
@@ -381,7 +381,7 @@
correcting for this response. </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:group ref="fsx:FrequencyRangeGroup" minOccurs="1">
+ <xs:group ref="fsx:FrequencyRangeGroup" minOccurs="0">
<xs:annotation>
<xs:documentation>The frequency range for which the SensitivityValue is
valid within the dB variation specified.</xs:documentation>
@@ -393,15 +393,15 @@
</xs:complexType>
<xs:complexType name="EquipmentType">
<xs:sequence>
- <xs:element name="Type" type="xs:string" minOccurs="1"/>
- <xs:element name="Description" type="xs:string" minOccurs="1"/>
- <xs:element name="Manufacturer" type="xs:string" minOccurs="1"/>
- <xs:element name="Vendor" type="xs:string" minOccurs="1"/>
- <xs:element name="Model" type="xs:string" minOccurs="1"/>
- <xs:element name="SerialNumber" type="xs:string" minOccurs="1"/>
- <xs:element name="InstallationDate" type="xs:dateTime" minOccurs="1"/>
- <xs:element name="RemovalDate" type="xs:dateTime" minOccurs="1"/>
- <xs:element name="CalibrationDate" type="xs:dateTime" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Type" type="xs:string" minOccurs="0"/>
+ <xs:element name="Description" 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="InstallationDate" type="xs:dateTime" minOccurs="0"/>
+ <xs:element name="RemovalDate" type="xs:dateTime" minOccurs="0"/>
+ <xs:element name="CalibrationDate" type="xs:dateTime" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="resourceId" type="xs:string" use="optional">
@@ -433,7 +433,7 @@
<xs:element name="FIR" type="fsx:FIRType"/>
<xs:element name="Polynomial" type="fsx:PolynomialType"/>
</xs:choice>
- <xs:element name="Decimation" type="fsx:DecimationType" minOccurs="1"/>
+ <xs:element name="Decimation" type="fsx:DecimationType" minOccurs="0"/>
<xs:element name="StageGain" type="fsx:GainType">
<xs:annotation>
<xs:documentation>StageSensitivity is the gain at the stage of the encapsulating
@@ -474,9 +474,9 @@
</xs:annotation>
<xs:sequence>
<xs:element name="Value" type="xs:string"/>
- <xs:element name="BeginEffectiveTime" type="xs:dateTime" minOccurs="1"/>
- <xs:element name="EndEffectiveTime" type="xs:dateTime" minOccurs="1"/>
- <xs:element name="Author" type="fsx:PersonType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="BeginEffectiveTime" type="xs:dateTime" minOccurs="0"/>
+ <xs:element name="EndEffectiveTime" type="xs:dateTime" minOccurs="0"/>
+ <xs:element name="Author" type="fsx:PersonType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="fsx:CounterType"/>
</xs:complexType>
@@ -499,8 +499,8 @@
</xs:element>
<xs:element name="NormalizationFactor" type="xs:double" default="1.0"/>
<xs:element name="NormalizationFrequency" type="fsx:FrequencyType"/>
- <xs:element name="Zero" type="fsx:PoleZeroType" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="Pole" type="fsx:PoleZeroType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Zero" type="fsx:PoleZeroType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Pole" type="fsx:PoleZeroType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -522,7 +522,7 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="NumeratorCoefficient" minOccurs="1" maxOccurs="unbounded">
+ <xs:element name="NumeratorCoefficient" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:double">
@@ -553,8 +553,8 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="Numerator" type="fsx:FloatType" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="Denominator" type="fsx:FloatType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Numerator" type="fsx:FloatType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Denominator" type="fsx:FloatType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -574,7 +574,7 @@
<xs:complexContent>
<xs:extension base="fsx:BaseFilterType">
<xs:sequence>
- <xs:element name="ResponseListElement" type="fsx:ResponseListElementType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="ResponseListElement" type="fsx:ResponseListElementType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -786,7 +786,7 @@
</xs:annotation>
<xs:sequence>
<xs:element name="SampleRate" type="fsx:SampleRateType"/>
- <xs:element name="SampleRateRatio" type="fsx:SampleRateRatioType" minOccurs="1"/>
+ <xs:element name="SampleRateRatio" type="fsx:SampleRateRatioType" minOccurs="0"/>
</xs:sequence>
</xs:group>
<xs:complexType name="SampleRateType">
@@ -835,10 +835,10 @@
numbers.</xs:documentation>
</xs:annotation>
<xs:sequence>
- <xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="Agency" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="Email" type="fsx:EmailType" minOccurs="1" maxOccurs="unbounded"/>
- <xs:element name="Phone" type="fsx:PhoneNumberType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Name" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Agency" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Email" type="fsx:EmailType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Phone" type="fsx:PhoneNumberType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SiteType">
@@ -853,26 +853,26 @@
SEED blockette 50, field 9. </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Description" type="xs:string" minOccurs="1">
+ <xs:element name="Description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation> A longer description of the location of this station, e.g.
"NW corner of Yellowstone National Park" or "20 miles west of Highway 40."
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Town" type="xs:string" minOccurs="1">
+ <xs:element name="Town" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation> The town or city closest to the station.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="County" type="xs:string" minOccurs="1"/>
- <xs:element name="Region" type="xs:string" minOccurs="1">
+ <xs:element name="County" type="xs:string" minOccurs="0"/>
+ <xs:element name="Region" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation> The state, province, or region of this
site.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Country" type="xs:string" minOccurs="1"/>
+ <xs:element name="Country" type="xs:string" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
@@ -901,7 +901,7 @@
</xs:simpleType>
<xs:complexType name="PhoneNumberType">
<xs:sequence>
- <xs:element name="CountryCode" type="xs:integer" minOccurs="1"/>
+ <xs:element name="CountryCode" type="xs:integer" minOccurs="0"/>
<xs:element name="AreaCode" type="xs:integer"/>
<xs:element name="PhoneNumber">
<xs:simpleType>
@@ -931,7 +931,7 @@
<xs:documentation>Name of units, e.g. "M/S", "V", "PA".</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Description" type="xs:string" minOccurs="1">
+ <xs:element name="Description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Description of units, e.g. "Velocity in meters per second",
"Volts", "Pascals".</xs:documentation>
@@ -944,7 +944,7 @@
<xs:documentation> The BaseFilterType is derived by all filters. </xs:documentation>
</xs:annotation>
<xs:sequence>
- <xs:element name="Description" type="xs:string" minOccurs="1"/>
+ <xs:element name="Description" type="xs:string" minOccurs="0"/>
<xs:element name="InputUnits" type="fsx:UnitsType">
<xs:annotation>
<xs:documentation> The units of the data as input from the perspective of data
@@ -975,14 +975,14 @@
</xs:complexType>
<xs:complexType name="ResponseType">
<xs:sequence>
- <xs:choice minOccurs="1">
+ <xs:choice minOccurs="0">
<xs:annotation>
<xs:documentation>Instrument sensitivities, or the complete system sensitivity,
can be expressed using either a sensitivity value or a polynomial. The
information can be used to convert raw data to Earth at a specified
frequency or within a range of frequencies. </xs:documentation>
</xs:annotation>
- <xs:element name="InstrumentSensitivity" type="fsx:SensitivityType">
+ <xs:element name="InstrumentSensitivity" type="fsx:SensitivityType" minOccurs="0">
<xs:annotation>
<xs:documentation> The total sensitivity for a channel, representing the
complete acquisition system expressed as a scalar. Equivalent to SEED
@@ -990,7 +990,7 @@
range. </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="InstrumentPolynomial" type="fsx:PolynomialType">
+ <xs:element name="InstrumentPolynomial" type="fsx:PolynomialType" minOccurs="0">
<xs:annotation>
<xs:documentation> The total sensitivity for a channel, representing the
complete acquisition system expressed as a polynomial. Equivalent to
@@ -998,7 +998,7 @@
</xs:annotation>
</xs:element>
</xs:choice>
- <xs:element name="Stage" type="fsx:ResponseStageType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Stage" type="fsx:ResponseStageType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="resourceId" type="xs:string">
@@ -1014,8 +1014,8 @@
types.</xs:documentation>
</xs:annotation>
<xs:sequence>
- <xs:element name="Description" type="xs:string" minOccurs="1"/>
- <xs:element name="Comment" type="fsx:CommentType" minOccurs="1" maxOccurs="unbounded"/>
+ <xs:element name="Description" type="xs:string" minOccurs="0"/>
+ <xs:element name="Comment" type="fsx:CommentType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
@@ -1036,4 +1036,4 @@
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment