Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in <PhoneNumber> example as part of the <Comments> field #156

Open
nadiakreimer opened this issue Nov 3, 2022 · 4 comments
Open

Comments

@nadiakreimer
Copy link

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.

@megies
Copy link
Contributor

megies commented Nov 4, 2022

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

  • country: 49
  • provider / network: 123
  • number: 456789

@crotwell
Copy link
Collaborator

crotwell commented Nov 7, 2022

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.

@WayneCrawford
Copy link

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.

@WayneCrawford
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants