There’s so many to choose from
You know that XML thing? Ever notice that one of the frequent XML examples is how to encode a mailing address? I guess mailing addresses are something people use pretty frequently in their data. Well, I’ve noticed this, and I’ve also noticed that no one has ever (that I can find) made a standard for specifying mailing addresses. ADIS is the only thing I’ve seen, and that format contains a ridiculous granularity for addresses and requires that you include data that only a postal database could love. This XML Web 2.0 open source Internet is all about reusable modules, right? I can’t find anything to reuse, so I made my own thing. http://gophernet.org/schemata/address.xsd. It gives you enough data, according to the Fedex international waybill, to encode addresses for about any country. It won’t let you create databases searchable by county or delivery zone or whatever weird thing that foreign people use, but I don’t care about that, and I’m betting that you don’t either. For a quick example, here’s the president’s address using my new standard:
<?xml version="1.0" encoding="utf-8"?> <address xmlns="http://www.gophernet.org/schemata/address.xsd"> <recipient>George W. Bush</recipient> <address1>1600 Pennsylvania Avenue NW</address1> <city>Washington</city> <state>DC</state> <postalCode>20500</postalCode> <country>USA</country> </address>
The address type or element in the schema can easily be used in other schemata that need an address. You’re welcome, world.
October 24th, 2006 at 3:42 pm
Your example is funny because DC isn’t a state. And what about can-only-listen-in-Congress Puerto Rico?You should look in to ISO 3166 for more information on subnational entity abbreviations.
October 24th, 2006 at 6:06 pm
You’re right, it’s not a state. But I don’t want to deal with something like <amp;stateProvinceRegionAbbreviation<amp; when I’d rather just shove something into the container that looks good enough. I think that’s why no one ever made a real address format (other than ADIS); they’re afraid. I’d rather get close and move along without having to reinvent the wheel every time.