Skip to content

[Historical] Original Rule Set

TRonan edited this page Aug 2, 2018 · 1 revision

Original Rule Set

The following chart outlines the various code numbers and associated rules used by the StationXML-Validator.

Also included are the filenames for test cases that correspond to a specific rule.

Error Code Rule Description
Network level validation
101 Network attribute 'code' cannot be null
102 Network attribute 'code' must consist of a two-character string
103 Network element 'startDate' is required
105 Network element 'startDate' must occur before Network element 'endDate', if 'endDate' is available
152 Station epochs cannot overlap in time
Station level validation
201 Station attribute 'code' cannot be null
202 Station code too long, empty string, or wrong characters
203 Station startDate required
205 Station startDate < endDate when endDate is available
206 Station latitude invalid
207 Station longitude invalid
209 Station creation time must exist
210 Station elevation must be equal to or above Channel elevation
251 Distance from station to channel must not exceed 1 km
252 Channel epoch overlap not allowed
Channel level validation
301 Channel attribute 'code' cannot be null, must match [A-Za-z0-9\*\?]{1,3}
302 Channel attribute 'location' cannot be null, must match ([A-Za-z0-9\*\?\-\ ]{1,2})?
303 Channel startDate is required
305 Channel startDate < endDate when endDate available
306 Channel latitude is invalid
307 Channel longitude is invalid
308 Channel depth is required
309 Channel azimuth is invalid
310 If Channel sample rate = 0, no Response should be included
311 Channel sensor description cannot be null/empty
312 Calibration unit is invalid
314 Invalid Dip value
315 Invalid channel orientation
Response level validation
401 The 'number' attribute of Response::Stage element must start at 1 and be sequential
402 The element of a stage must match the element of the preceding stage, except for stages 0 or 1.
403 The element StageGain::Value or InstrumentSensitivity::Value must be non-zero.
405 If Channel sample rate = 0, no Response should be included.
406 If Channel sample rate > 0, at least one stage must be included and be comprised of units, gain, and sample rate.
407 If Channel sample rate > 0, total instrument response must exist as either or .
408 The value of Channel::SampleRate must be equal to the value of Decimation::InputSampleRate divided by Decimation::Factor of the final response stage.
409 Response stages having Coefficient, FIR ResponseList or a PolesZeros with with transfer function type Digital, must include a Decimation element.
410 Any FIR instrument type must include coefficient elements.
411 InputUnits for Stage-Sensitivity must come from approved list of unit names.
412 OutputUnits for Stage-Sensitivity must come from approved list of unit names.
413 If the value of Stage::Decimation::Factor is > 1 then Stage::Decimation::Correction must be non-zero.
511 Input Units for Stage::Filter must come from approved list of unit names.
512 OutputUnits for Stage::Filter must come from approved list of unit names.