xml2rfc
xml2rfc copied to clipboard
xml2rfc does not accept "The Netherlands" as a country name
Describe the issue
Specifying <country>The Netherlands</country>
will cause xml2rfc to warn with the following message and not write the country name in the output:
"Warning: Country lookup failed for <country>The Netherlands</country>.
Use --country-help to show recognized country names and codes
Created file rfc9102.html"
I figure this isn't fixable given that the library used for addresses is not being updated. The workaround is to use "Netherlands" instead.
Code of Conduct
- [X] I agree to follow the IETF's Code of Conduct
Note that the wavering discussions on various lists agreed that we probably want to keep the country as the only semantic-markup "postal" element. So this needs to be fixed. If there is no library support, Likely, xml2rfc will just accrete a number of special case translations...
The problem is that the addresses are currently fed into an abandonware library for formatting, and it has an internal table that maps country names into address formats. With the change we need to make, <country>
becomes a free text field.
I suppose the RPC could keep their own list of allowed country names but I don't see why they would, since you would expect people to know what country they live in.
"Free text field" isn't quite as semantic, but OK. This just means that the work with normalizing this field is with the people who want to make use of it, not once at publication time. (I'd rather just have a two-character TLD, but that has other interesting issues.)
@jrlevine The RPC does check country names against the English short names found in the ISO country codes. We have a small list of exceptions. For instance, we prefer "The Netherlands" over "Netherlands (the)".
Interesting. Excerpt (since 8650):
248 China
2 FI
4 FR
92 Finland
205 France
6 NL
2 NZ
40 Netherlands
17 New Zealand
2 SE
94 Sweden
18 US
37 USA
2 United States
1019 United States of America
8 中国
I don’t suppose we’ve had any authors from The Bahamas, The Gambia, or The Sudan. Anyway I’d rather delegate the decision to sensible editors than the abandonware library.