Thread: validation of quakeml from event web service

Started: 2011-11-10 21:23:25
Last activity: 2011-11-10 22:13:59
Topics: Web Services
Philip Crotwell
2011-11-10 21:23:25
Hi

I am having trouble validating the quakeml output from the event web
service. Have you been able to validate it to make sure it matches the
relaxng or xschema definitions of QuakeML?

The first problem is that in the schema definition the top level
<quakeml> element is in the "http://quakeml.org/xmlns/quakeml/1.2"
namespace, while the <eventParameters> and all of the elements inside
it are in the "http://quakeml.org/xmlns/bed/1.2" namespace. The output
from the web service trys to put all of them into the
"http://quakeml.org/xmlns/bed/1.2" namespace, causing a validation
error with the <quakeml> element.

thanks,
PHilip

  • Philip Crotwell
    2011-11-10 22:13:59
    Hi

    The start of the example quakeml document from ETH looks like this, so
    maybe worth emulating for the event web service. They use bed as teh
    default namespace and declare a seaparate one for the initial element.
    Notice the "q" namespace within <q:quakeml

    Philip

    <?xml version="1.0" encoding="utf-8"?>
    <q:quakeml xmlns="http://quakeml.org/xmlns/bed/1.2"
    xmlns:q="http://quakeml.org/xmlns/quakeml/1.2">
    <eventParameters publicID="smi:nz.org.geonet/catalog/1">
    <event publicID="smi:nz.org.geonet/event/2806038g">



    On Thu, Nov 10, 2011 at 1:23 PM, Philip Crotwell <crotwell<at>seis.sc.edu> wrote:
    Hi

    I am having trouble validating the quakeml output from the event web
    service. Have you been able to validate it to make sure it matches the
    relaxng or xschema definitions of QuakeML?

    The first problem is that in the schema definition the top level
    <quakeml> element is in the "http://quakeml.org/xmlns/quakeml/1.2"
    namespace, while the <eventParameters> and all of the elements inside
    it are in the "http://quakeml.org/xmlns/bed/1.2" namespace. The output
    from the web service trys to put all of them into the
    "http://quakeml.org/xmlns/bed/1.2" namespace, causing a validation
    error with the <quakeml> element.

    thanks,
    PHilip


09:13:22 v.b3198453