[obspy-users] QuakeML catalog import: XML namespaces that qualify for .extra mechanism

Fabian Euchner fabian.euchner at sed.ethz.ch
Fri Sep 27 13:28:42 CEST 2019

Hi Tobias,

> I see the problem, I'd class it a bug. Writing works fine but during
> reading they seem to get left out. I've opened a ticket on github to
> track this.
> https://github.com/obspy/obspy/issues/2466

It seems that it's not a bug, but rather a deliberate decision of the 


> Any reason to not just read any namespaces, even the native ones of the
> document back into extra? I don't see how the schema wouldn't allow
> having e.g. http://quakeml.org/xmlns/quakeml/1.2 elements as custom
> ones, even though that really might not be intended usage of the standard.

You are right for the QuakeML root namespace http://quakeml.org/xmlns/quakeml/
1.2. Extensions of <eventParameters> and below (i.e. the BasicEventDescription 
namespace) with elements in this namespace are valid QuakeML 1.2 and thus 
these extension elements should be captured in the .extra elements.

Extension elements in the BED namespace itself (http://quakeml.org/xmlns/bed/
1.2) are per Schema definition no valid QuakeML 1.2. One can argue whether 
they should be included. Given the fact that there are lots of invalid QuakeML 
documents out in the wild, I correct my previous opinion and suggest to 
include them, too (if it's technically feasible in the current 
implementation). Elements that are placed "illegally" in http://quakeml.org/
xmlns/bed/1.2 could then at least be found in .extra, which would make life 
easier for users.

Best regards,

> On 26/09/2019 13:17, Fabian Euchner wrote:
> > Hi all,
> > 
> > currently, only XML extension elements with namsepaces that do *not* start
> > with http://quakeml.org/xmlns/ are included into the .extra mechanism. I
> > find that a bit too restrictive because
> > 
> > i) Nothing prevents users to assign such namespaces to their extension
> > elements (which is fine for development and testing, or documents that are
> > not public). Then there is a big surprise that these elements are missing
> > in .extra. One has to dig deep into the source code to find out why.
> > 
> > ii) In particular, extension elements that are taken from the
> > semi-official
> > QuakeML 2.0 draft (and thus live "legally" in http://quakeml.org/xmlns/)
> > are neglected.
> > 
> > I suggest that all namespaces are allowed (with the exception, of course,
> > of the document's namespaces, http://quakeml.org/xmlns/quakeml/1.2 and
> > http:// quakeml.org/xmlns/bed/1.2).
> > 
> > Best regards,
> > Fabian
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
> https://lists.swapbytes.de/mailman/listinfo/obspy-users

Fabian Euchner                                       phone    +41 44 633 7178
Institute of Geophysics                                fax    +41 44 633 1065
ETH Zurich, NO F5                                   e-mail fabian at sed.ethz.ch
Sonneggstrasse 5                                orcid.org/0000-0001-6340-7439
8092 Zurich (Switzerland)                                                    

More information about the obspy-users mailing list