210.70(A)(1)Habitable Rooms. At least one wall switch-controlled lighting outlet shall be installed in every habitable room and bathroom.
Does this preclude the installation of a switch (to control the bathroom light) near the outside of a bathroom door? I am looking at the words "installed in..."
Switch location in this case is up to you. You can put this switch anywhere in the house.
A nice installation might be to gang together all the light switches required by this section in one room. Homeowner might shoot you, but you would be in compliance with the code.
Few things are harder to put up with than the annoyance of a good example.