Open nadiakreimer opened 1 year ago
Shouldn't actually rather the schema be changed? Why assume that every country always has a dash in the last part of the phone number? Private land line numbers in Germany fro example don't have a dash, generally.
Maybe just make it <xs:pattern value="[0-9]+(-[0-9]+)?"/>
? or even [0-9]+(-[0-9]+)*
to allow for multiple dashes?
--
As another comment.. what about cell phone numbers? In that case I guess you would put the provider prefix part as "AreaCode" so maybe the docs for AreaCode should be expanded to mention that?
In Germany a cell phone number would look like 0123/456789
so split up like
Might actually be better to remove this from the schema. I suspect this field is rarely populated and I am doubtful that being able to call a network operator is useful as part of station metadata.
That said, I agree all examples should be valid.
I agree that the dash should be be eliminated. I also think the country code should be required, it's more generally important than the area code as the area code can simply be prepended onto the phone number, as long as you're using the country code. If the country code isn't required, StationXML should state that it is "1" by default.
I recommend switching to an international standard, preferably a single, fully international, string. I didn't find an ISO standard, but there are ITU (International Telecommunication Union) standards, notably E.123, Notation for national and international telephone numbers, e-mail addresses and web addresses
This standard says that international numbers should be specified with only the letter "+" followed by digits (0-9), optionally with inserted spaces. Some examples of national/international equivalents are:
Country | National code | International number basic | International w/spaces |
---|---|---|---|
USA | (607) 123-4567 | +16071234567 | +1 607 123 4567 |
France | 06 1234 5678 | +33612345678 | +33 6 1234 5678 |
There is also a standard named E.164: The international public telecommunication numbering plan, but I don't think it's relevant (it seems to be designed for creating new telephone number systems), except that it limits the total number of digits for international numbers to 15.
I noticed that the example http://docs.fdsn.org/projects/stationxml/en/latest/reference.html#channel-comment-author-phone-phonenumber indicates a string of numbers, but the number requires a dash, e..g.555-1212 instead to pass validation with the StationXML validator. Please correct the documentation if possible.