What is nationalism? Its definition is inextricably linked to the definition of nation: "a large aggregate of people united by common descent, culture, or language, inhabiting a particular state or territory" (OED). It is important to distinguish nation from state. They are not the same thing, even though we speak of the nation state, which is a political state comprised, ideally, of a single nation, where membership of this single nation is determined by descent, culture or language.
This idea of "descent, culture or language" is a bit cumbersome, but fortunately the English language blesses us with a shorthand term for this: ethnicity. There is a technical distinction between ethnicity and race - race is more about biology - but they are forever linked in the mind of the racist as the basis of what makes him different to the hated Other.
It's easy to see how the sentiment underlying racism - the belief that one race is intrinsically superior to another - is a kind of pure prejudice that can be, and almost universally is, applied to groups defined by factors other than race, such as gender and sexuality: sexism is the belief that one gender is intrinsically superior to another. Is there really any difference between sexism and racism here? The object of prejudice is different, but the sentiment isn't. These isms are all unjustified prejudice, distilled into pure form. And here's the point:
Nationalism is just another ism.
Is it a coincidence that the BNP (the British National Party) and the Nazis (National Socialists) are vicious racists? Of course not. It really shouldn't come as a surprise that the belief that your nation is intrinsically better than another is plain old racism. The distinction is maintained by piling universal scorn on racism but none on nationalism. The Sun will happily print headlines bashing "the feelthy Frogs" and "lout Krauts", but do they have the balls to tell us what they think about spics, wops, niggers and ragheads?