[webservices] A question of location ID, how to represent empty IDs in XML?

Lion Krischer krischer at geophysik.uni-muenchen.de
Mon Jul 28 07:33:37 PDT 2014


Hi Joachim,

> 'Not ""' is a problem as "" is a valid location code according to SEED specification. Which is what all this is actually about. :)
> 
> In general I like the idea of using regular expressions if we use ^([A-Z0-9]{2}|  |)$
The idea was to choose either “  “ or “” which both denote an empty location id. In SEED it is not possible to specify two actual spaces (and not an empty string) as the location identifier as right aligned spaces are considered padding characters and have to be removed by the processing software.

Allowing both would mean having two separate “encodings” for the same thing. I am fine with either it is just important that one is picked as the proper representation of an empty location id.

According to the SEED spec it appears that single letter location codes are also valid. Does that happen in the wild?

Cheers!

Lion


> 
>> Everything else will get rejected. Then one can be sure that it is consistent everywhere (assuming people test their web services against the schema which is a good idea in any case). Similar regexes should also be defined for the network, station, and channel codes to assure compatibility with SEED. In general it would be a good idea to have the schema enforce as many things as possible and leave little to no room for interpretations.
>> 
>> 
>> Now whether one uses two spaces, two dashes, an empty string or what not for an empty location code does not really matter. All are syntactically valid XML and thus any parser can be expected to be able to deal with them. Consistency is by far the most important thing in my opinion.
> 
> The most important consistency is with the SEED standard.
> 
> Cheers
> Joachim
> 
> _______________________________________________
> webservices mailing list
> webservices at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/webservices




More information about the webservices mailing list