This is doing pretty similar formatting as the database address function and that in XM.Address. We could probably come up with something better than copying the same logic in this transform.