Thread: stationxml for responses is invalid

Started: 2013-04-09 18:28:22
Last activity: 2013-04-09 20:22:46
Topics: Web Services
Philip Crotwell
2013-04-09 18:28:22
Hi

The returned xml from this query is invalid according to the fdsn
stationxml spec. :

service.iris.edu/fdsnws/station/1/query?network=IU&station=ANMO&loc=00&channel=BHZ&level=response&nodata=404

The xschema requires all <Zero> elements to come before all <Pole> elements
in a <PolesZeros> element, but the document has <Pole>s and then <Zero>s.

This is a case where xschema's lack of ability to allow unordered content
makes it hard to use. RelaxNG has a much nicer way of specifying a schema
IMHO, but I guess that stationxml is unlikely to change from xschema.

Philip

  • Philip Crotwell
    2013-04-09 18:32:53
    Here is a different case, maybe caused by bad data.

    http://service.iris.edu/fdsnws/station/1/query?network=II&station=AAK&loc=00&channel=LCE&level=channel&nodata=404

    Near the bottom, the <InstrumentSensitivity> is supposed to contain both
    <InputUnits> and <OutputUnits> but only has <InputUnits>.

    Philip




    On Tue, Apr 9, 2013 at 11:28 AM, Philip Crotwell <crotwell<at>seis.sc.edu>wrote:


    Hi

    The returned xml from this query is invalid according to the fdsn
    stationxml spec. :


    service.iris.edu/fdsnws/station/1/query?network=IU&station=ANMO&loc=00&channel=BHZ&level=response&nodata=404

    The xschema requires all <Zero> elements to come before all <Pole>
    elements in a <PolesZeros> element, but the document has <Pole>s and then
    <Zero>s.

    This is a case where xschema's lack of ability to allow unordered content
    makes it hard to use. RelaxNG has a much nicer way of specifying a schema
    IMHO, but I guess that stationxml is unlikely to change from xschema.

    Philip


    • Philip Crotwell
      2013-04-09 20:22:46
      Here is yet another:
      http://service.iris.edu/fdsnws/station/1/query?network=II&station=AAK&channel=LOG&level=channel&nodata=404

      This has a <Response> that contains an empty <InstrumentSensitivity>, which
      violates the schemd. Probably it would be better to not have the <Response>
      tag in this channel at all, being it is a log channel.

      Philip


      On Tue, Apr 9, 2013 at 11:32 AM, Philip Crotwell <crotwell<at>seis.sc.edu>wrote:


      Here is a different case, maybe caused by bad data.


      http://service.iris.edu/fdsnws/station/1/query?network=II&station=AAK&loc=00&channel=LCE&level=channel&nodata=404

      Near the bottom, the <InstrumentSensitivity> is supposed to contain both
      <InputUnits> and <OutputUnits> but only has <InputUnits>.

      Philip




      On Tue, Apr 9, 2013 at 11:28 AM, Philip Crotwell <crotwell<at>seis.sc.edu>wrote:


      Hi

      The returned xml from this query is invalid according to the fdsn
      stationxml spec. :


      service.iris.edu/fdsnws/station/1/query?network=IU&station=ANMO&loc=00&channel=BHZ&level=response&nodata=404

      The xschema requires all <Zero> elements to come before all <Pole>
      elements in a <PolesZeros> element, but the document has <Pole>s and then
      <Zero>s.

      This is a case where xschema's lack of ability to allow unordered content
      makes it hard to use. RelaxNG has a much nicer way of specifying a schema
      IMHO, but I guess that stationxml is unlikely to change from xschema.

      Philip




Page built 16:55:16 | v.6a0a3e16