A discussion of the continuum between pointlessness and offensiveness is incomplete without an illustration of the latter. The following joke is grossly offensive, although some find it funny.
Q: What's black and white and red all over, and can't turn around in a doorway?
A: A nun with a javelin through her head.
Many principles are violated in this example, including the sanctity of human life, and the special sanctity of people devoted to holy and abstinent lives, and the sanctity of women. These are violations similar to those in any number of jokes involving injury or death, whether of priestly, feminine, or human creatures, or otherwise. However, some additional components make this particular example somewhat different from others.
First, a person with a javelin through their head would hardly be concerned about their inability to turn around in doorways. The moral principle here is that people should be concerned with things that are important, and not bother about irrelevancies. A person with such an injury certainly has more important things on her mind than this particular inability. Using the inability to turn around in a doorway as the essential defining feature of a nun with a javelin through her head violates this principle of irrelevancies. Further, the thought of further injuries due to the attempt to turn around in a doorway violates further principles regarding the prevention of self-injury.
Consider why this joke might or might not be funny. People who find it offensive are, by this theory of humor, unable to give the described situation a ``normal'' interpretation, either because the joke is told badly or because of a strong emotional commitment to the principles violated. People that find the joke funny are, by the theory, not so attached. Furthermore, since the principles violated would seem to be universal moral principles that everyone would have at least some attachment to, the theory also predicts that no-one could fail to see the point, because everyone would recognise a violation of an important moral principle: one may only think this joke is either offensive or funny.
Joke analysis according to the present theory can be continued ad libitum. I know of no examples which cannot be analysed plausibly using the present theory. Instead of prolonging the discussion of jokes, then, we will move on to some other classes of humor-related phenomena.